QSVT
ampamp.qsvt
QSVTSynthesizer
Generates optimal Chebyshev approximations for QSVT target functions.
get_inverse_polynomial(degree, kappa, scale_factor=0.8)
staticmethod
Return an odd-parity Chebyshev approximation to 1 / x.
This is the public matrix-inverse polynomial interface for downstream QSVT workflows. The returned coefficient array follows NumPy's Chebyshev basis ordering.
synthesize_jacobi_anger(degree, time)
staticmethod
Constructs parity-split Chebyshev series for Hamiltonian Simulation.
Utilizes the Jacobi-Anger expansion to estimate coefficients.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
degree
|
int
|
The cutoff degree for the expanded series. |
required |
time
|
float
|
The evolution time \(t\) for simulating \(e^{iHt}\). |
required |
Returns:
| Type | Description |
|---|---|
tuple[Chebyshev, Chebyshev, float]
|
tuple[Chebyshev, Chebyshev, float]: A tuple containing the even parity series, odd parity series, and the LCU norm bound \(\alpha\). |
synthesize_matrix_inverse(degree, kappa, scale_factor=0.8)
staticmethod
Construct an odd Chebyshev polynomial for matrix inversion.
Approximates \(1/x\) optimally outside the gap region.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
degree
|
int
|
The odd degree limits. |
required |
kappa
|
float
|
The condition number \(\kappa > 1\). |
required |
scale_factor
|
float
|
Additional scale reduction buffer factor. Defaults to 0.8. |
0.8
|
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: List of coefficients for the optimal Chebyshev sum. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the input degree is not logically odd. |
SU2QSPEngine
Forward-model SU(2) compiler for Quantum Signal Processing.
evaluate_sequence(phases, x_vals)
classmethod
Evaluates the QSP sequence and extracts the \(P(x)\) and \(Q(x)\) polynomials.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phases
|
ndarray
|
Array of phase shifts representing the sequence. |
required |
x_vals
|
ndarray
|
Array of target evaluation points \(x \in [-1, 1]\). |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
tuple[np.ndarray, np.ndarray]: A tuple containing |
ndarray
|
corresponding to the output polynomials. |
w_signal(x)
staticmethod
Return the signal unitary \(W(x)\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
The singular value or signal parameter \(x \in [-1, 1]\). |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: The \(2 \times 2\) unitary block embedding \(x\). |
z_rotation(phi)
staticmethod
Return the phase rotation \(\exp(i \phi Z)\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi
|
float
|
The rotation angle \(\phi\). |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: The \(2 \times 2\) phase rotation unitary. |