Use this file to discover all available pages before exploring further.
View on GitHub
Open this notebook in GitHub to run it yourself
The Quantum Singlar Value Transformation (QSVT) [1] is an algorithmic framework, used to apply polynomial transformation on the singular values of a block encoded matrix. It has wide range of applications such as matrix inversion, amplitude amplification and hamiltonian simulation.Given a unitary U, a list of phase angles ϕ1,ϕ2,...,ϕd+1 and 2 projector-controlled-not operands CΠNOT,CΠ~NOT , the QSVT sequence is as follows:Π~ϕd+1Uk=1∏(d−1)/2(Πϕd−2kU†Π~ϕd−(2k+1)U)Πϕ1for odd d, and:k=1∏d/2(Πϕd−(2k−1)U†Π~ϕd−2kU)Πϕ1for even d.Each of the projector-controlled-phase unitaries Π consists of a Z rotation of an auxilliary qubit wrapped by the CΠNOTs, NOTing the auxilliary qubit:Πϕ=(CΠNOT)e−i2ϕZ(CΠNOT)The transformation will result with a polynomial of order d.Function: qsvtArguments:
phase_seq: CArray[CReal] - a d+1 sized sequence of phase angles.
proj_cnot_1: QCallable[QArray[QBit], QBit] - projector-controlled-not unitary that locates the encoded matrix columns within U.
Accepts quantum variable of the size of qvar, and a qubit that is set to ∣1⟩ when the state is in the block.
proj_cnot_2: QCallable[QArray[QBit], QBit] - projector-controlled-not unitary that locates the encoded matrix rows within U.
Accepts quantum variable of the size of qvar, and a qubit that is set to ∣1⟩ when the state is in the block.
u: QCallable[QArray[QBit]] - U a block encoding unitary of a matrix A, such that A=Π~UΠ.
qvar: QArray[QBit] - the quantum variable on which U applies, which resides in the entire block encoding space.
aux: QBit - a zero auxilliary qubit, used for the projector-controlled-phase rotations.
Given as an input so that qsvt can be used as a building-block in a larger algorithm.
Example: polynomial transformation on a (x) block encoding
The following example implements a random polynomial transformation on a given block, based on [2].The unitary U here is a square-root transformation: U∣x⟩n∣0⟩n+1=∣x⟩n(x∣ψ0⟩n∣0⟩+1−x∣ψ1⟩n∣1⟩) where x is a fixed-point variable in the range [0,1).The example samples a random odd-polynomial, calculates the necessary phase sequence, then applies the qsvt and verifies the results.There are 2 distinct projector-controlled-not unitaries - one is applying on the entire (n+1) variable, and the second is on the 1-qubits auxilliary in the image.
[1]: András Gilyén, Yuan Su, Guang Hao Low, and Nathan Wiebe. 2019. Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing (STOC 2019). Association for Computing Machinery, New York, NY, USA, 193–204 https://doi.org/10.1145/3313276.3316366.[2]: Stamatopoulos, Nikitas, and William J. Zeng. “Derivative pricing using quantum signal processing.” arXiv preprint arXiv:2307.14310 (2023).