Scholarly Expositions • Substack • Bigganblog

Research Blog, Essays & Science Writing

Technical tutorials on quantum algorithms and open quantum systems, philosophical essays on epistemology and logic on Substack, and popular mathematics & physics articles in Bengali on Bigganblog.

← Back to All Articles

Interactive Quantum Singular Value Transformation (QSVT): Live 4-Stage Pipeline

Interactive Quantum Singular Value Transformation (QSVT): Live 4-Stage Pipeline

Unifying Quantum Algorithms Through Polynomial Transformations

Search, matrix inversion, spectral filtering, and Hamiltonian simulation appear to ask for different operations. In the block-encoding query model, Quantum Singular Value Transformation (QSVT) provides a common construction for many such algorithms by transforming singular values with suitable polynomials. Gilyén, Su, Low, and Wiebe developed this framework in 2019, building on Quantum Signal Processing. The polynomial, its domain, and the circuit convention determine which transformation is actually obtained.

In my Interactive QSVT Web Laboratory, you can enter a real matrix with two or three rows and columns, select a target polynomial, and inspect the SVD, unitary dilation, scalar QSP product, and target singular-value transformation. The last stage is a calculation from the SVD; the laboratory does not assemble a matrix-valued QSVT circuit.


Stage I: Singular Value Decomposition ($A = W \Sigma V^\dagger$)

Any linear operator $A \in \mathbb{C}^{m \times n}$ admits a Singular Value Decomposition:

$$A = W \Sigma V^\dagger = \sum_{k=1}^{\min(m,n)} \sigma_k \, |w_k\rangle\langle v_k|$$

where $W \in \mathrm{U}(m)$ and $V \in \mathrm{U}(n)$ are unitary matrices whose columns $|w_k\rangle$ and $|v_k\rangle$ form orthonormal left and right singular bases, and $\Sigma$ is diagonal with non-negative singular values $\sigma_1 \ge \sigma_2 \ge \cdots \ge 0$. Rather than diagonalizing a square Hermitian matrix, SVD pairs each input direction $|v_k\rangle$ with an independent output direction $|w_k\rangle$ scaled by $\sigma_k$.


Stage II: Unitary Block Encoding via Cosine-Sine Dilation

Quantum circuits can only execute unitary gates ($U^\dagger U = I$), whereas a general matrix $A$ is neither square nor unitary. To process $A$ coherently on a quantum register, we first rescale it by a normalization factor $\alpha \ge \|A\|_2 = \sigma_{\max}$ so that every normalized singular value $x_k := \sigma_k / \alpha$ lies in $[0, 1]$. We then embed $A/\alpha$ into the top-left corner of a larger unitary matrix $U_A$ using Cosine-Sine (Halmos) unitary dilation:

$$U_A = \begin{pmatrix} A/\alpha & \sqrt{I_m - (A/\alpha)(A/\alpha)^\dagger} \\ \sqrt{I_n - (A/\alpha)^\dagger(A/\alpha)} & -(A/\alpha)^\dagger \end{pmatrix}$$

In the singular-vector bases, each paired block is a reflection $R(x_k)=\begin{pmatrix}x_k&\sqrt{1-x_k^2}\\\sqrt{1-x_k^2}&-x_k\end{pmatrix}$. Fixed phase changes relate this reflection to the $W(x)$ rotation used in Stage III; the phase lists cannot be identified without that conversion. Selecting the first $n$ input coordinates and the first $m$ output coordinates recovers the block $A/\alpha$. For a qubit-register implementation, the $(m+n)$-dimensional dilation must be embedded into a suitable power-of-two space and those input and output projectors specified.


Stage III: Quantum Signal Processing & Phase-Angle Optimization ($\vec{\phi}$)

Before transforming an entire matrix, consider a single scalar $x = \cos\theta \in [-1, 1]$ encoded inside the $2 \times 2$ signal rotation operator:

$$W(x) = \begin{pmatrix} x & i\sqrt{1 - x^2} \\ i\sqrt{1 - x^2} & x \end{pmatrix} = e^{i\theta X}$$

Quantum Signal Processing (QSP) interleaves $d$ calls to $W(x)$ with $d + 1$ programmable $Z$-axis phase rotations $e^{i\phi_j Z}$ for a phase vector $\vec{\phi} = (\phi_0, \phi_1, \dots, \phi_d) \in \mathbb{R}^{d+1}$:

