Use this file to discover all available pages before exploring further.
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 P with ∣P∣≤1 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 SU(2) 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 (eiH→eif(H)). A notable case is Hamiltonian simulation, where GQSP offers a more direct and flexible route compared to standard QSP.
Input: A unitary operator (quantum function) U, and a target polynomial transformation P(⋅) with ∣P(x)∣≤1 for {x∈C:∣x∣=1}.
Output: A unitary that block-encodes P(U) using a single-qubit block variable.
Complexity: Applying a polynomial of degree d requires d controlled-U calls and d single-qubit SU(2) rotations.Keywords: Quantum Signal Processing (QSP), Polynomial transformations, Block-encoding, Hamiltonian simulation, Phase functions.
In this demo we implement a simple instance of the GQSP primitive, preparing a state ∝∑xcos3(x), by applying the corresponding polynomial on a diagonal unitary matrix.Using the 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.
The idea of the algorithm is to prepare a diagonal unitary U, such that U∣x⟩=eix∣x⟩. Then, if we apply a polynomial P(x) such that P(eix)=cos3(x), then we get P(U)∣x⟩=cos3(x).First, we write our function as a Laurent polynomial in eix:cos3(x)=81(eix+e−ix)3=81(e3ix+3eix+3e−ix+e−3ix).Thus, the polynomial we are looking at is P(z)=81(z−3+3z−1+3z+z3). First, we find the GQSP angles, by calling the gqsp_phases function.For numerical stability, we make sure the polynomial is strictly smaller than 1, by multiplying by a scaling constant.
The GQSP phases correspond to a polynomial with positive powers, P~(z)=81(1+3z2+3z4+z6), however, the GQSP quantum function can shift it with a negative power, P(z)=z−mP~(z), with m=3.
negative_power = 3
Next, we define the unitary we would like to operate on, U∣x⟩=eix∣x⟩. It is simply defined by calling the phase function: