View on GitHub
Open this notebook in GitHub to run it yourself
Generalized Quantum Signal Processing (GQSP) is a quantum algorithmic primitive that extends standard QSP, allowing one to block-encode arbitrary polynomials of unitary operations [1]. It removes the “realness” and parity restrictions on achievable polynomials that appear in QSP [2] and provides a simple recipe for constructing complex polynomials with on the unit circle. Moreover, it can be used to implement polynomials with negative powers, i.e., Laurent polynomials, further broadening the class of transformations accessible within this framework. The polynomial transformation is achieved by applying a sequence of arbitrary rotations on an auxiliary qubit, rather than rotations in a fixed basis. The GQSP routine has several applications, such as state preparation and phase function transformations . A notable case is Hamiltonian simulation, where GQSP offers a more direct and flexible route compared to standard QSP.In this demo we implement a simple instance of the GQSP primitive, preparing a state , by applying the corresponding polynomial on a diagonal unitary matrix. Using theComplexity: Applying a polynomial of degree requires controlled- calls and single-qubit rotations.
- Input: A unitary operator (quantum function) , and a target polynomial transformation with for .
- Output: A unitary that block-encodes using a single-qubit block variable.
Keywords: Quantum Signal Processing (QSP), Polynomial transformations, Block-encoding, Hamiltonian simulation, Phase functions.
gqsp quantum function from the open-library, phase assignment with phase, and utility classical function for obtaining the QSP angles, the implementation is done naturally.
Example: Preparing state
The idea of the algorithm is to prepare a diagonal unitary , such that . Then, if we apply a polynomial such that , then we get . First, we write our function as a Laurent polynomial in : Thus, the polynomial we are looking at is . First, we find the GQSP angles, by calling thegqsp_phases function.
For numerical stability, we make sure the polynomial is strictly smaller than 1, by multiplying by a scaling constant.
phase function:
gqsp.
Output:

ind==0)
Output:
