qrisp.gqsp.qsp_angles#
- qsp_angles(p: ArrayLike, parity: Literal['even', 'odd'] = 'odd', signal_basis: Literal['X', 'Z'] = 'Z') tuple[Array, Array][source]#
Computes the QSP angles for a given polynomial.
- Parameters:
- pArrayLike
1-D array containing the polynomial coefficients in Chebyshev basis, ordered from lowest order term to highest.
- parityLiteral[“even”, “odd”]
The structural parity of the target polynomial (‘even’ or ‘odd’). Defaults to ‘odd’. Must be known at compile time for JAX tracing.
- signal_basisLiteral[“X”, “Z”]
The signal basis for the QSP angles (‘X’ or ‘Z’). Defaults to ‘Z’.
- Returns:
- anglesArray
1-D array of angles \((\phi_0,\dotsc,\phi_d)\).
- alphaArray
The scalar scaling factor as 0-D array.
Notes
The resulting angles correspond to a rescaled version of the input polynomial.