Every operation so far has been unitary. Kickback, the Fourier transform, reflections and walks all preserve the length of every state, and phase estimation reads the eigenvalues of unitaries.
Many of the problems we would like to solve are about matrices that are not unitary: a Hamiltonian whose eigenvalues we want, a system of linear equations to invert, a projector to apply. A quantum circuit preserves lengths, and these matrices change them. How can a circuit apply a matrix that does not preserve length?
We find that it can if the missing length is sent into another branch: the matrix becomes one block of a larger unitary, acting on the system together with ancilla qubits, and it takes effect when the ancillas return to zero. To build such block encodings we add unitaries coherently with an ancilla that chooses the term, which covers Hamiltonians written as sums of Pauli strings. Encodings of two matrices then multiply, their errors add, and when the encoded matrix is proportional to a unitary its success probability can be raised to one without knowing the input. Finally we ask what it costs to supply an encoding when the matrix is given by a rule or as stored data, which decides whether a claimed speedup survives.
A block encoding applies its matrix once, and most algorithms want a function of the matrix instead.
How can a unitary circuit represent a transformation that is not unitary?
A block encoding is the interface between matrices and circuits: it makes clear what an algorithm consumes, and what supplying that costs.
Reading guide · preparation, aims, and assumptions
Represent matrices that are not unitary as blocks of unitaries, build such block encodings from sums of unitaries, compose them, and account for subnormalization, success probability, and access costs.
Before you begin
Use clean subroutines and controlled operations (Coherent Computation), operator-norm error bounds (Phase Encoding), and amplitude amplification (Amplitude Manipulation).
What you should be able to do
Explain why a non-unitary matrix cannot be applied deterministically and define its operator norm.
Verify a block encoding and compute postselection success probabilities.
Construct LCU block encodings with PREPARE and SELECT and compute their 1-norm subnormalization.
Distinguish a coherent linear combination from a random choice of unitaries.
Compose block encodings with separate ancillas and bound their errors.
Apply oblivious amplitude amplification when the encoded matrix is proportional to a unitary.
Identify the access assumptions behind a block encoding and when dequantization applies.
The example to follow
The one-ancilla encoding of diag(1, 1/2), and the LCU encoding of (I + X)/2, which turns |0⟩ into |+⟩ with probability 1/2 where a random choice would give a mixture.
Scope and assumptions
Block encodings are assumed exact unless an error is stated. Costs depend on the access model; the cost of QRAM or data loading is not included in query counts.
7.1
Unitary Embeddings
What exactly goes wrong when we try to apply a matrix that changes lengths? A two-by-two example shows the obstacle and suggests where the missing length could go. Adding one ancilla qubit makes that idea a definition, the block encoding. The price appears when we try to keep only the branch where the matrix acted: it succeeds only with some probability, which depends on the input.
On \(\ket0\) it does nothing; on \(\ket1\) it halves the amplitude. A unitary preserves the length of every vector, but \(A\ket1=\frac12\ket1\) has length \(\frac12\). So no unitary on this qubit equals \(A\), even up to a phase: \(A\) is a non-unitary matrix. Worse, \(A\) shrinks different inputs by different amounts: \(A\ket+=\frac{1}{\sqrt2}(\ket0+\frac12\ket1)\) has squared length \(\frac58\). Normalizing the output afterwards does not make a linear operation.
How much can a matrix stretch a vector? The operator norm, which we used to measure errors, answers this:
\[\|A\|=\max_{\|\psi\|=1}\|A\ket\psi\|.\]
For our diagonal \(A\), \(\|A\|=1\), attained on \(\ket0\). For a diagonal matrix it is the largest absolute entry, and for a Hermitian matrix it is the largest absolute eigenvalue. In general, \(\|A\ket\psi\|^2=\bra\psi A^\dagger A\ket\psi\), and \(A^\dagger A\) is Hermitian with nonnegative eigenvalues. Expanding \(\ket\psi\) in its eigenvectors shows that the largest value of \(\bra\psi A^\dagger A\ket\psi\) is its largest eigenvalue, so \(\|A\|\) is the square root of that eigenvalue. A unitary has \(\|U\|=1\) and also shrinks nothing.
\(A=\mathrm{diag}(1,\tfrac12)\) leaves \(\ket0\) unchanged, halves \(\ket1\), and maps \(\ket+\) to a vector of length \(\sqrt{5/8}\) pointing closer to \(\ket0\). No unitary, which preserves every length, can do this. (Vectors are drawn at unit length; the legend gives the true lengths.)
The obstacle, then, is that we want to apply a linear map that changes lengths, using only length-preserving operations. The idea that resolves it is to let the missing length go somewhere else: into a branch of a larger system that we later discard or recycle.
Problems
Find \(\|A\|\) for \(A=\mathrm{diag}(3,-5)\) and for \(A=\begin{pmatrix}0&2\\0&0\end{pmatrix}\).
Show solutionHide solution
For the diagonal matrix, \(\|A\|=5\), on \(\ket1\). For the second, \(A\ket1=2\ket0\) and \(A\ket0=0\); for a general unit vector \(a\ket0+b\ket1\), \(\|A\psi\|=2|b|\le2\). So \(\|A\|=2\).
Show that if \(A\) is unitary then \(\|A\psi\|=\|\psi\|\) for every \(\psi\), and give a non-unitary \(A\) with \(\|A\|=1\).
Show solutionHide solution
\(\|A\psi\|^2=\bra\psi A^\dagger A\ket\psi=\braket\psi\psi\). The diagonal \(\mathrm{diag}(1,\frac12)\) has \(\|A\|=1\) but is not unitary: it shrinks \(\ket1\). Norm one bounds stretching, not shrinking.
A student proposes to “apply \(A\)” by applying a unitary \(U\) and then renormalizing. Why can no unitary \(U\) satisfy \(U\ket\psi\propto A\ket\psi\) for every \(\psi\), with \(A=\mathrm{diag}(1,\frac12)\)?
Show solutionHide solution
Taking \(\psi=\ket0\) and \(\ket1\) forces \(U\ket0\propto\ket0\) and \(U\ket1\propto\ket1\), so \(U=\mathrm{diag}(e^{ia},e^{ib})\). Then \(U\ket+\propto\ket0+e^{i(b-a)}\ket1\), with equal magnitudes, while \(A\ket+\propto\ket0+\frac12\ket1\). No choice of phases matches. The relative weights of components are what \(A\) changes, and a diagonal unitary cannot.
Can a larger unitary carry \(A\) as one of its parts? Add one ancilla qubit. Order the basis with the ancilla first, so a two-qubit matrix splits into four \(2\times2\) blocks according to the ancilla’s input and output values. Take
Because \(A\) and \(B\) are diagonal they commute, and \(A^2+B^2=I\). Multiplying out, \[U^2=\begin{pmatrix}A^2+B^2&AB-BA\\BA-AB&B^2+A^2\end{pmatrix}=I.\] Since \(A\) and \(B\) are real and diagonal, \(U\) is real and symmetric, so \(U^\dagger=U\). Therefore \(U^\dagger U=U^2=I\): \(U\) is unitary, and its own inverse. On an input with the ancilla in \(\ket0\),
The ancilla-\(0\) branch carries exactly \(A\ket\psi\). The length that \(A\) removed has gone into the ancilla-\(1\) branch, where \(B\ket\psi\) supplies it: \(\|A\psi\|^2+\|B\psi\|^2=1\).
\(U\) acts on the ancilla and the system. With the ancilla starting in \(\ket0\), the ancilla-0 branch of the output is \(A\ket\psi/\alpha\) and the ancilla-1 branch carries the remaining length. Measuring the ancilla and keeping outcome 0 applies \(A\) up to normalization.
In general, a unitary \(U\) on \(a\) ancilla qubits and a system is a block encoding of a matrix \(A\) if
The top-left block of \(U\) is \(A/\alpha\). The number \(\alpha\ge\|A\|\) is the subnormalization: a block of a unitary cannot stretch any vector, so it must have norm at most \(1\), and a matrix with larger norm must be scaled down. If the block equals \(A/\alpha\) only to within \(\epsilon\) in operator norm, \(U\) is an \((\alpha,a,\epsilon)\)-block encoding. Every later algorithm that processes matrices assumes block encodings as input, so \(\alpha\), \(a\), \(\epsilon\), and the gate cost of \(U\) are the parameters a resource estimate must report.
Problems
Verify \(U\ket0\ket+\) for the example, and check that the two branches have total squared length one.
Show solutionHide solution
The ancilla-\(0\) branch is \(A\ket+=\frac{1}{\sqrt2}(\ket0+\frac12\ket1)\), squared length \(\frac58\). The ancilla-\(1\) branch is \(B\ket+=\frac{1}{\sqrt2}\cdot\frac{\sqrt3}{2}\ket1\), squared length \(\frac38\). Total \(1\).
Construct a one-ancilla block encoding of \(A=\mathrm{diag}(a_0,a_1)\) for any real \(|a_0|,|a_1|\le1\).
Show solutionHide solution
Let \(b_j=\sqrt{1-a_j^2}\) and \(B=\mathrm{diag}(b_0,b_1)\). Then \(U=\begin{pmatrix}A&B\\B&-A\end{pmatrix}\) is unitary, by the same calculation. As a circuit, it is a rotation of the ancilla controlled by the system qubit, with angle depending on whether the system is \(0\) or \(1\).
Can \(A=2I\) on one qubit have a block encoding with \(\alpha=1\)? What is the smallest possible \(\alpha\)?
Show solutionHide solution
No: the block would be \(2I\), which stretches every vector by \(2\), impossible inside a unitary. The smallest is \(\alpha=\|A\|=2\), with block \(I\) (for example \(U=I\) on the system with any ancilla).
How do we get \(A\ket\psi\) out as a state of its own? A block encoding applies \(A/\alpha\) only on the ancilla-\(0\) branch. To obtain \(A\ket\psi\) as a state, measure the ancilla and keep the run if the outcome is \(0\). This is postselection. The probability of success is
and on success the system holds the normalized state \(A\ket\psi/\|A\ket\psi\|\).
In the example with \(\ket\psi=\ket+\), success has probability \(\frac58\) and leaves \(\frac{1}{\sqrt5}(2\ket0+\ket1)\). With input \(\ket1\), success has probability \(\frac14\) and leaves \(\ket1\): the output state is the same as the input, but it was obtained only a quarter of the time. That input dependence is how a non-unitary map shows up in a unitary world: it is paid for in probability.
Success probability \(\|A\psi\|^2/\alpha^2\) (here \(\alpha=1\)) and the normalized output on success. The success probability depends on the input; it is the price of applying a non-unitary map.
Without further help, the expected number of attempts is \(1/p_{\text{succ}}=\alpha^2/\|A\psi\|^2\), and each failure destroys the input state, which must be prepared again. If the preparation is a known circuit, amplitude amplification reduces the cost to order \(\alpha/\|A\psi\|\) uses of \(U\), the preparation, and their inverses. Either way, two quantities control the cost: the subnormalization \(\alpha\), and how much \(A\) shrinks the particular input. A block encoding with an unnecessarily large \(\alpha\) wastes success probability quadratically.
Problems
For the example, which input maximizes the success probability, and which minimizes it?
Show solutionHide solution
\(p_{\text{succ}}=|a|^2+\frac14|b|^2\) for \(\psi=a\ket0+b\ket1\). It is maximized (\(=1\)) at \(\ket0\) and minimized (\(=\frac14\)) at \(\ket1\).
A block encoding has \(\alpha=100\), and the input satisfies \(\|A\psi\|=1\). Compare repeat-until-success with amplitude amplification.
Show solutionHide solution
\(p_{\text{succ}}=10^{-4}\). Repetition needs about \(10^4\) attempts, each with a fresh preparation. Amplification needs about \(\frac\pi4\cdot100\approx79\) iterations, each using \(U\), \(U^\dagger\), the preparation, and its inverse.
“Postselection lets a quantum computer apply any linear map.” Explain why this is true but misleading.
Show solutionHide solution
Any matrix has a block encoding after scaling, so postselection applies it. But the success probability can be exponentially small, for example when \(\alpha\) is large or \(A\) nearly annihilates the input, and the cost of repetition or amplification grows accordingly. Postselection with free success would make quantum computers implausibly powerful (it would solve problems in the class PP); the cost of success probability is what keeps the model honest.
7.2
Linear Combinations of Unitaries
How do we build a block encoding of a matrix we care about? Many matrices are naturally sums of unitaries: a Hamiltonian is often a sum of Pauli products, and a polynomial in a unitary is a sum of its powers. Can an ancilla choose the term coherently, so that the terms add as amplitudes? We build such a construction, check on a two-term sum that it really adds amplitudes rather than choosing at random, and then apply it to Hamiltonians, where its cost parameter, the 1-norm, appears.
Let \(A=\sum_{j=0}^{L-1}a_jU_j\) with unitaries \(U_j\) and coefficients \(a_j>0\) (signs and phases can be absorbed into the \(U_j\)). Put \(\alpha=\sum_ja_j\). How can one circuit apply all the terms with the right weights? Let an ancilla register of \(\lceil\log_2L\rceil\) qubits hold a term label \(j\). One circuit, called PREPARE, loads the weights into its amplitudes:
A second circuit, called SELECT, applies the \(j\)th unitary on the branch where the label is \(j\):
\[\mathrm{SEL}=\sum_j\ket j\bra j\otimes U_j.\]
The circuit \(W=(\mathrm{PREP}^\dagger\otimes I)\,\mathrm{SEL}\,(\mathrm{PREP}\otimes I)\) is a block encoding of \(A/\alpha\). To see this, compute the ancilla-\(0\) block:
The ancilla is prepared in a superposition of term labels; SELECT applies every term on its own branch; un-preparing projects back onto the starting state, and each term’s amplitude \(\sqrt{a_j/\alpha}\) appears twice, once going in and once coming out, giving weight \(a_j/\alpha\).
PREPARE loads the weights \(\sqrt{a_j/\alpha}\) into the ancilla register; SELECT applies \(U_j\) on the branch \(\ket j\); un-preparing and keeping ancilla outcome 0 leaves \(\sum_ja_jU_j\ket\psi/\alpha\). SELECT is a multiplexed controlled operation and is usually the most expensive part.
This is the linear combination of unitaries (LCU) method of Childs and Wiebe (2012). Its subnormalization is \(\alpha=\sum_j|a_j|\), the 1-norm of the coefficients, which is at least \(\|A\|\) and can be much larger when terms partly cancel. Its cost is one PREPARE, one PREPARE\(^\dagger\), and one SELECT. SELECT on \(L\) terms is a multiplexed controlled operation; built naively, it costs about \(L\) controlled unitaries plus the overhead of decoding \(j\).
Problems
For \(A=0.6\,U_0+0.2\,U_1+0.2\,U_2+0\,U_3\), give \(\alpha\) and the PREPARE state.
Show solutionHide solution
\(\alpha=1\). \(\mathrm{PREP}\ket{00}=\sqrt{0.6}\ket0+\sqrt{0.2}\ket1+\sqrt{0.2}\ket2\) (on two ancilla qubits, with \(\ket3\) unused).
Why are the PREPARE amplitudes \(\sqrt{a_j/\alpha}\) rather than \(a_j/\alpha\)?
Show solutionHide solution
The amplitude appears twice: from PREPARE and from the overlap with PREPARE on the way out. Their product is \(a_j/\alpha\). Using \(a_j/\alpha\) as amplitudes would give weights \((a_j/\alpha)^2\) and would not even be normalized in general.
Two terms \(U_0=I\) and \(U_1=-I\) with \(a_0=a_1=\frac12\). What is \(A\), and what is the subnormalization?
Show solutionHide solution
\(A=\frac12I-\frac12I=0\), but \(\alpha=1\). The block is zero: postselection always fails. Cancelling terms make \(\alpha\) much larger than \(\|A\|\), and the cost shows up as low success probability.
Does the construction really add the terms as amplitudes? Take \(A=\frac12(I+X)\) on one system qubit, so \(a_0=a_1=\frac12\), \(\alpha=1\). PREPARE is a Hadamard gate on one ancilla. SELECT is a controlled-\(X\) from ancilla to system. The block encoding is Hadamard, CNOT, Hadamard on the ancilla.
Figure guide. The figure shows the prepare–select–unprepare circuit implementing the linear combination of unitaries \(A=\frac12(I+X)\) with one ancilla qubit. Trace input \(\ket0\) through the three stages to find the ancilla-\(0\) postselection probability and the resulting system state.
What to observe
Probability \(\frac12\), leaving the system in \(\ket+\). Indeed \(A\ket0=\frac12(\ket0+\ket1)=\frac{1}{\sqrt2}\ket+\), with squared length \(\frac12\).
Track the state. The first Hadamard on the ancilla gives \(\frac{1}{\sqrt2}(\ket0+\ket1)\ket0\). CNOT gives \(\frac{1}{\sqrt2}(\ket0\ket0+\ket1\ket1)\). The second Hadamard gives \(\frac12\big(\ket0(\ket0+\ket1)+\ket1(\ket0-\ket1)\big)\). The ancilla-\(0\) branch is \(\frac12(\ket0+\ket1)=A\ket0\).
PREPARE is a Hadamard on the ancilla; SELECT is a CNOT. On system input \(\ket0\), ancilla outcome 0 occurs with probability 1/2 and leaves \(\ket+\). A random choice between \(I\) and \(X\) would instead give a mixture of \(\ket0\) and \(\ket1\).
Contrast this with choosing randomly: with probability \(\frac12\) apply \(I\), otherwise apply \(X\). On \(\ket0\) that produces \(\ket0\) or \(\ket1\) at random, a classical mixture, which a measurement in the \(\pm\) basis gives \(+\) only half the time. The LCU output \(\ket+\) gives \(+\) every time. The difference is that LCU adds amplitudes coherently, \(\frac12\ket0+\frac12\ket1\), while random selection adds probabilities. A coherent sum can interfere; a random choice cannot.
Problems
Apply the same circuit to the system input \(\ket-\). What happens?
Show solutionHide solution
\(A\ket-=\frac12(\ket-+X\ket-)=\frac12(\ket--\ket-)=0\). The ancilla never reads \(0\): the success probability is zero. \(A\) is the projector onto \(\ket+\), and \(\ket-\) is in its kernel.
Build a block encoding of \(\frac12(I-X)\) by changing one gate.
Show solutionHide solution
Absorb the sign into the unitary: \(U_1=-X\). Controlled-\((-X)\) is controlled-\(X\) followed by \(Z\) on the ancilla (the \(-1\) on the control-\(1\) branch). Equivalently, start the ancilla in \(\ket-\) instead of \(\ket+\) by using \(HZ\) as PREPARE and \(ZH\) as its inverse. The block is then the projector onto \(\ket-\).
A colleague implements “\(\frac12(I+X)\)” by flipping a classical coin to decide whether to apply \(X\), and reports that it matches LCU on computational-basis measurements. Why is the test insufficient?
Show solutionHide solution
On \(\ket0\), both give outcomes \(0\) and \(1\) with probability \(\frac12\) in the computational basis (LCU after postselection gives \(\ket+\)). The difference appears only in the \(\pm\) basis, where LCU gives \(+\) deterministically and the coin gives a fair coin. Tests must include measurements sensitive to coherence.
Which Hamiltonians can LCU encode? The most common case is a Hamiltonian written as a weighted sum of Pauli strings, tensor products of \(I,X,Y,Z\):
\[H=\sum_jh_jP_j.\]
Can every Hermitian matrix be written this way? Start with one qubit. The products of distinct matrices among \(I,X,Y,Z\) have zero trace, while each squares to \(I\), so \(\operatorname{Tr}(P_aP_b)=2\) if \(a=b\) and \(0\) otherwise. Four mutually orthogonal matrices in the four-dimensional space of \(2\times2\) matrices form a basis, so any \(M\) is \(\sum_ah_aP_a\) with \(h_a=\operatorname{Tr}(P_aM)/2\). If \(M\) is Hermitian, \(h_a^*=\operatorname{Tr}((P_aM)^\dagger)/2=\operatorname{Tr}(MP_a)/2=h_a\), so the coefficients are real. On \(n\) qubits the \(4^n\) Pauli strings satisfy \(\operatorname{Tr}(P_aP_b)=2^n\) or \(0\) in the same way, so the same argument applies. Physical Hamiltonians usually have only polynomially many nonzero terms. Each \(P_j\) is unitary and self-inverse. Write \(h_jP_j=|h_j|\cdot(\mathrm{sign}(h_j)P_j)\), absorbing the sign into the unitary. LCU gives a block encoding of \(H/\lambda\) with
\[\lambda=\sum_j|h_j|,\]
the 1-norm of the coefficients. For example, \(H=0.5\,Z\otimes Z-0.3\,X\otimes I\) has \(\lambda=0.8\). PREPARE maps \(\ket0\) to \(\sqrt{5/8}\ket0+\sqrt{3/8}\ket1\); SELECT applies \(Z\otimes Z\) on ancilla \(0\) and \(-X\otimes I\) on ancilla \(1\).
For \(H=0.5\,Z\otimes Z-0.3\,X\otimes I\), the 1-norm is \(\lambda=0.8\). The sign of the second coefficient is absorbed into its unitary. The circuit encodes \(H/0.8\).
The 1-norm \(\lambda\) is the quantity that every later algorithm pays for. Simulating \(e^{-iHt}\) with block encodings costs about \(\lambda t\) uses of the encoding, and phase estimation of energies to precision \(\epsilon\) costs about \(\lambda/\epsilon\). For molecules, \(\lambda\) can be far larger than \(\|H\|\), and much research on quantum chemistry algorithms reduces \(\lambda\) by better representations of the same Hamiltonian, for example by rewriting the terms that describe pairs of interacting electrons.
Problems
Find \(\lambda\) and \(\|H\|\) for \(H=Z\otimes I+I\otimes Z\).
Show solutionHide solution
\(\lambda=2\). The eigenvalues are \(2,0,0,-2\) (on \(\ket{00},\ket{01},\ket{10},\ket{11}\)), so \(\|H\|=2\). Here the bound \(\lambda\ge\|H\|\) is tight.
Find \(\lambda\) and \(\|H\|\) for \(H=X\otimes X+Y\otimes Y+Z\otimes Z\).
Show solutionHide solution
\(\lambda=3\). This Hamiltonian has eigenvalue \(1\) on the three symmetric (triplet) states and \(-3\) on the singlet, so \(\|H\|=3\). Tight again. If instead \(H=X\otimes X+Y\otimes Y\), then \(\lambda=2\) and the eigenvalues are \(0,0,2,-2\), so also tight.
Show that \(H=X+Z\) on one qubit has \(\lambda>\|H\|\), and generalize to a sum of \(k\) mutually anticommuting Pauli strings with equal coefficients.
Show solutionHide solution
\(\lambda=2\). Since \(XZ=-ZX\), \(H^2=X^2+Z^2+XZ+ZX=2I\), so the eigenvalues are \(\pm\sqrt2\) and \(\|H\|=\sqrt2\). For \(k\) mutually anticommuting strings with coefficient \(h\), the cross terms cancel in the same way, \(H^2=kh^2I\), so \(\|H\|=\sqrt k\,|h|\) while \(\lambda=k|h|\): the 1-norm exceeds the norm by a factor \(\sqrt k\). Such sums arise for fermionic operators, and grouping them before building the block encoding can recover the smaller normalization.
7.3
Composing Encodings
Algorithms combine matrices, so we need block encodings to combine too. Does running two encodings in sequence encode the product? It does, provided each has its own ancillas. Approximate encodings then raise the question of how errors accumulate, and they add as they did for unitaries. Postselection still fails some of the time, and we find that when the encoded matrix is proportional to a unitary, its success probability can be raised to one without knowing the input.
Suppose \(U_A\) is a block encoding of \(A/\alpha\) with \(a\) ancillas and \(U_B\) one of \(B/\beta\) with \(b\) ancillas. Apply \(U_B\), then \(U_A\), each with its own ancilla register. On the branch where both registers are \(0\) at the end,
The reason is that \(U_A\) does not touch the \(b\) register, so the projection onto \(\ket{0^b}\) can be moved past it and applied right after \(U_B\), and similarly for \(\ket{0^a}\). This is a product of block encodings, with subnormalization \(\alpha\beta\) and \(a+b\) ancillas.
\(U_B\) encodes \(B/\beta\) with its own ancillas and \(U_A\) encodes \(A/\alpha\) with others. Keeping both ancilla registers at 0 applies \(AB/(\alpha\beta)\). Reusing one ancilla register for both would let failure amplitude return to the selected block.
Reusing a single ancilla register for both is tempting, since it saves qubits, but it is generally wrong. After \(U_B\), the ancilla is not in \(\ket0\) on the failure branch, and \(U_A\) can map part of that failure amplitude back into the ancilla-\(0\) block, adding unwanted terms to the product. (A later construction, qubitization, does reuse the ancillas, but only with a reflection in between that makes the reuse correct.)
Subnormalizations multiply, so long products lose success probability quickly: a product of \(k\) encodings each with \(\alpha=2\) has subnormalization \(2^k\). Algorithms that apply polynomials of a matrix avoid this with that more economical construction.
Problems
Using the example \(U\) that encodes \(A=\mathrm{diag}(1,\tfrac12)\) twice, with separate ancillas, what matrix is encoded, and with what success probability on input \(\ket1\)?
Show solutionHide solution
\(A^2=\mathrm{diag}(1,\frac14)\). On \(\ket1\), success requires both ancillas to read \(0\), probability \(\|A^2\ket1\|^2=\frac1{16}\).
Use the single-ancilla example \(U\) twice on the same ancilla (no measurement between). What is encoded in the ancilla-\(0\) block?
Show solutionHide solution
\(U^2=I\), so the ancilla-\(0\) block is \(I\), not \(A^2\). The failure amplitude \(B\ket\psi\) from the first application was mapped back by the second (the block \(B\cdot B\) contributes \(B^2=I-A^2\)). Reusing the ancilla gives \(A^2+B^2\), not \(A^2\).
Encode \(A^{10}\) for \(A\) with subnormalization \(\alpha=1.5\) by repeated products. What is the resulting subnormalization, and why is that a problem?
Show solutionHide solution
\(1.5^{10}\approx57.7\). Even if \(\|A^{10}\psi\|\) is of order one, the success probability is at most about \(1/57.7^2\approx3\times10^{-4}\). Polynomial transformations implement degree-10 polynomials of \(A/\alpha\) with one ancilla and no multiplication of subnormalizations.
How do errors in the blocks affect a product? Real block encodings are approximate: rotation angles are synthesized to finite precision, and PREPARE states are loaded approximately. If the blocks are \(A/\alpha+E\) and \(B/\beta+F\) with \(\|E\|\le\epsilon\) and \(\|F\|\le\delta\), the product block is
Since \(\|A/\alpha\|,\|B/\beta\|\le1\), the approximation error is at most \(\delta+\epsilon+\epsilon\delta\). For small errors, errors add, just as they did for products of unitaries.
Errors are operator-norm distances between the implemented and intended blocks. Because blocks have norm at most one, errors add to first order. An error in the block \(A/\alpha\) corresponds to an error \(\alpha\) times larger in \(A\).
Two error sources are easy to miss. First, a PREPARE state with amplitude errors changes the encoded coefficients: if each \(\sqrt{a_j/\alpha}\) is off by \(\eta\), each weight \(a_j/\alpha\) is off by about \(2\eta\sqrt{a_j/\alpha}\), and the block error is bounded by summing these over terms. Second, errors relative to \(A/\alpha\) are errors relative to \(A\) multiplied by \(\alpha\): to apply \(A\) itself with error \(\epsilon_A\), the block must be accurate to \(\epsilon_A/\alpha\). Large subnormalizations demand high precision as well as many repetitions.
Problems
Two block encodings each have error \(10^{-3}\). Bound the error of their product.
A block encoding of \(H/\lambda\) with \(\lambda=100\) has block error \(10^{-4}\). What is the error in the encoded \(H\)?
Show solutionHide solution
\(\lambda\times10^{-4}=10^{-2}\). An energy estimate based on this encoding can be off by about \(0.01\) from this source alone.
Why does the bound \(\|(A/\alpha)F\|\le\|F\|\) require \(\|A/\alpha\|\le1\), and what happens to the argument for a product of a block with an un-normalized matrix?
Show solutionHide solution
\(\|MF\|\le\|M\|\,\|F\|\), so the bound holds when \(\|M\|\le1\). If \(M\) had norm larger than one, errors would be amplified by \(\|M\|\). Blocks of unitaries always have norm at most one, which is what keeps error propagation additive.
Postselection fails sometimes, and amplitude amplification fixes that only if we can reflect about the input state, which requires a preparation circuit for it. What if the input is an unknown state handed to us by an earlier part of the algorithm?
When the encoded matrix is proportional to a unitary, there is a way out. Suppose the ancilla-\(0\) block of \(W\) is \(\sin\theta\,V\) for a unitary \(V\) and a fixed angle \(\theta\). Then for every input,
where \(\ket{\Phi^\perp}\) has its ancilla orthogonal to \(\ket0\). Amplification would need a reflection about \(\ket\Psi\), which depends on the unknown \(\psi\). Can the reflection \(R=(2\ket0\bra0-I)\otimes I\) about the ancilla being \(0\), which does not depend on \(\psi\), take its place?
To find out, we need the input-side partner of \(\ket{\Phi^\perp}\). Define \(\ket{\Psi^\perp}=W^\dagger\big(\cos\theta\ket\Phi-\sin\theta\ket{\Phi^\perp}\big)\), so that \(W\) maps the pair \(\ket\Psi,\ket{\Psi^\perp}\) to the pair \(\ket\Phi,\ket{\Phi^\perp}\) by a fixed two-by-two matrix. Substituting \(\ket{\Phi^\perp}=(W\ket\Psi-\sin\theta\ket\Phi)/\cos\theta\) gives
What is its ancilla-\(0\) part? The block of \(W^\dagger\) is the adjoint of the block of \(W\), namely \(\sin\theta\,V^\dagger\). So the ancilla-\(0\) part of \(W^\dagger\ket\Phi\) is \(\sin\theta\,V^\dagger V\ket\psi=\sin\theta\ket\psi\), and the ancilla-\(0\) part of \(\ket{\Psi^\perp}\) is \(\frac{\sin\theta}{\cos\theta}\ket\psi-\frac{\sin\theta}{\cos\theta}\ket\psi=0\). So \(R\) fixes \(\ket\Psi\) and \(\ket\Phi\), and negates \(\ket{\Psi^\perp}\) and \(\ket{\Phi^\perp}\).
That is exactly the situation of amplitude amplification, with \(W\) as the preparation and \(\ket\Phi\) as the good state, and with the same angle \(\theta\) for every \(\psi\). The iteration \(-WRW^\dagger R\) therefore rotates by \(2\theta\), and \(k\) iterations after \(W\) give amplitude \(\sin((2k+1)\theta)\) on \(\ket0V\ket\psi\), whatever the input. This is oblivious amplitude amplification (Berry, Childs, Cleve, Kothari, and Somma, 2014).
If \(W\) block-encodes \(\tfrac12V\) with \(V\) unitary, one round, \(W\), the ancilla reflection \(R\), \(W^\dagger\), \(R\), \(W\), yields \(\ket0V\ket\psi\) exactly for every input. \(R\) acts only on the ancillas, so no knowledge of \(\ket\psi\) is needed.
A clean special case: if \(\sin\theta=\frac12\), one iteration gives exactly \(\ket0V\ket\psi\), since \(3\theta=\pi/2\). LCU makes this easy to arrange. If \(V\approx\sum_ja_jU_j\) with \(\sum_ja_j=2\), the LCU block encoding has \(\sin\theta=\frac12\), and one round of oblivious amplification applies \(V\) deterministically, with three uses of the LCU circuit. How can this simulate \(e^{-iHt}\)? Split the time into short segments of length \(\delta\), and truncate the exponential’s power series after \(K\) terms:
With \(H=\sum_jh_jP_j\), each power \(H^k\) expands into products of \(k\) Pauli strings, which are unitaries. So the truncated series is a linear combination of unitaries, with coefficient 1-norm \(\sum_{k\le K}(\lambda\delta)^k/k!\le e^{\lambda\delta}\). Choosing \(\delta\) so that this sum is \(2\), about \(\lambda\delta=\ln2\), makes \(\sin\theta=\tfrac12\), and one round of oblivious amplification applies the segment almost deterministically. The truncated sum is only nearly unitary, so a robust version of the argument, which we quote, is needed. This truncated Taylor series method (Berry, Childs, Cleve, Kothari, and Somma, 2015) needs about \(\lambda t/\ln2\) segments, each with \(K\) of order \(\log(\lambda t/\epsilon)\) terms, for a total of order \(\lambda t\log(\lambda t/\epsilon)\) uses of the Pauli terms, up to smaller logarithmic factors.
Problems
For \(\sin\theta=\frac12\), verify that one iteration of a rotation by \(2\theta\) reaches success probability one.
Show solutionHide solution
\(\theta=\pi/6\) and \(3\theta=\pi/2\), so \(\sin^2(3\theta)=1\), exactly as for four-item Grover search.
Why is it essential that \(V\) be unitary (up to the scale \(\sin\theta\))?
Show solutionHide solution
The argument needs the success amplitude \(\sin\theta\) to be the same for every input \(\psi\), so that one input-independent rotation works. If the encoded matrix were not proportional to a unitary, its success amplitude \(\|A\psi\|/\alpha\) would depend on \(\psi\), and no fixed number of input-independent reflections could amplify all inputs correctly.
The encoded matrix is \(\frac12(V+E)\) with \(V\) unitary and a small error \(\|E\|\le\epsilon\). What can be said about one round of oblivious amplification?
Show solutionHide solution
The analysis is robust: the output differs from \(V\ket\psi\) by \(O(\epsilon)\). This is why it works for truncated Taylor series, where the truncation makes the sum only approximately unitary; the truncation error is chosen small enough that the accumulated error over all time steps stays within budget.
7.4
Access Models
A block encoding is an assumption about access to a matrix. What does it cost to supply one? That depends on how the matrix is given. When it is defined by a rule, its nonzero entries can be computed on demand and the encoding is cheap. When it is stored as an arbitrary table, the encoding must read memory coherently, and a fair comparison must then give a classical algorithm comparable access to the same data.
Suppose a matrix has few nonzero entries per row, and we can compute them. Can we encode it without storing it? A matrix is \(s\)-sparse if each row and column has at most \(s\) nonzero entries. Sparse access provides two oracles: one that, given a row \(i\) and an index \(k\le s\), returns the column of the \(k\)th nonzero entry in that row, and one that, given \(i,j\), returns the entry \(H_{ij}\) to some number of bits. For a matrix defined by a rule, such as a lattice Hamiltonian or a graph’s adjacency matrix, both oracles are efficient circuits.
From these oracles a block encoding of \(H/(s\,\|H\|_{\max})\) can be built with a constant number of oracle calls, a quoted construction (Gilyén, Su, Low, and Wiebe, 2019), where \(\|H\|_{\max}\) is the largest entry magnitude. The construction prepares, for each row, a uniform superposition over its \(s\) nonzero positions, and uses the entry oracle to rotate an ancilla by an angle encoding \(H_{ij}\). The subnormalization \(s\|H\|_{\max}\) is at least \(\|H\|\) and can exceed it by a factor up to \(s\), for example when each row has one large entry and many tiny ones.
The subnormalization and cost of a block encoding depend on the access model. Query counts of later algorithms are multiplied by the cost of one block encoding.
Sparse access is the setting of many simulation and linear-systems results. It is natural when the matrix has a short description. It is not free when the matrix is stored as data: then the oracles must read memory coherently.
Problems
The adjacency matrix of a graph where every vertex has degree at most 3 has entries \(0\) or \(1\). What block-encoding subnormalization does sparse access give, and what is \(\|H\|\) at most?
Show solutionHide solution
\(s=3\), \(\|H\|_{\max}=1\), so the subnormalization is \(3\). The largest eigenvalue of an adjacency matrix is at most the maximum degree, so \(\|H\|\le3\): here the subnormalization is tight up to that bound.
For the one-dimensional Hamiltonian \(H=\sum_{j=1}^{n-1}Z_jZ_{j+1}\), compare the LCU 1-norm with \(s\|H\|_{\max}\).
Show solutionHide solution
LCU: \(\lambda=n-1\). As a matrix, \(H\) is diagonal: \(s=1\), and \(\|H\|_{\max}=n-1\) (all bonds aligned). Both give \(n-1=\|H\|\). Diagonal matrices are \(1\)-sparse.
Why must the entry oracle be implemented reversibly, and what does that require when \(H_{ij}\) is given by a formula?
Show solutionHide solution
It is queried on superpositions of \((i,j)\) inside the block-encoding circuit, so it must be a clean oracle: compute \(H_{ij}\) into a register, use it to rotate the ancilla, then uncompute. For a formula, this means a reversible arithmetic circuit evaluating it to the needed precision.
What if the matrix is an arbitrary \(N\times N\) table of numbers stored classically? A block encoding needs coherent access to it: a circuit that, on a superposition of addresses, returns the stored values in superposition. Such a device is often called QRAM. Every stored value must be able to influence the output, so its circuit size grows at least linearly with the amount of data; known designs reach logarithmic depth (Giovannetti, Lloyd, and Maccone, 2008). Either way, loading the data once costs order \(N^2\) for a dense matrix, which already matches or exceeds many classical algorithms on it.
Claims of exponential speedup for problems on classical data, such as recommendation systems, principal component analysis, or regression, usually assume that the data is already available through a QRAM-like structure in which it can also be sampled efficiently. Tang (2018) showed that when a classical algorithm is given the comparable sampling access to the same data, it can match the quantum recommendation algorithm up to polynomial factors. This dequantization program has since removed the exponential gap for several proposed quantum machine-learning algorithms with low-rank inputs, while leaving large polynomial gaps in some cases.
When quantum algorithms assume data structures that support efficient state preparation, classical algorithms given the matching sampling access can sometimes match them up to polynomial factors.
The lesson is the one we drew when we first specified access: a speedup is a comparison between methods with compatible access. A block encoding is a precise and powerful interface, and it makes clear what an algorithm consumes. Whether supplying that interface is cheap depends on the matrix.
Problems
A quantum linear-systems algorithm runs in time polylogarithmic in \(N\) given a block encoding of a dense \(N\times N\) matrix. Why is the end-to-end cost from a classical file at least order \(N^2\)?
Show solutionHide solution
The file has \(N^2\) entries, all of which can affect the answer. Any procedure that builds a block encoding of an arbitrary such matrix must read every entry at least once, costing order \(N^2\) operations, whatever happens afterwards.
What sampling access did Tang’s classical algorithm assume, and why is it a fair comparison?
Show solutionHide solution
The ability to sample a row index with probability proportional to the squared norm of the row, and an entry within a row proportional to its squared magnitude, and to query entries. The data structure that gives the quantum algorithm its state-preparation access also supports these classical samples at comparable cost, so granting them to the classical algorithm compares methods under the same preprocessing.
Does dequantization show that quantum linear algebra offers no advantage?
Show solutionHide solution
No. It shows that exponential speedups are not available for certain tasks when inputs are low-rank and classical data is given with sampling access. Quantum algorithms retain potential advantages for sparse, high-rank, or implicitly defined matrices (such as Hamiltonians of physical systems), where no comparable classical sampling shortcut is known, and for producing quantum states used by further quantum processing.
Summary
A block encoding embeds a non-unitary matrix \(A/\alpha\) into the top-left block of a larger unitary \(U\) so that \((\langle 0|_a \otimes I)U(|0\rangle_a \otimes |\psi\rangle) = (A/\alpha)|\psi\rangle\).
Linear combinations of unitaries (LCU) implement \(A = \sum_j c_j U_j\) with normalization factor \(\alpha = \sum_j |c_j|\) using a prepare–select–unprepare circuit.
Block encodings compose cleanly under sums and products, allowing complex operators to be assembled modularly while tracking the subnormalization factor \(\alpha\) and ancilla overhead.
Questions and worked problems
Attempt each question before opening a hint. Explain your reasoning, then compare it with the solution.
Give an LCU block encoding of A = (I + Z)/2 on one qubit and the success probability for input |+⟩.
Hint 1
PREPARE is H; SELECT is controlled-Z.
Hint 2
A is the projector onto |0⟩.
Worked solution
PREPARE = H on an ancilla, SELECT = controlled-Z from the ancilla to the system, then H on the ancilla; keep outcome 0. A|+⟩ = |0⟩/√2, so the success probability is 1/2, and the output is |0⟩.
The shear \(A=\begin{pmatrix}1&1\\0&1\end{pmatrix}\) has both eigenvalues equal to \(1\). Compute \(\|A\|\) by maximizing \(\|A\psi\|^2\) over unit vectors, and state the smallest subnormalization \(\alpha\) any block encoding of \(A\) can have.
Hint 1
\(\|A\psi\|^2=\bra\psi A^\dagger A\ket\psi\), and \(A^\dagger A=\begin{pmatrix}1&1\\1&2\end{pmatrix}\).
Hint 2
The maximum of \(\bra\psi M\ket\psi\) for Hermitian \(M\) is its largest eigenvalue.
Worked solution
\(A^\dagger A=\begin{pmatrix}1&1\\1&2\end{pmatrix}\) has eigenvalues \(\frac{3\pm\sqrt5}{2}\). So \(\|A\|^2=\frac{3+\sqrt5}{2}\approx2.618\) and \(\|A\|=\frac{1+\sqrt5}{2}\approx1.618\). A block of a unitary has norm at most \(1\), so any block encoding needs \(\alpha\ge1.618\). For a matrix that is not Hermitian (or, more generally, not normal), the eigenvalues do not determine the norm. Here every eigenvalue has magnitude \(1\), yet the matrix stretches some vectors by \(62\%\). Resource estimates must use the norm, or a bound on it, not the eigenvalues.
Write \(H=\begin{pmatrix}1&2\\2&-1\end{pmatrix}\) as a sum of Pauli matrices. Find the LCU subnormalization \(\lambda\) and the norm \(\|H\|\). By what factor does the excess subnormalization reduce the postselection success probability compared with an ideal encoding with \(\alpha=\|H\|\)?
Hint 1
Diagonal part \(Z\), off-diagonal part \(2X\).
Hint 2
The eigenvalues of \(aX+bZ\) are \(\pm\sqrt{a^2+b^2}\).
Worked solution
\(H=2X+Z\), so \(\lambda=2+1=3\). The eigenvalues are \(\pm\sqrt{4+1}=\pm\sqrt5\), so \(\|H\|=\sqrt5\approx2.236\). Postselection succeeds with probability \(\|H\psi\|^2/\alpha^2\), so the ratio is \((\lambda/\|H\|)^2=9/5=1.8\): the LCU encoding succeeds \(1.8\) times less often on every input. The excess arises because \(X\) and \(Z\) anticommute and their contributions add in quadrature, not linearly.
A Hamiltonian H = 2 Z₁ + Z₁Z₂ − 0.5 X₂ is block-encoded by LCU. What is λ, what is the success probability of postselecting H|00⟩/λ, and what state results?
Hint 1
λ is the sum of the absolute values of the coefficients.
Hint 2
Compute H|00⟩ term by term.
Worked solution
λ = 2 + 1 + 0.5 = 3.5. H|00⟩ = 2|00⟩ + |00⟩ − 0.5|01⟩ = 3|00⟩ − 0.5|01⟩, with squared norm 9.25. The success probability is 9.25/12.25 ≈ 0.755, and the output is (3|00⟩ − 0.5|01⟩)/√9.25.
Expand the projector \(\Pi=\ket{00}\bra{00}\) on two qubits as a sum of Pauli strings, using \(\ket0\bra0=\frac12(I+Z)\). Give the LCU subnormalization and the PREPARE state. Then compute the postselection success probability on input \(\ket{++}\) and the resulting state.
\(\Pi=\frac14(I\otimes I+I\otimes Z+Z\otimes I+Z\otimes Z)\). There are four terms of weight \(\frac14\), so \(\lambda=1=\|\Pi\|\) and the encoding is as efficient as possible. PREPARE is the uniform superposition over two label qubits, \(H\otimes H\), and SELECT applies \(I\), \(Z_2\), \(Z_1\), or \(Z_1Z_2\) according to the label. On \(\ket{++}\), \(\Pi\ket{++}=\frac12\ket{00}\), so postselection succeeds with probability \(\frac14\) and leaves \(\ket{00}\). The same probability results from measuring \(\ket{++}\) in the computational basis. A block-encoded projector applied to a state behaves like a filtering measurement that keeps only the successful branch.
Let \(A=\frac12(U+V)\) for unitaries \(U,V\), encoded by LCU with one ancilla: \(H\), controlled-\(U\) on ancilla \(0\) and controlled-\(V\) on ancilla \(1\), then \(H\). Show that the success probability on input \(\ket\psi\) is \(\frac12\big(1+\mathrm{Re}\bra\psi U^\dagger V\ket\psi\big)\). Which circuit from the Phase Encoding chapter is this, and when is the success probability \(0\)?
Compare with \(\Pr[0]\) of the Hadamard test for \(U^\dagger V\).
Worked solution
The success probability is \(\|A\psi\|^2=\frac14\langle U\psi+V\psi,U\psi+V\psi\rangle=\frac14\big(2+2\,\mathrm{Re}\bra\psi U^\dagger V\ket\psi\big)=\frac12\big(1+\mathrm{Re}\bra\psi U^\dagger V\ket\psi\big)\). That is exactly \(\Pr[0]\) of the Hadamard test applied to \(U^\dagger V\) on \(\ket\psi\). With \(U=I\) the circuit is the Hadamard test itself, so the Hadamard test is a two-term LCU in disguise. The success probability is \(0\) when \(V\ket\psi=-U\ket\psi\): the two terms cancel completely on that input, and \(A\ket\psi=0\). Cancellation between terms is why \(\|A\|\) can be much smaller than the 1-norm.
An LCU encodes \(V/\alpha\) for a unitary \(V\) with \(\alpha=1.9\). (a) What success probability does one round of oblivious amplitude amplification give? (b) Show how adding a cancelling pair of terms makes \(\alpha=2\) exactly without changing the encoded matrix, and state the cost.
Hint 1
\(\sin\theta=1/\alpha\), and one round gives \(\sin^2(3\theta)\).
Hint 2
\(0.05\,I+0.05\,(-I)\) adds \(0.1\) to the 1-norm and \(0\) to the matrix.
Worked solution
(a) \(\sin\theta=1/1.9\approx0.526\), so \(\theta\approx0.554\), and one round gives \(\sin^2(3\theta)\approx\sin^2(1.663)\approx0.992\), not certainty. (b) Add the terms \(0.05\,I\) and \(0.05\,(-I)\). They sum to zero, so the encoded matrix is still \(V\), but the 1-norm becomes \(1.9+0.1=2\). Then \(\sin\theta=1/2\), \(3\theta=\pi/2\), and one round succeeds exactly. The cost is two extra PREPARE amplitudes and two more (trivial) branches of SELECT. Deliberately increasing the subnormalization, normally something to avoid, here buys determinism, because oblivious amplification needs a particular angle.
After postselecting a block encoding of \(A=\mathrm{diag}(1,\frac12)\) on input \(\ket\psi\), a student writes “the register now holds \(A\ket\psi\).” For \(\ket\psi=\ket1\), what does the register hold? Where did the factor \(\frac12\) go, and why does this matter for an algorithm whose answer is the norm \(\|A\psi\|\)?
Hint 1
Postselection leaves the normalized state \(A\psi/\|A\psi\|\).
Hint 2
The success probability is \(\|A\psi\|^2/\alpha^2\).
Worked solution
A quantum state is always normalized, so the register holds \(A\ket1/\|A\ket1\|=\ket1\), the same as the input. The factor \(\frac12\) appears only in the success probability, \(\|A\ket1\|^2=\frac14\). The scale of \(A\psi\) is not stored in the state; it shows up in how often the procedure succeeds. If an algorithm needs the norm, for example the length of a solution vector in a linear system, it must estimate the success probability, by repetition (order \(1/\epsilon^2\) runs) or by amplitude estimation (order \(1/\epsilon\)). That cost belongs in the resource count.
The first-order Taylor approximation e^{−iHδ} ≈ I − iδH, with H = Σ h_j P_j and λδ small, is a linear combination of unitaries. Write its LCU coefficients and subnormalization, and explain why oblivious amplitude amplification can be used to apply it deterministically.
Hint 1
Write −iδH = Σ δ|h_j| (−i sign(h_j) P_j).
Hint 2
The subnormalization is 1 + δλ; it can be adjusted to exactly 2 by adding a multiple of I with a compensating term or by choosing δ.
Worked solution
I − iδH = 1·I + Σ_j δ|h_j|·(−i sign(h_j)P_j), a combination of unitaries with coefficients 1 and δ|h_j|, so α = 1 + δλ. The encoded matrix (I − iδH)/α is close to a unitary (e^{−iHδ}/α, up to O(δ²)), so its success amplitude is nearly input independent. Choosing the step so that α = 2 (or padding the combination to α = 2) makes one round of oblivious amplitude amplification succeed, up to the O(δ²) truncation error. Higher-order truncated Taylor series reduce this error, which is the basis of the Berry–Childs–Cleve–Kothari–Somma simulation method.
The star graph has one centre joined to \(N\) leaves. (a) Find \(\|A\|\) for its adjacency matrix. (b) What subnormalization does the sparse-access construction give, with sparsity \(s=N\) and \(\|A\|_{\max}=1\)? (c) Compute both for \(N=9\) and explain the factor between them. What does this mean for using sparse access on graphs with a few high-degree vertices?
Hint 1
Try a vector with amplitude \(a\) on the centre and \(b\) on every leaf.
Hint 2
\(A\) maps it to \(Nb\) on the centre and \(a\) on every leaf.
Worked solution
(a) A vector with \(a\) on the centre and \(b\) on each leaf is mapped to \(Nb\) on the centre and \(a\) on each leaf. It is an eigenvector when \(Nb=\lambda a\) and \(a=\lambda b\), so \(\lambda^2=N\), and \(\|A\|=\sqrt N\). (b) Sparse access gives \(\alpha=s\|A\|_{\max}=N\). (c) For \(N=9\), \(\|A\|=3\) while \(\alpha=9\). The construction spreads amplitude uniformly over up to \(s\) neighbours of every row, as if each row could be as heavy as the heaviest, so it overestimates by a factor \(\sqrt N\). Success probabilities drop by a further factor \(N\). Since simulation and phase-estimation costs scale with \(\alpha\), one high-degree vertex makes the encoding expensive for the whole graph. Splitting the matrix into pieces, or using encodings adapted to row norms, can recover most of the loss.
Where this leads. the Polynomial Transformations chapter applies polynomials of a block-encoded matrix with one extra qubit and a sequence of phases, giving filters, inversion, and simulation.