$$U_{\vec{\phi}}(x) = e^{i\phi_0 Z} \prod_{j=1}^{d} \left[ W(x)\, e^{i\phi_j Z} \right] = \begin{pmatrix} P(x) & iQ(x)\sqrt{1 - x^2} \\ iQ^*(x)\sqrt{1 - x^2} & P^*(x) \end{pmatrix}$$

For this sequence, equality in the full complex top-left entry is more restrictive than boundedness on $[-1,1]$. The exact polynomial-completion theorem requires $\deg P\le d$, $\deg Q\le d-1$, parities $d$ and $d-1$, and

$$|P(x)|^2+(1-x^2)|Q(x)|^2=1\qquad (x\in[-1,1]).$$

The existence of a complementary $Q$ is equivalent to the degree and parity conditions on $P$, together with all of the following:

  1. $|P(x)|\le1$ for every $x\in[-1,1]$.
  2. $|P(x)|\ge1$ for every real $|x|\ge1$.
  3. If $d$ is even, $|P(iy)|\ge1$ for every real $y$.

For the imaginary-axis condition, the parity is essential. An even polynomial satisfies $P^\#(iy)=\overline{P(iy)}$, where $P^\#$ conjugates the coefficients. Thus the polynomial-completion condition $P(iy)P^\#(iy)\ge1$ is the modulus condition written above. At $d=0$, the sequence is a single $Z$ phase and its top-left entry is a constant of modulus one. These statements follow from Gilyén et al., Theorems 3–4.

The endpoint already exposes the distinction. Since $W(1)=I$, every phase vector gives $[U_{\vec\phi}(1)]_{1,1}=e^{i\sum_j\phi_j}$. The prefilled custom target $P(x)=x-x^3/2$ has $P(1)=1/2$, so it cannot equal that complex entry. The two endpoint errors alone contribute at least $1/52$ to the laboratory's 26-point mean-square loss.

For a real-part target, $\operatorname{Re}[U_{\vec\phi}(x)]_{1,1}=p(x)$, a real polynomial of the required degree and parity bounded by one on $[-1,1]$ is sufficient. The imaginary part generally remains nonzero. Extracting the real polynomial as a coherent matrix block requires the corresponding additional construction, such as combining a completion and its conjugate with a control ancilla. Taking a real part in an optimizer does not by itself implement that circuit. See Gilyén et al., Corollaries 10 and 18 and Martyn et al., Appendix A.

The laboratory retains the full-entry objective

$$\mathcal L(\vec\phi)=\frac1{26}\sum_{j=0}^{25}\left|[U_{\vec\phi}(-1+2j/25)]_{1,1}-P(-1+2j/25)\right|^2.$$

It checks exact rational obstructions before optimization and reports a witness when one is found. Passing the finite probes leaves feasibility unconfirmed unless a known analytic phase construction applies. A separate 257-point grid measures the candidate's numerical error. Neither a small sampled residual nor failure of the Adam search proves the corresponding global mathematical claim.


Stage IV: The Target Singular-Value Transformation

A QSVT construction alternates a projected unitary encoding and its adjoint with phases on the appropriate input and output projectors. This lifts the scalar polynomial action to invariant singular-vector subspaces. Its phase convention must be converted consistently from the scalar sequence.

For odd $P$, the target maps right singular vectors to left singular vectors:

$$P^{(\mathrm{SV})}(A/\alpha)=\sum_k P(\sigma_k/\alpha)|w_k\rangle\langle v_k|.$$

For even $P$, the right-space target is instead

$$P^{(\mathrm{SV})}_R(A/\alpha)=\sum_{k=1}^{n}P(\widetilde\sigma_k/\alpha)|v_k\rangle\langle v_k|,$$

where the singular-value list is completed with zeros on the input kernel. This is an $n\times n$ operator, including when $A$ is rectangular. The laboratory computes these target matrices directly from the SVD. They are not a verification that the numerical phases implement the corresponding matrix circuit.

  • Matrix inversion: For a suitably normalized Hermitian matrix whose spectrum is separated from zero, approximate a scaled inverse $c/x$ on the relevant spectral intervals. A general pseudoinverse reverses the left and right singular directions, so the encoding and its adjoint must be chosen accordingly.
  • Spectral filtering: Choose a bounded polynomial that approximates a filter away from a specified transition region. An even singular-value filter acts within the chosen singular space.
  • Amplitude amplification: For odd $d$, the input $x=\sin(\pi/(2d))$ satisfies $|T_d(x)|=1$. The output sign depends on $d$; a general amplification procedure also specifies its success subspace and allowed input range.

Launch the Interactive QSVT Simulator →

Original Publication Link Read and comment on the original platform.