Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
Skip Learn navigation
Encyclopedia
Topic

Controlled-unitary synthesis

The construction of a coherent conditional operation from simpler gates while retaining relative phase.

Edition released Coverage: Overview · Technical
On this page

Definition, purpose and input assumptions

A controlled unitary applies U to a target only when a designated control has value 1. Its block matrix is diag(I,U) in control-first ordering. The synthesis problem asks how to build that operation from a chosen native or logical gate set. It assumes U has a known description; access to an unknown black-box U does not automatically supply controlled-U for free.

This distinction is important for phase estimation, overlap circuits and algorithms that repeatedly control a complex subroutine. A cost estimate counting U once may omit the ancillas, decomposition and phase correction needed to control it.

Mathematical mechanism

For a Z rotation, R_Z(theta)=exp(-i theta Z/2), use the chronological sequence R_Z(theta/2) on the target, CNOT, R_Z(-theta/2) on the target, CNOT. If the control is 0, the target rotations cancel. If it is 1, X R_Z(-theta/2) X=R_Z(theta/2), so the two half rotations combine to R_Z(theta).

For a general single-qubit unitary, a phase times an Euler decomposition supplies a related two-CNOT construction with suitable local factors. The phase multiplying U must appear as a phase gate on the control; it cannot be discarded merely because it was global before control was introduced.

Fully solved reference example

Set theta=pi/2 and input |+>|1>. The controlled rotation gives [|0>+exp(i pi/4)|1>]|1>/sqrt(2). Measuring the control in X yields expectation cos(pi/4)=1/sqrt(2). If the intended target operation were instead P(pi/2)=diag(1,i), the kicked-back phase would be pi/2 and the X expectation would be zero. These gates differ only by global phase when uncontrolled, but their controlled versions are observably different.

The half-angle construction can be checked separately on control 0 and control 1, then extended to a superposition by linearity. That is a complete proof of the circuit identity, not a collection of measurement samples.

Limitations and classical comparison

The best decomposition depends on connectivity and available native interactions. A classical compiler can manipulate the known matrix, but matrix access is not the same as physical access to an undocumented device operation. Approximate synthesis errors and accumulated phase error need separate budgets.

Scientific relationships

Controlled-unitary synthesis implements phase kickback and is used in quantum phase estimation. It depends on single-qubit rotations and the controlled-X gate; global phase under coherent control explains the required phase bookkeeping.

Deriving a controlled operation from three single-qubit factors

Write a specified one-qubit unitary as U=e^{iα}R_Z(φ)R_Y(θ)R_Z(λ), using R_P(t)=exp(-itP/2). Define A=R_Z(φ)R_Y(θ/2), B=R_Y(-θ/2)R_Z(-(φ+λ)/2), and C=R_Z((λ-φ)/2). These factors satisfy ABC=I. The adjacent Y rotations cancel, and the remaining Z angles add to φ-(φ+λ)/2+(λ-φ)/2=0. The second identity, AXBXC=R_Z(φ)R_Y(θ)R_Z(λ), follows from XR_Y(t)X=R_Y(-t) and XR_Z(t)X=R_Z(-t). In particular, XBX=R_Y(θ/2)R_Z((φ+λ)/2), so multiplying A(XBX)C combines the Y rotations to θ and the final Z angles to λ.

Apply C to the target, a CNOT from the control, B to the target, a second CNOT, and A to the target, in that chronological order. When the control is zero the target sees ABC, hence identity. When it is one the target sees AXBXC, hence the special-unitary part of U. Finally apply P(α)=diag(1,e^{iα}) to the control. This supplies the missing scalar only in the active branch. Because these identities hold for arbitrary target vectors, their linear extension proves correctness when either qubit is entangled with an external register.

A complete numerical-angle instance

