1. Quick check §
What is the top-left entry of W(x)³, and its value at x = 0.5?
Hint 1
W^d has top-left entry T_d(x).
Hint 2
T₃(x) = 4x³ − 3x.
Worked solution
T₃(0.5) = 4(0.125) − 1.5 = −1. Equivalently, x = cos(π/3), and cos(3·π/3) = cos π = −1.
Quantum Algorithms · Chapter 08
A block encoding places a matrix inside a unitary. With linear combinations of unitaries we can build one for any Hamiltonian written as a sum of Pauli strings, and encodings multiply, so a sequence of them applies a product of matrices.
Most algorithms want a function of the matrix rather than the matrix itself: an inverse to solve equations, an exponential to simulate dynamics, a projector to isolate the ground state. Measuring the eigenvalues first and then acting would collapse the superposition the algorithm depends on, and multiplying encodings loses success probability with every factor. How can we apply a function to every eigenvalue at once, coherently and at modest cost?
We start with one qubit and one unknown number. Repeating a rotation that encodes the number, with chosen phase shifts in between, produces a response that is a polynomial in the number, and the conditions on reachable polynomials follow from the structure of the sequence. To act on a matrix we then need, for each eigenvalue, a rotation of the same kind, and qubitization turns any suitable block encoding into exactly that, one plane per eigenvalue; singular value transformation extends the idea to matrices that are not Hermitian. Algorithm design then becomes polynomial approximation, and the degree of the polynomial is the number of calls, which we work out for filters, matrix inversion and simulation.
Polynomial simulation is one way to build \(e^{-iHt}\); assembling it from short evolutions under the individual terms is the other.
How can a short circuit transform an entire spectrum without reading its eigenvalues?
Choose a polynomial, and the phases that implement it act on every eigenvalue of an encoded matrix in parallel; degree is cost.
Apply polynomial functions to the eigenvalues or singular values of a block-encoded matrix, and design algorithms for filtering, inversion, and simulation by choosing polynomials.
Use block encodings and LCU (Operator Embedding), the spectral decomposition and matrix exponentials (Quantum Walks), amplitude amplification (Amplitude Manipulation), and phase estimation (Fourier Methods).
Two signal calls with one phase in between give the response cos φ (2x² − 1) + i sin φ; qubitizing H = 0.5 Z⊗Z − 0.3 X⊗I gives walk eigenphases arccos(±0.583/0.8).
The general signal-processing and QSVT statements are cited theorems; phase factors are assumed computed classically. Costs are in block-encoding calls; each call’s gate cost and subnormalization must be added.
8.1
Suppose a one-qubit unitary encodes an unknown number \(x\) in its top-left entry. Can repeated uses of it encode a function of \(x\)? Applying it several times gives one family of polynomials. Inserting phase shifts between the uses reaches many more, and a theorem says exactly which. The structure of the sequence then forces two constraints, on parity and on size, that every later design must respect.
signal operatorChebyshev polynomial
A block encoding of a matrix puts it in the top-left block of a unitary. What is the smallest case? A one-qubit unitary whose top-left entry is a real number \(x\in[-1,1]\), the unknown signal. What must the other entries be? The first column must have length one, so the entry below \(x\) has magnitude \(\sqrt{1-x^2}\), and the same holds along the first row. A symmetric choice with imaginary off-diagonal entries completes the matrix:
\[W(x)=\begin{pmatrix}x&i\sqrt{1-x^2}\\i\sqrt{1-x^2}&x\end{pmatrix}.\]
Its columns are orthonormal, so it is unitary. Why this completion?
Writing \(x=\cos\theta\), this is \(W=\cos\theta\,I+i\sin\theta\,X=e^{i\theta X}\), a rotation about the \(X\) axis by an angle that encodes \(x\), and its powers are easy to compute. We call \(W(x)\) the signal operator. Its top-left entry, \(\bra0W\ket0=x\), is a one-qubit block encoding of the number \(x\).
What does applying \(W\) twice encode? Multiply the matrices: the top-left entry of \(W^2\) is \(x\cdot x+(i\sqrt{1-x^2})(i\sqrt{1-x^2})=2x^2-1\). It is not \(x^2\). The second application lets amplitude that left \(\ket0\) on the first call return, and it returns with a minus sign. Since \(W^d=e^{id\theta X}\), the top-left entry of \(W^d\) is \(\cos(d\theta)\):
\[\bra0W(x)^d\ket0=T_d(x)=\cos(d\arccos x).\]
These are the Chebyshev polynomials: \(T_0=1\), \(T_1=x\), \(T_2=2x^2-1\), \(T_3=4x^3-3x\), and in general \(T_{d+1}=2xT_d-T_{d-1}\). Each is a genuine polynomial in \(x\) of degree \(d\), bounded by \(1\) on \([-1,1]\), and oscillating between \(\pm1\) there.
So \(d\) uses of a block encoding of \(x\) give a block encoding of a degree-\(d\) polynomial of \(x\). But Chebyshev polynomials are only one family. Can we reach others with the same number of calls?
Verify \(T_3(x)=4x^3-3x\) from the recurrence, and check \(T_3(\cos\theta)=\cos3\theta\) at \(\theta=\pi/3\).
\(T_3=2xT_2-T_1=2x(2x^2-1)-x=4x^3-3x\). At \(\theta=\pi/3\), \(x=\frac12\): \(4\cdot\frac18-\frac32=-1=\cos\pi\).
Evaluate the top-left entry of \(W^2\) at \(x=0,\frac12,1\).
\(2x^2-1\) gives \(-1,-\frac12,1\). Its magnitude never exceeds one, as it must for an entry of a unitary.
Why can no sequence of \(d\) calls to \(W(x)\), with any fixed unitaries between them, produce a top-left entry \(2x\) for all \(x\in[-1,1]\)?
At \(x=1\), \(2x=2\), but every entry of a unitary has magnitude at most one. Any achievable response must satisfy \(|P(x)|\le1\) on \([-1,1]\). To use \(2x\) one must scale it, for example to \(x\), or restrict to a smaller interval and design a bounded polynomial agreeing with \(2x\) there.
quantum signal processingphase factors
What else can we do between two signal calls? Insert \(Z\)-rotations \(e^{i\phi Z}=\mathrm{diag}(e^{i\phi},e^{-i\phi})\). For two calls with one phase in the middle,
\[\bra0W(x)\,e^{i\phi Z}\,W(x)\ket0=x^2e^{i\phi}-(1-x^2)e^{-i\phi}=\cos\phi\,(2x^2-1)+i\sin\phi.\]
The phase reshapes the response. At \(\phi=0\) we recover \(T_2\). At \(\phi=\pi/2\) the two paths combine to the constant \(i\): the signal dependence cancels entirely. In between, the real part is \(T_2\) scaled by \(\cos\phi\). With \(d\) signal calls and \(d+1\) phases \(\Phi=(\phi_0,\ldots,\phi_d)\), the sequence
\[U_\Phi(x)=e^{i\phi_0Z}\prod_{k=1}^{d}W(x)\,e^{i\phi_kZ}\]
is called quantum signal processing, and the angles are its phase factors.
Which polynomials can appear as \(P(x)=\bra0U_\Phi(x)\ket0\)? The answer is a theorem, which we quote (Low and Chuang, 2017; Gilyén, Su, Low, and Wiebe, 2019). A polynomial \(P\) is achievable with \(d\) calls if and only if
(i) \(\deg P\le d\); (ii) \(P\) has the parity of \(d\), even or odd; (iii) there is a polynomial \(Q\) of degree at most \(d-1\) and opposite parity with \(|P(x)|^2+(1-x^2)|Q(x)|^2=1\) on \([-1,1]\).
Condition (iii) says that \(P\) can be completed to a unitary; \(Q\) is the off-diagonal entry. In practice one usually wants a real target, and then the condition simplifies: any real polynomial of degree \(d\) with parity \(d\) and \(|P(x)|\le1\) on \([-1,1]\) is the real part of an achievable response. This is part of the same quoted theorem. The real part can be isolated with one extra qubit, by an LCU that averages the sequence with the sequence whose response is the complex conjugate. Phase factors for a given target are computed classically; numerically stable algorithms exist for degrees in the thousands.
Check the formula \(\cos\phi\,(2x^2-1)+i\sin\phi\) at \(x=0\), \(\phi=\pi/4\) by multiplying the matrices.
At \(x=0\), \(W=iX\). \(\bra0(iX)\,\mathrm{diag}(e^{i\pi/4},e^{-i\pi/4})\,(iX)\ket0\): \(iX\ket0=i\ket1\), the phase gives \(ie^{-i\pi/4}\ket1\), then \(iX\) gives \(i\cdot ie^{-i\pi/4}\ket0=-e^{-i\pi/4}\ket0\). So the entry is \(-e^{-i\pi/4}=-\frac{1}{\sqrt2}+\frac{i}{\sqrt2}\). The formula gives \(\frac{1}{\sqrt2}(-1)+i\frac{1}{\sqrt2}\). They agree.
With one signal call and phases \(\phi_0,\phi_1\), what responses are achievable?
\(\bra0e^{i\phi_0Z}We^{i\phi_1Z}\ket0=e^{i(\phi_0+\phi_1)}x\). Only \(x\) times a phase: degree one, odd parity, as the theorem says.
Can \(P(x)=x^2\) be achieved with \(d=2\)? Use condition (iii).
We need \(Q\) of degree at most 1 and odd parity, \(Q=cx\), with \(x^4+(1-x^2)|c|^2x^2=1\) for all \(x\). At \(x=0\) the left side is \(0\), not \(1\). So no. But \(x^2\) is real, even, and bounded by one, so it is the real part of an achievable response: \(x^2=\frac12(T_2+1)\), obtained as the real part of a suitable degree-2 sequence.
polynomial approximationparity constraint
The theorem’s conditions shape what algorithms can do. Where do they come from, and what do they forbid? Two matter constantly.
Boundedness. The response is an entry of a unitary, so its magnitude is at most \(1\). It must stay within \([-1,1]\) on the whole interval, not just where we care about it. To approximate an unbounded function like \(1/x\), we must restrict attention to a region where it is bounded after scaling, and accept an arbitrary bounded response elsewhere.
Parity. Why must the response be even or odd? Compare the signal operator at \(x\) and \(-x\). Conjugating by \(Z\) flips the sign of the off-diagonal entries, so \(W(-x)=-Z\,W(x)\,Z\). The \(Z\)-rotations commute with \(Z\), and \(Z^2=I\), so in \(U_\Phi(-x)\) the inner pairs of \(Z\) cancel and
\[U_\Phi(-x)=(-1)^d\,Z\,U_\Phi(x)\,Z.\]
Taking the top-left entry, where \(Z\) contributes \(+1\) on both sides, gives \(P(-x)=(-1)^dP(x)\). Each call flips the parity. This parity constraint means that a function with no symmetry, like \(e^{-ixt}\), must be split into even and odd parts, \(\cos(xt)\) and \(-i\sin(xt)\), each implemented separately and recombined with a linear combination of unitaries, at a constant-factor cost in success probability.
Within these constraints, the design problem is classical polynomial approximation: find a low-degree bounded polynomial close to the desired function on the relevant region. The degree is the number of signal calls, so it is the algorithm’s query cost. Chebyshev polynomials are the natural tool, because they are bounded on \([-1,1]\) and form a basis; truncating a function’s Chebyshev expansion gives near-optimal approximations. A smooth function on \([-1,1]\) needs low degree; a function with a sharp jump, or one that varies rapidly, needs high degree.
Split \(f(x)=e^{-ixt}\) into even and odd parts.
Even part \(\frac12(f(x)+f(-x))=\cos(xt)\). Odd part \(\frac12(f(x)-f(-x))=-i\sin(xt)\). Each is bounded by one on \([-1,1]\).
Why does the parity constraint not prevent us from approximating \(x^2+x\)?
Implement \(x^2\) (even) and \(x\) (odd) as separate sequences and combine them by LCU: \(\frac12(x^2)+\frac12(x)\) is block-encoded with subnormalization \(1\), so \(x^2+x\) is encoded as \(\frac12(x^2+x)\). Its magnitude can reach 2 at \(x=1\), and the factor \(\frac12\) keeps the block valid.
The step function \(\mathrm{sign}(x)\) jumps at \(0\). Why must any bounded polynomial approximating it within \(\epsilon\) on \(|x|\ge\Delta\) have degree growing as \(\Delta\to0\)?
A polynomial of degree \(d\) bounded by one on \([-1,1]\) has derivative at most \(d^2\) there (Markov’s inequality), and near the middle of the interval at most about \(d\). To climb from about \(-1\) to about \(+1\) across an interval of width \(2\Delta\), it needs slope about \(1/\Delta\), so \(d\) must grow at least like \(1/\Delta\). The known optimum is \(d=O(\log(1/\epsilon)/\Delta)\).
8.2
Signal processing acted on one number. To act on a matrix, we need a block encoding to behave, on each eigenvalue separately, like the signal operator \(W(x)\). What would that achieve? We first say what applying a function to a matrix means. Then we show that one reflection added to a block encoding produces a separate rotation for each eigenvalue, so a phase sequence acts on all of them at once. Matrices that are not Hermitian, or not square, need singular values in place of eigenvalues, and the same idea extends to them.
What does it mean to apply a function to a matrix? Let \(H\) be Hermitian with spectral decomposition \(H=\sum_j\lambda_j\ket{v_j}\bra{v_j}\). A function of \(H\) is defined eigenvalue by eigenvalue:
\[f(H)=\sum_jf(\lambda_j)\ket{v_j}\bra{v_j}.\]
For a polynomial this agrees with the obvious definition, since \(H^k\ket{v_j}=\lambda_j^k\ket{v_j}\). Applying \(f(H)\) to a state \(\ket\psi=\sum_jc_j\ket{v_j}\) multiplies each component by \(f(\lambda_j)\), without measuring which component is present. An eigenvalue transformation is a circuit that block-encodes \(f(H/\alpha)\) given a block encoding of \(H/\alpha\).
Three choices of \(f\) cover most applications. A step function that is \(1\) on some eigenvalues and \(0\) on others projects onto an eigenspace: a filter. The function \(1/x\) inverts \(H\), solving linear systems. The function \(e^{-ixt}\) gives time evolution. Phase estimation, by contrast, measures eigenvalues one sample at a time. Polynomial transformations process all eigenvalues coherently and keep the superposition.
For \(H=Z\), write \(f(H)\) for \(f(x)=x^2\) and for \(f(x)=e^{-ixt}\).
Eigenvalues \(\pm1\) on \(\ket0,\ket1\). \(f(Z)=Z^2=I\) for \(x^2\). For the exponential, \(\mathrm{diag}(e^{-it},e^{it})\).
Apply \(f(H)=H^2\) to \(\ket\psi=\frac{1}{\sqrt2}(\ket{v_1}+\ket{v_2})\) with \(\lambda_1=0.9\), \(\lambda_2=0.1\). What fraction of the output’s squared length comes from \(\ket{v_1}\)?
The output is \(\frac{1}{\sqrt2}(0.81\ket{v_1}+0.01\ket{v_2})\). Squared weights \(0.6561\) and \(0.0001\): the \(\ket{v_1}\) fraction is about \(0.99985\). Even a low-degree polynomial strongly favours the larger eigenvalue, the principle of filters.
Why can \(f(H)\) not be implemented, in general, by phase estimation followed by multiplying each outcome by \(f(\lambda)\)?
Phase estimation followed by measurement collapses the state onto one eigenvector, destroying the superposition \(\sum_jc_jf(\lambda_j)\ket{v_j}\). Without measuring, phase estimation can be used coherently (compute \(\lambda\) into a register, rotate an ancilla by \(f(\lambda)\), uncompute), which works but has precision costs of order \(1/\epsilon\) in phase resolution. Polynomial methods avoid the intermediate eigenvalue register and often achieve better scaling in precision.
Suppose \(U\) is a block encoding of \(H/\alpha\) that is also Hermitian, \(U^2=I\), as LCU encodings with Hermitian SELECT are. Define
\[W=R\,U,\qquad R=(2\ket{0^a}\bra{0^a}-I)\otimes I,\]
the block encoding followed by a reflection about the ancilla being zero. What does \(W\) do near one eigenvector? Take \(\ket{v_j}\) with eigenvalue \(\lambda_j\), write \(x_j=\lambda_j/\alpha\), and let \(\ket{0_j}=\ket{0^a}\ket{v_j}\). The ancilla-zero block of \(U\) is \(H/\alpha\), so the part of \(U\ket{0_j}\) with ancilla zero is \(x_j\ket{0_j}\). The rest is orthogonal to every ancilla-zero state:
\[U\ket{0_j}=x_j\ket{0_j}+\sqrt{1-x_j^2}\,\ket{\perp_j},\]
where \(\ket{\perp_j}\) is normalized with its ancilla orthogonal to \(\ket{0^a}\) (when \(|x_j|<1\)). Where does \(U\) send \(\ket{\perp_j}\)? Apply \(U\) to both sides and use \(U^2=I\):
\[\ket{0_j}=x_jU\ket{0_j}+\sqrt{1-x_j^2}\,U\ket{\perp_j},\qquad\text{so}\qquad U\ket{\perp_j}=\sqrt{1-x_j^2}\,\ket{0_j}-x_j\ket{\perp_j}.\]
So the plane spanned by \(\ket{0_j}\) and \(\ket{\perp_j}\) is mapped to itself. In the basis \((\ket{0_j},\ket{\perp_j})\), \(R\) is \(\mathrm{diag}(1,-1)\), and
\[U=\begin{pmatrix}x_j&\sqrt{1-x_j^2}\\\sqrt{1-x_j^2}&-x_j\end{pmatrix},\qquad W=RU=\begin{pmatrix}x_j&\sqrt{1-x_j^2}\\-\sqrt{1-x_j^2}&x_j\end{pmatrix}.\]
This is the same calculation we did for the Grover iterate: \(W\) is a rotation with eigenvalues \(e^{\pm i\theta_j}\), where
\[\cos\theta_j=\frac{\lambda_j}{\alpha}.\]
Changing the phase of \(\ket{\perp_j}\) by \(i\) turns this matrix into the signal operator \(W(x_j)\), and that change commutes with \(Z\)-rotations, which in each plane are what phase rotations about the ancilla-zero state become.
Each eigenvalue of \(H\) has its own two-dimensional “qubit”, which is the origin of the name qubitization (Low and Chuang, 2019). Within each plane, \(W\) behaves exactly like the signal operator \(W(x)\) with \(x=\lambda_j/\alpha\). So interleaving \(W\) with phase rotations on the ancilla implements \(P(\lambda_j/\alpha)\) on every eigenvector at once: a quantum signal processing sequence acting on all planes in parallel.
The relation \(\cos\theta=\lambda/\alpha\) is the same one we met for Szegedy’s walk, and \(W\) is in fact a quantum walk built from the block encoding. Phase estimation on \(W\) estimates \(\theta_j\), hence \(\lambda_j=\alpha\cos\theta_j\), without ever implementing \(e^{-iHt}\). This is the basis of efficient energy estimation for chemistry: the cost per step is one block encoding, and precision \(\epsilon\) in \(\lambda\) needs about \(\alpha/\epsilon\) steps.
For a two-qubit Hamiltonian with \(\lambda=0.8\) and eigenvalues \(\pm\sqrt{0.34}\approx\pm0.583\), what eigenphases does the qubitized walk have?
\(\cos\theta=\pm0.583/0.8=\pm0.729\), so \(\theta\approx0.754\) and \(\pi-0.754\approx2.388\) radians, each appearing with both signs \(\pm\theta\). (This is \(H=0.5ZZ-0.3XI\); a direct numerical check confirms these values.)
Why must the ancilla reflection \(R\) appear between uses of \(U\)? What goes wrong with \(U^2\)?
\(U^2=I\) for a Hermitian block encoding, so repeating it does nothing: the failure amplitude of the first use is mapped back exactly. The reflection flips the sign of the failure branch, which turns the product into a rotation by \(\theta_j\) rather than an involution, so repeated steps accumulate the eigenvalue information.
If \(\alpha\) is much larger than \(\|H\|\), all \(\lambda_j/\alpha\) are close to zero. What happens to the eigenphases, and to the cost of resolving them?
\(\theta_j=\arccos(\lambda_j/\alpha)\) are all close to \(\pi/2\), and differences \(\Delta\lambda\) become phase differences of about \(\Delta\lambda/\alpha\). Resolving them needs about \(\alpha/\Delta\lambda\) steps. A wasteful subnormalization costs linearly in steps, which is why reducing the 1-norm \(\lambda\) of chemistry Hamiltonians matters so much.
singular valuequantum singular value transformation
What replaces eigenvalues for a matrix that is not Hermitian, or not even square? Every matrix has a singular value decomposition, a linear-algebra result we assume: orthonormal input directions \(\ket{w_j}\), orthonormal output directions \(\ket{u_j}\), and nonnegative stretch factors \(\sigma_j\), with
\[A\ket{w_j}=\sigma_j\ket{u_j}.\]
The \(\sigma_j\) are the singular values. Since \(A^\dagger A\ket{w_j}=\sigma_j^2\ket{w_j}\), their squares are the eigenvalues of \(A^\dagger A\), so the largest is \(\|A\|\), as we found for the operator norm. For a Hermitian matrix they are the absolute eigenvalues. Geometrically, \(A\) rotates the input directions to output directions and stretches each by \(\sigma_j\).
The quantum singular value transformation (QSVT), a quoted theorem of Gilyén, Su, Low, and Wiebe (2019) applies a polynomial to the singular values. Given a block encoding \(U\) of \(A/\alpha\), alternate \(U\) and \(U^\dagger\) with phase rotations controlled by the projectors that define the block. For an odd polynomial \(P\) of degree \(d\), the result block-encodes
\[P^{(SV)}(A/\alpha)=\sum_jP(\sigma_j/\alpha)\ket{u_j}\bra{w_j},\]
which maps input directions to output directions with stretch factors transformed by \(P\). For even \(P\), it maps input directions back to input directions, \(\sum_jP(\sigma_j/\alpha)\ket{w_j}\bra{w_j}\). The parity decides which space the result lives in.
QSVT unifies the earlier techniques. Amplitude amplification is QSVT applied to a \(1\times1\) block, the single number \(\sin\theta\), with the Chebyshev polynomial that maps \(\sin\theta\) toward \(1\). Fixed-point amplification uses a polynomial that approximates a step. Phase estimation, Hamiltonian simulation, and linear-system solving are further polynomial choices. One framework, with its conditions and costs, gives a common language for all of them.
Give the singular values of \(A=\begin{pmatrix}0&2\\0&0\end{pmatrix}\) and the directions \(\ket{w},\ket{u}\).
\(A\ket1=2\ket0\) and \(A\ket0=0\). Singular values \(2\) and \(0\), with \(\ket{w_1}=\ket1\), \(\ket{u_1}=\ket0\) for \(\sigma_1=2\), and \(\ket{w_2}=\ket0\) for \(\sigma_2=0\).
Explain how ordinary amplitude amplification is a singular value transformation of the number \(\sin\theta\).
Treat \(\bra{G}A\ket{0}=\sin\theta\) as a \(1\times1\) block of the preparation \(A\), with projectors onto \(\ket0\) and onto the good subspace. Alternating \(A\), \(A^\dagger\), and \(-1\) phases on those projectors applies the odd Chebyshev polynomial \(T_{2k+1}\) in the variable \(\sin\theta\), with \(|T_{2k+1}(\sin\theta)|=|\sin((2k+1)\theta)|\) (up to sign conventions). Choosing different phases changes the polynomial.
An algorithm needs \(A^{-1}\) for a non-square \(A\). What does QSVT provide instead, and when is it meaningful?
A non-square matrix has no inverse. An odd QSVT polynomial approximating \(c/x\) on singular values gives \(\sum_j\frac{c}{\sigma_j}\ket{w_j}\bra{u_j}\), the (scaled) pseudoinverse, which maps outputs back to inputs. It is meaningful on the span of directions with \(\sigma_j\) bounded away from zero; directions with zero singular value are sent to zero.
8.3
With qubitization, choosing an algorithm means choosing a polynomial. What does each choice cost? The degree multiplies the cost of one block encoding, and the success probability of the result sets the repetitions or amplification. So each design states the function wanted, the region of the spectrum where it must be accurate, and the degree needed there. We apply this to three functions in turn: a step, which isolates part of a spectrum; an inverse, which solves linear systems; and an exponential, which simulates evolution.
Suppose the eigenvalues of \(H/\alpha\) are known to avoid an interval \((\mu-\Delta,\mu+\Delta)\), and we want to project a state onto the eigenvectors with eigenvalues below \(\mu\). The ideal function is a step: \(1\) below \(\mu\), \(0\) above. A spectral filter is a bounded polynomial that approximates this step within \(\epsilon\) outside the gap. How high must its degree be? A polynomial cannot jump, so we approximate a smooth S-shaped curve whose rise is confined to the gap. A quoted approximation result (Gilyén, Su, Low, and Wiebe, 2019) gives degree
\[d=O\!\left(\frac1\Delta\log\frac1\epsilon\right).\]
A narrower gap requires a steeper polynomial and higher degree; higher precision costs only logarithmically.
Filters prepare ground states. If a trial state has overlap \(\gamma\) with the ground state and the ground energy is separated from the rest by an energy gap, filtering below the midpoint of the gap leaves the ground state with success amplitude about \(\gamma\). With amplitude amplification the total cost is about \(\frac1\gamma\cdot\frac{\alpha}{\Delta_E}\log\frac1\epsilon\) block encodings, where \(\Delta_E\) is the energy gap (Lin and Tong, 2020). The same two quantities appear as in phase estimation on a superposition of eigenstates: the overlap of the initial state, and the spectral resolution required. Filtering does not remove the need for a good trial state; it uses it more efficiently than repeated phase estimation.
A filter must separate eigenvalues \(0.1\) and \(0.12\) of \(H/\alpha\). How does the required degree compare with separating \(0.1\) and \(0.3\), at the same \(\epsilon\)?
The gaps are \(0.02\) and \(0.2\); degree scales as \(1/\Delta\), so the first needs about ten times the degree, ten times as many block-encoding calls.
Why is a filter polynomial’s value inside the gap irrelevant?
No eigenvalue lies in the gap, by assumption, so the polynomial is never evaluated there on any component of the state. Freedom in the gap is exactly what allows a polynomial (which must be continuous) to switch from about \(1\) to about \(0\).
If the gap assumption is false and an eigenvalue sits inside it, what does the filter do to that component?
It multiplies it by whatever value the polynomial takes there, somewhere between about \(0\) and \(1\). The output is then a partial projection, mixing in an unwanted component with unknown weight. Algorithms must state and justify the gap assumption, or use a filter whose failure mode is detected.
quantum linear systemscondition number
The quantum linear systems problem: given a block encoding of an invertible matrix \(A\) and a preparation circuit for \(\ket b\), produce a state proportional to \(A^{-1}\ket b\). Assume \(A\) has singular values in \([1/\kappa,1]\) after scaling; \(\kappa\) is the condition number, the ratio of largest to smallest singular value.
The function \(1/x\) is unbounded, so approximate the scaled function \(\frac{1}{\kappa x}\) on \(1/\kappa\le|x|\le1\), where it lies in \([1/\kappa,1]\), and let the polynomial do anything bounded on \(|x|<1/\kappa\). A quoted approximation result (Childs, Kothari, and Somma, 2017) gives an odd polynomial of degree \(O(\kappa\log(\kappa/\epsilon))\). Applying it gives a block encoding of \(A^{-1}/\kappa\) (roughly), and postselection succeeds with probability \(\|A^{-1}b\|^2/\kappa^2\), at least \(1/\kappa^2\). Amplitude amplification brings the number of repetitions to order \(\kappa\), for a total of order \(\kappa^2\log(\kappa/\epsilon)\) block-encoding calls; more refined methods reach the optimal order \(\kappa\log(1/\epsilon)\).
The first algorithm of this kind was Harrow, Hassidim, and Lloyd (2009), using phase estimation; polynomial methods improved its dependence on precision. The output is a quantum state, and the caveats about state outputs apply in full. Reading all \(N\) entries of the solution would cost order \(N\) repetitions. The algorithm is useful when the next step needs only a few numbers, such as an expectation value \(\bra xM\ket x\), and when \(A\) has an efficient block encoding with small \(\kappa\) and \(\ket b\) is cheap to prepare. Aaronson’s “read the fine print” (Nature Physics, 2015) lists these conditions; each one can erase the advantage.
For \(A=\mathrm{diag}(1,0.1)\) and \(\ket b=\ket+\), what is the normalized solution state, and what is \(\kappa\)?
\(A^{-1}\ket b=\frac{1}{\sqrt2}(\ket0+10\ket1)\), normalized \(\frac{1}{\sqrt{101}}(\ket0+10\ket1)\). \(\kappa=10\).
In that example, what is the postselection success probability with the block encoding of \(A^{-1}/\kappa\)?
\(\|A^{-1}b/\kappa\|^2=\frac{1}{100}\cdot\frac{1}{2}(1+100)=0.505\). Here success is high because the solution is dominated by the small singular value. If \(\ket b\) were \(\ket0\), it would be \(1/\kappa^2=0.01\).
An application wants all \(N=10^6\) entries of the solution to accuracy \(10^{-3}\). Why does the quantum algorithm not help?
Estimating each squared amplitude to \(10^{-3}\) relative precision requires on the order of \(N\cdot10^6\) repetitions by sampling, each including the full algorithm. Conjugate-gradient-type classical solvers for sparse well-conditioned systems already cost about \(N\sqrt\kappa\) operations. The quantum advantage requires a small classical output.
Jacobi–Anger expansionoptimal simulation
To simulate \(e^{-iHt}\), apply \(f(x)=e^{-i\alpha tx}\) to the block encoding of \(H/\alpha\). Split it into \(\cos(\alpha tx)\) and \(-i\sin(\alpha tx)\), each bounded and of definite parity. Their Chebyshev expansions are known in closed form, the Jacobi–Anger expansion:
\[\cos(\tau x)=J_0(\tau)+2\sum_{k\ge1}(-1)^kJ_{2k}(\tau)T_{2k}(x),\qquad\sin(\tau x)=2\sum_{k\ge0}(-1)^kJ_{2k+1}(\tau)T_{2k+1}(x),\]
where the coefficients \(J_k(\tau)\) are standard named functions, the Bessel functions. We need only one property, which we quote: \(J_k(\tau)\) becomes tiny once \(k\) exceeds \(\tau\), and then decays faster than exponentially. For \(\tau=10\), \(|J_{10}|\approx0.21\), \(|J_{14}|\approx0.012\), \(|J_{18}|\approx1.5\times10^{-4}\) and \(|J_{25}|\approx7\times10^{-9}\). Truncating at degree \(d\approx e\tau/2+\log(1/\epsilon)\) gives error \(\epsilon\), again as a quoted bound. With \(\tau=\alpha t\),
\[d=O\!\left(\alpha t+\log\frac1\epsilon\right).\]
This additive dependence, time plus log precision rather than a product, is optimal: quoted lower bounds show that simulation for time \(t\) needs order \(\alpha t\) queries, and order \(\log(1/\epsilon)/\log\log(1/\epsilon)\) for precision. Qubitization with QSP achieves it with only a few ancillas (Low and Chuang). The cost is stated in block-encoding calls; each call’s gate count, the subnormalization \(\alpha\), and the phase precision must be added for a full count. This optimal simulation must still be compared with simpler methods that use no block encodings at all.
For \(\alpha t=100\) and \(\epsilon=10^{-10}\), estimate the degree.
\(e\cdot100/2+\ln(10^{10})\approx136+23\approx159\), so roughly 160 block-encoding calls for each of the even and odd parts (with constants depending on the exact bound used).
Why does the degree depend on \(\alpha t\) rather than on \(t\) alone?
The polynomial acts on \(x=\lambda/\alpha\in[-1,1]\), and the target is \(e^{-i(\alpha t)x}\), which oscillates about \(\alpha t/\pi\) times over the interval. A polynomial needs roughly one degree per half-oscillation. Rescaling \(H\) by \(c\) and \(t\) by \(1/c\) leaves \(\alpha t\) unchanged, so there is no free speedup.
Explain why simulation for time \(t\) cannot in general use fewer than order \(\alpha t\) block-encoding calls.
If it could, one could simulate for long times cheaply and use the simulation to solve problems known to require many queries, such as computing the parity of many bits encoded in a Hamiltonian (a known no-fast-forwarding argument). Intuitively, information propagates at a rate set by \(\|H\|\), and each block-encoding call can carry only bounded information.
Attempt each question before opening a hint. Explain your reasoning, then compare it with the solution.
What is the top-left entry of W(x)³, and its value at x = 0.5?
W^d has top-left entry T_d(x).
T₃(x) = 4x³ − 3x.
T₃(0.5) = 4(0.125) − 1.5 = −1. Equivalently, x = cos(π/3), and cos(3·π/3) = cos π = −1.
Which of these real targets can be the real part of a QSP response with exactly the stated number of signal calls? (a) \(0.5x\) with \(d=1\); (b) \(x^3\) with \(d=2\); (c) \(1.2x^2-0.2\) with \(d=2\); (d) \(1.5x\) with \(d=1\). Give the reason in each case.
Check degree, parity, and \(|P(x)|\le1\) on all of \([-1,1]\).
For (c), find the extreme values on the interval.
(a) Yes: degree \(1\), odd like \(d=1\), and \(|0.5x|\le0.5\). (b) No: the degree \(3\) exceeds \(d\), and the parity is odd while \(d\) is even. (c) Yes: degree \(2\), even, and on \([-1,1]\) it ranges from \(-0.2\) (at \(x=0\)) to \(1\) (at \(x=\pm1\)), so it is bounded by \(1\). (d) No: \(|1.5x|\) reaches \(1.5\) at \(x=\pm1\). A response is an entry of a unitary, so it can never exceed \(1\) anywhere on the interval, even at points the algorithm does not care about.
A Hermitian block encoding of \(H/\alpha\) with \(\alpha=2\) is qubitized. \(H\) has eigenvalues \(1\) and \(-1\). Find the eigenphases of the walk \(W=RU\) in each eigenvalue’s plane, and the phase separation that phase estimation must resolve to tell the eigenvalues apart.
\(\cos\theta_j=\lambda_j/\alpha\).
Each plane contributes the eigenvalues \(e^{\pm i\theta_j}\).
\(\cos\theta=1/2\) gives \(\theta=\pi/3\), and \(\cos\theta=-1/2\) gives \(\theta=2\pi/3\). So the walk has eigenvalues \(e^{\pm i\pi/3}\) in the first plane and \(e^{\pm2\pi i/3}\) in the second. The nearest phases from different planes, \(\pi/3\) and \(2\pi/3\), differ by \(\pi/3\), a sixth of a full turn. Phase estimation resolves that with only a few walk steps. Each estimate \(\tilde\theta\) gives \(\lambda=\alpha\cos\tilde\theta\); the sign ambiguity \(\pm\theta\) does not matter, since cosine is even.
A block encoding of H/α has α = 50, and the eigenvalues of H of interest are 1.0 and 1.2. Phase estimation on the qubitized walk is used to distinguish them. Estimate the walk eigenphase difference and the number of walk steps needed.
θ = arccos(λ/α), and near λ/α ≈ 0 the derivative of arccos is about −1.
Distinguishing phases separated by Δθ needs about 1/Δθ steps.
θ₁ = arccos(0.02) and θ₂ = arccos(0.024), differing by about 0.004 radians. Phase estimation must resolve 0.004, which needs on the order of 1/0.004 = 250 walk steps (a few times more for good confidence). Equivalently, α/Δλ = 50/0.2 = 250.
The two-call sequence \(W(x)e^{i\phi Z}W(x)\) has top-left entry \(P_\phi(x)=\cos\phi\,(2x^2-1)+i\sin\phi\). (a) Choose \(\phi\) so the real part is \(0.6\,T_2(x)\), and give the imaginary part. (b) Show that averaging the sequences with phases \(\phi\) and \(-\phi\) by a two-term LCU isolates the real part. (c) What is the subnormalization of the result?
\(\cos\phi=0.6\) gives \(\sin\phi=0.8\).
\(P_{-\phi}(x)=\cos\phi\,T_2(x)-i\sin\phi\).
(a) With \(\cos\phi=0.6\), the real part is \(0.6T_2(x)\) and the imaginary part is the constant \(\sin\phi=0.8\), so \(|P_\phi|^2=0.36T_2^2+0.64\). Measuring would mostly reflect the unwanted constant. (b) The sequence with \(-\phi\) gives \(P_{-\phi}=0.6T_2-0.8i\). An LCU with weights \(\frac12,\frac12\) block-encodes \(\frac12(P_\phi+P_{-\phi})=0.6\,T_2(x)\), the real part alone. (c) The LCU coefficients sum to \(1\), so the subnormalization is \(1\): the encoded number is exactly \(0.6T_2(x)\). The price is one extra ancilla and controlled phase rotations, and the success probability is \(0.36\,T_2(x)^2\). This is the extra-qubit trick the theorem refers to when it promises real targets.
Let \(A=\begin{pmatrix}0&1\\\tfrac12&0\end{pmatrix}\). (a) Find its singular values and the input and output directions. (b) Compute \(P^{(SV)}(A)\) for the odd polynomial \(P=T_3\) and the even version \(\sum_jP(\sigma_j)\ket{w_j}\bra{w_j}\) for \(P=T_2\). Which spaces do the two results map between?
\(A\ket1=\ket0\) and \(A\ket0=\frac12\ket1\).
\(T_3(1)=1\), \(T_3(\tfrac12)=-1\); \(T_2(1)=1\), \(T_2(\tfrac12)=-\tfrac12\).
(a) \(A\ket1=1\cdot\ket0\) and \(A\ket0=\frac12\ket1\). So \(\sigma_1=1\) with \(\ket{w_1}=\ket1\), \(\ket{u_1}=\ket0\), and \(\sigma_2=\frac12\) with \(\ket{w_2}=\ket0\), \(\ket{u_2}=\ket1\). (b) For \(T_3\), \(T_3(1)=1\) and \(T_3(\frac12)=4\cdot\frac18-\frac32=-1\), so \(T_3^{(SV)}(A)=\ket0\bra1-\ket1\bra0\). It maps input directions to output directions, like \(A\) itself, with new stretch factors. For \(T_2\), \(T_2(1)=1\) and \(T_2(\frac12)=-\frac12\), giving \(\ket1\bra1-\frac12\ket0\bra0\). It maps the input space to itself, as \(A^\dagger A\) does. The odd transformation changed the singular value \(\frac12\) to magnitude \(1\): QSVT can enlarge singular values, provided the polynomial stays bounded.
For \(\tau=\alpha t=10\), the Jacobi–Anger coefficients are \(J_{10}(10)\approx0.21\), \(J_{15}(10)\approx4.5\times10^{-3}\), \(J_{20}(10)\approx1.2\times10^{-5}\), and \(J_{25}(10)\approx7\times10^{-9}\). (a) Estimate the truncation degree for error \(10^{-6}\) from the rule \(d\approx e\tau/2+\ln(1/\epsilon)\). (b) Using the listed values, judge where the series can actually be cut. (c) How does the degree change if \(\tau\) doubles, or if \(\epsilon\) becomes \(10^{-12}\)?
The tail of the series is dominated by its first omitted coefficient.
The cost is additive in \(\tau\) and \(\log(1/\epsilon)\).
(a) \(e\cdot10/2+\ln10^6\approx13.6+13.8\approx27\). (b) The coefficients fall from \(0.2\) at \(k=10\) to about \(10^{-5}\) at \(k=20\) and below \(10^{-8}\) at \(k=25\). The tail beyond degree \(22\) or so is already below \(10^{-6}\), so the rule is a safe overestimate. Up to \(k\approx\tau\) the coefficients are not small; beyond it they decay faster than exponentially. (c) Doubling \(\tau\) roughly doubles the degree, because the cutoff sits a little beyond \(k\approx\tau\). Squaring the precision to \(10^{-12}\) adds only a few more terms, because of the super-exponential decay. This is the additive scaling \(O(\alpha t+\log(1/\epsilon))\) in concrete numbers.
A student reasons: “Every QSP response satisfies \(|P(x)|\le1\), so a polynomial transformation can only shrink singular values; it can never turn a small singular value into a large one.” Test this with \(P(x)=3x-4x^3=-T_3(x)\). What does it do to \(x=\frac12\), and which earlier algorithm is this?
Check that \(|3x-4x^3|\le1\) on \([-1,1]\).
Write \(x=\sin\theta\): \(3\sin\theta-4\sin^3\theta=\sin3\theta\).
\(P(\frac12)=\frac32-\frac12=1\), so a singular value \(\frac12\) becomes \(1\). On \([-1,1]\), \(P(\sin\theta)=\sin3\theta\), so \(|P|\le1\) everywhere. The bound limits the output, not the ratio of output to input. Near \(0\), \(P(x)\approx3x\), so small values are tripled. Writing the input as \(\sin\theta\), the transformation \(\sin\theta\mapsto\sin3\theta\) is exactly one round of amplitude amplification. Polynomials can amplify small values as long as they stay bounded on the whole interval; boundedness is why the amplification has to slow down near \(1\).
A linear system has κ = 100. Estimate the number of block-encoding calls for the polynomial-inversion algorithm with amplitude amplification, taking the polynomial degree to be κ ln(κ/ε) with ε = 10⁻³, and the amplification count to be κ. Then state what output the algorithm produces.
Degree ≈ 100 × ln(10⁵).
Total ≈ degree × amplification count.
Degree ≈ 100 × 11.5 ≈ 1150; amplification needs about 100 rounds, each using the polynomial sequence and its inverse, so about 2 × 1150 × 100 ≈ 2.3 × 10⁵ block-encoding calls (methods with optimal κ log(1/ε) scaling reduce this to about 10³–10⁴). The output is a quantum state proportional to A⁻¹|b⟩, not the vector of solution entries; extracting a classical quantity such as ⟨x|M|x⟩ to precision δ costs further repetitions of order 1/δ with amplitude estimation.
A trial state has overlap \(\gamma=0.1\) with the ground state of \(H\). The block encoding has \(\alpha=100\), the gap is \(\Delta_E=0.5\), and the target error is \(\epsilon=10^{-3}\). Compare, up to constant factors: (a) repeated phase estimation on the qubitized walk, which succeeds with probability \(\gamma^2\) per run and needs about \(\alpha/\Delta_E\) walk steps to resolve the gap; and (b) a spectral filter of degree \((\alpha/\Delta_E)\ln(1/\epsilon)\) combined with amplitude amplification. What does each method output, and which assumption do both share?
(a) costs about \((1/\gamma^2)(\alpha/\Delta_E)\).
(b) costs about \((1/\gamma)(\alpha/\Delta_E)\ln(1/\epsilon)\).
(a) Each run costs about \(\alpha/\Delta_E=200\) walk steps and succeeds with probability \(\gamma^2=0.01\), so about \(100\times200=2\times10^4\) calls are expected (more for high confidence). (b) The filter has degree about \(200\ln10^3\approx1.4\times10^3\). Its success amplitude is about \(\gamma\), so amplitude amplification needs about \(1/\gamma=10\) rounds: about \(1.4\times10^4\) calls. The advantage of (b) grows as \(\gamma\) falls, since \(1/\gamma\) replaces \(1/\gamma^2\). Its \(\ln(1/\epsilon)\) factor is the cost of a sharp filter. Method (a) outputs an energy estimate and a collapsed state; method (b) outputs the ground state coherently, to precision \(\epsilon\), ready for later processing. Both assume a trial state with known nonnegligible overlap and a known gap; neither helps if preparing such a state is the hard part.
Where this leads. the Evolution Engineering chapter compares polynomial simulation with product formulas, which build evolution from short evolutions of simple terms, and with adiabatic evolution, which changes the Hamiltonian itself.