Block encoding
A unitary representation whose selected ancilla block approximates a scaled target matrix.
Also called unitary block encoding
On this page
Definition and significance
A block encoding stores a matrix A inside a larger unitary U. It gives quantum algorithms a coherent interface to matrices that are not themselves unitary. The normalization, ancilla count and approximation error are part of the definition, not optional implementation details.
A common convention says U is an (alpha,a,epsilon) block encoding if ||A-alpha(<0^a| tensor I)U(|0^a> tensor I)||<=epsilon in operator norm. Some publications place epsilon after dividing by alpha, so a citation must identify its convention.
Mechanism and mathematical treatment
Because every block of a unitary has norm at most one, exact encoding requires alpha>=||A||. Let B=A/alpha. Applying U to |0^a>|psi> has an all-zero ancilla component |0^a>B|psi>. The remaining amplitude occupies orthogonal ancilla outcomes. Postselection succeeds with probability ||B|psi>||^2.
Encodings can arise from sparse-access oracles, linear combinations of unitaries or specialized matrix structure. They are useful inputs to polynomial transformations. Their construction cost remains part of the total algorithm and can dominate the subsequent query complexity.
Fully worked reference example
For the scalar a=3/5, the two-by-two matrix U=[[3/5,4/5],[4/5,-3/5]] is unitary because its columns are orthonormal. Its upper-left block encodes a with alpha=1. Starting in |0>, the zero outcome has probability 9/25, not 3/5. The block contains an amplitude; its square gives a probability.
For diagonal A=diag(3/5,0), a direct-sum construction can use this scalar unitary on one system component and X on the other. Postselection then weights the first component by 3/5 and removes the second. The complete unitary remains reversible even though the selected matrix is singular.
Limitations and common misconceptions
A block encoding is an access model, not a claim that any large dense matrix can be loaded efficiently. A small epsilon in the encoding can be amplified by subsequent processing, especially near spectral singularities. Error propagation must be tracked through the complete algorithm.
Scientific relationships
The matrix access is supplied through a unitary block and projectors.
Ancilla preparation and selection embed a normalized weighted unitary sum.
Constructing an exact Hermitian dilation
For a Hermitian contraction B with ||B|| at most one, define D=sqrt(I-B^2) using its nonnegative spectral square root. The block matrix U=[[B,D],[D,-B]] is unitary. Since B and D are functions of the same Hermitian matrix, they commute. Multiplying U by itself gives diagonal blocks B^2+D^2=I and off-diagonal blocks BD-DB=0. This proves U^2=I and supplies a complete dilation, not merely a proposed upper-left block.
Choose B=diag(4/5,-3/5). Then D=diag(3/5,4/5). In ancilla-first basis order |00>,|01>,|10>,|11>, U is [[4/5,0,3/5,0],[0,-3/5,0,4/5],[3/5,0,-4/5,0],[0,4/5,0,3/5]]. Its zero-ancilla block is B, and every row and column is normalized and orthogonal to the others.
For system input |+>, the successful component is (4|0>-3|1>)/(5sqrt(2)), with probability one-half. Normalizing gives (4|0>-3|1>)/5, whose Z expectation is 7/25 and X expectation is -24/25. The negative eigenvalue is preserved as a relative sign. Taking absolute values of the block entries would yield a different coherent operation even though the success probability stayed the same.
Multiplying blocks requires separate ancillary projectors
Suppose U_B block-encodes B and U_C block-encodes C with separate clean ancillas. Apply U_C to the system and its ancilla, then U_B to the system and its own ancilla. Projecting both ancillas onto zero gives BC on the system. The multiplication order follows the chronological circuit order: C acts first. Keeping the ancillas separate prevents rejected components from an earlier call from accidentally returning to the accepted subspace through later dynamics.
For B=diag(4/5,-3/5) and C=diag(1/2,1), the product is diag(2/5,-3/5). Acting on |+> gives success probability [(2/5)^2+(3/5)^2]/2=13/50. The normalized output is (2|0>-3|1>)/sqrt(13). The probability is not generally the product of the two standalone success probabilities computed on the original input, because the state entering the second block has changed.
If one measures and conditions after the first block, the second success probability is evaluated on that conditional state; multiplying the conditional probabilities then reproduces the joint success probability. The coherent two-ancilla construction avoids intermediate measurement while representing the same accepted matrix product. It remains useful when the block must be embedded in a larger coherent algorithm.
Error conventions and normalized-state sensitivity
Let the implemented scaled blocks be A+Delta_A and B+Delta_B, with ||Delta_A|| at most epsilon_A and ||Delta_B|| at most epsilon_B. Their product differs from AB by A Delta_B+Delta_A B+Delta_A Delta_B. Hence its norm error is at most ||A||epsilon_B+||B||epsilon_A+epsilon_A epsilon_B. This statement uses errors in the unnormalized matrices; if a definition places error after division by the block normalization, the factors must be converted first.
Postselection can magnify an otherwise small matrix error. If v=A|psi> has a very small norm, an absolute perturbation to v can substantially change v/||v||. A standard elementary bound gives a normalized-vector discrepancy at most 2||v-w||/||v|| when w is the perturbed nonzero vector, using the triangle inequality and | ||v||-||w|| | at most ||v-w||. The bound becomes uninformative when success amplitude is near zero, which correctly reflects the sensitivity of rare accepted branches.
For the exact B example, success on |+> is one-half, so the accepted vector norm is 1/sqrt(2). An absolute block-action error of 0.001 therefore gives the conservative normalized-vector bound about 0.002829. This is a mathematical upper bound; it is not the standard deviation of an experiment or the probability of a wrong answer.
Rectangular maps and access costs
A rectangular matrix maps between different input and output spaces. Its block encoding uses projectors onto those spaces inside a larger common Hilbert space. Equal-size ancilla-zero blocks are a convenient special case, but not the full definition. Padding a three-dimensional output into two qubits introduces an unused label whose behavior must be specified. Algorithms manipulating singular vectors must keep track of which projector represents the right singular space and which represents the left.
Constructing D=sqrt(I-B^2) explicitly is efficient only for matrices whose structure permits it. The dilation formula proves existence; it does not provide a cheap circuit for an arbitrary dense B. Sparse-access and LCU constructions offer other routes, each with its own preparation and selection costs. Any downstream polynomial query count must be multiplied by the cost of the selected block interface.
Sources
Verification scope
Selected source text checked ·
Theorem assumptions include block access, polynomial parity and boundedness. No performance inference outside those models.