Take α=π/5, φ=π/3, θ=π/2, and λ=-π/6. Then A=R_Z(π/3)R_Y(π/4), B=R_Y(-π/4)R_Z(-π/12), and C=R_Z(-π/4). The special-unitary target matrix is V=(1/√2)[[e^{-iπ/12},-e^{-iπ/4}],[e^{iπ/4},e^{iπ/12}]]. The controlled matrix, with the control as q0, is block diagonal with blocks I and e^{iπ/5}V. This is an exact expression, so checking only computational-basis probabilities would discard much of the specification.

For target |0> and control |+>, the output amplitudes in order 00,01,10,11 are 1/√2, 0, e^{i7π/60}/2, and e^{i9π/20}/2. The probabilities are therefore 1/2,0,1/4,1/4. The control's off-diagonal density entry is e^{-i7π/60}/(2√2), whose phase depends on α. Omitting P(α) leaves these four probabilities unchanged but alters a subsequent interference measurement of the control. Thus basis-state population checks verify the conditional rotation incompletely; checking the full matrix or suitable interference observables resolves the missing phase.

The construction uses two CNOTs and three composite target factors, plus a control phase. Expanding A, B, and C as written gives five elementary rotations on the target. Adjacent rotations may merge with neighboring circuit operations, and hardware-native implementations may have different costs. The figure of two CNOTs refers to the logical decomposition with unrestricted one-qubit rotations, not to its total physical gate count after finite-gate synthesis.

Adding a second control without an initialized workspace

A useful separate identity starts with any consistently chosen unitary square root V satisfying V²=U. Let a and b be two control bits. Apply controlled-V from b to the target, CNOT a→b, controlled-V† from b to the target, CNOT a→b, and controlled-V from a to the target. The target's total exponent of V is b-(a XOR b)+a. Its values on ab=00,01,10,11 are 0,0,0,2. Hence the circuit implements U exactly when both controls are one, while returning b to its original value.

For U=R_Y(π/2), choose V=R_Y(π/4). Starting in |110>, the three target operations are V, identity, and V, producing (|110>+|111>)/√2. Starting in |100>, they are identity, V†, and V, producing the original |100>. This cancellation is coherent: a superposition of the two control strings experiences the corresponding conditional outputs without recording which branch was active in an auxiliary qubit. The network has five two-qubit operations at this level, although three are controlled rotations rather than CNOTs. Replacing each controlled rotation by the preceding decomposition changes that resource accounting.

Synthesis boundaries and an original figure

The square-root construction depends on a gate description from which controlled-V and controlled-V† can actually be synthesized. An opaque black-box U does not automatically provide controlled-U, a square root, or an inverse. Those capabilities must be part of the input model. A control on zero can be implemented by X gates before and after the relevant control wire, but the added X operations and their placement remain part of the circuit.

How approximation affects an inactive branch

If the target factors are compiled approximately as A~, B~, and C~, an inactive control no longer guarantees exact cancellation unless the compiler preserves it structurally. Suppose their operator-norm errors are at most ε_A, ε_B, and ε_C, and all compiled factors are unitary. Inserting and subtracting intermediate products gives ||A~B~C~-ABC||≤ε_A+ε_B+ε_C. The same telescoping argument applies to the active product because multiplying by X does not change the norm. An error budget of 0.003 for the target transformation can therefore allocate 0.001 to each factor, but this is a sufficient worst-case allocation rather than an equality for the actual error.

A different construction can define C~=(A~B~)† exactly. That forces the inactive block to be identity, while shifting the approximation problem to the active block. It may increase circuit length or prevent a preferred gate pattern. The choice illustrates a meaningful compiler objective: preserving a control invariant can be more valuable than independently minimizing three local errors. A phase approximation δ on the control adds an operator discrepancy |e^{iδ}-1|=2|sin(δ/2)|, which is at most |δ|. This contribution must be combined with the target-factor budget when the specification includes coherent control. Measuring only the target on an inactive branch cannot characterize that control-phase error.

Sources

  • A. Barenco et al. · · Research paper · Publication status unspecified · arXiv · DOI 10.1103/PhysRevA.52.3457
    Verification scope

    Selected source text checked ·

    Source anchors gate-decomposition conventions. New worked instances are independent mathematical constructions, not reported experiments.