Skip to content

workbench_algorithms.utils.window_utils

Module containing utility functions for window state preparation.

compute_amplitudes_rect_window

compute_amplitudes_rect_window(n_qubits: int) -> np.ndarray

Compute amplitudes for rect window.

Parameters:

Name Type Description Default
n_qubits int

Size of phase register

required

Returns:

Type Description
ndarray

Representation of the taper state amplitudes.

compute_amplitudes_cosine_window

compute_amplitudes_cosine_window(
    n_qubits: int,
) -> np.ndarray

Compute amplitudes for cosine window.

Parameters:

Name Type Description Default
n_qubits int

Size of phase register

required
Note

Returns:

Type Description
ndarray

Representation of the taper state amplitudes.

compute_amplitudes_sine_window

compute_amplitudes_sine_window(n_qubits: int) -> np.ndarray

Compute amplitudes for sine window.

Parameters:

Name Type Description Default
n_qubits int

Size of phase register

required
Note

Returns:

Type Description
ndarray

Representation of the taper state amplitudes.

compute_amplitudes_kaiser_window

compute_amplitudes_kaiser_window(
    n_qubits: int, alpha: float
) -> np.ndarray

Compute amplitudes for Kaiser window.

Parameters:

Name Type Description Default
n_qubits int

Size of phase register

required
alpha float

Parameter for width of Kaiser window

required
Note

Returns:

Type Description
ndarray

Representation of the taper state amplitudes.

compute_amplitudes_welch_window

compute_amplitudes_welch_window(
    n_qubits: int,
) -> np.ndarray

Compute amplitudes for Welch window.

Parameters:

Name Type Description Default
n_qubits int

Size of phase register

required
Note

Returns:

Type Description
ndarray

Representation of the taper state amplitudes.

compute_amplitudes_hann_window

compute_amplitudes_hann_window(n_qubits: int) -> np.ndarray

Compute amplitudes for Hann window.

Parameters:

Name Type Description Default
n_qubits int

Size of phase register

required
Note

Returns:

Type Description
ndarray

Representation of the taper state amplitudes.

compute_amplitudes_dolph_cheby_window

compute_amplitudes_dolph_cheby_window(
    n_qubits: int, alpha: float
) -> np.ndarray

Compute amplitudes for Dolph-Chebyshev window.

Parameters:

Name Type Description Default
n_qubits int

Size of phase register

required
alpha float

Parameter for width of Dolph-Chebyshev window

required
Note

Returns:

Type Description
ndarray

Representation of the taper state amplitudes.