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

All sections

Saved
Skip Learn navigation
Encyclopedia
Topic

Controlled phase and controlled-Z

Two-qubit diagonal gates that add a phase only to a selected joint basis component.

Edition released Coverage: Overview · Technical
On this page

Definition and significance

A controlled phase gate CP(phi)=diag(1,1,1,exp(i phi)) changes the relative phase of |11> in the two-qubit computational basis. At phi=pi it becomes controlled-Z. The diagonal action leaves computational-basis measurement probabilities unchanged immediately after the gate, but subsequent interference can reveal the changed phase. This is why looking only at one histogram can miss an entangling operation.

Mechanism and mathematical treatment

CZ=|0><0| tensor I+|1><1| tensor Z is symmetric under exchanging the qubits. It is related to controlled-X by CX=(I tensor H)CZ(I tensor H). Acting on |++>, CP(phi) produces (|00>+|01>+|10>+exp(i phi)|11>)/2. A pure two-qubit state with coefficient matrix A is a product state precisely when det(A)=0. Here det(A)=(exp(i phi)-1)/4, which is nonzero unless phi is an integer multiple of 2pi.

Controlled-R_Z(phi) is different: its diagonal entries are 1,1,exp(-i phi/2),exp(i phi/2). It equals a phase correction on the control combined with CP(phi). Ignoring that correction introduces an observable relative phase on the control.

Fully worked reference example

Apply CZ to |++>. The output coefficient matrix is (1/2)[[1,1],[1,-1]]. Multiplying A A dagger yields I/2, so either qubit alone is maximally mixed; the joint state is maximally entangled. Yet its Z-basis outcomes remain 00,01,10,11 with equal probability. Apply H on the second qubit. By the CX identity, the state becomes (|00>+|11>)/sqrt(2), whose Z-basis outcomes are only 00 and 11.

For phi=pi/2, the same determinant test gives (i-1)/4, again nonzero. The state is entangled but not maximally entangled. The concurrence of this pure state is 2|det A|=|sin(phi/2)|=1/sqrt(2).

Limitations and common misconceptions

The word “phase” does not mean the gate is physically irrelevant. Only a phase multiplying every basis component equally is global. Native controlled-phase implementations may include additional single-qubit phases that must be specified or calibrated away.

Scientific relationships

CZ operations along graph edges prepare a graph state from plus states.

Synthesizing a controlled phase from parity phases

For bits a,b in {0,1}, the ordinary integer identity 2ab=a+b-(a XOR b) converts a two-body phase into three one-body phase functions. Therefore exp(i phi ab)=exp(i phi a/2) exp(i phi b/2) exp[-i phi(a XOR b)/2]. Implement the first two factors with P(phi/2) on each qubit. Compute a XOR b into b with a CNOT, apply P(-phi/2) to b, and undo the CNOT. The resulting diagonal entry is precisely exp(i phi ab), without an unspecified global phase.

Check all four inputs. For 00, all exponents vanish. For 01, the b phase and parity phase cancel. For 10, the a phase and parity phase cancel. For 11, the parity is zero, so the two positive phases add to phi. This complete basis check proves equality on arbitrary superpositions. It also makes clear why replacing one phase gate with an R_Z gate requires tracking its scalar factor across the whole construction.

At phi=pi, the construction gives CZ. At phi=pi/2, it applies i only to |11>. The two CNOTs are sequential through the same target, but the first two single-qubit phase gates can be parallel when the device supports that scheduling. A gate-count comparison and a depth comparison therefore answer different questions even in this small exact synthesis.

Entanglement spectrum as a continuous function of angle

For CP(phi)|++>, the reduced density matrix of q0 is [[1/2,(1+exp(-i phi))/4],[(1+exp(i phi))/4,1/2]]. A two-by-two Hermitian matrix with equal diagonal entries has eigenvalues 1/2 plus or minus the magnitude of its off-diagonal entry. Here that magnitude is |cos(phi/2)|/2, giving lambda_plus=(1+|cos(phi/2)|)/2 and lambda_minus=(1-|cos(phi/2)|)/2.

At phi=2pi/3, the two Schmidt probabilities are 3/4 and 1/4. The entanglement entropy in bits is -3/4 log2(3/4)-1/4 log2(1/4), approximately 0.811278. The concurrence is sqrt(3)/2. These are distinct summaries of the same pure-state entanglement, with different numerical scales. Neither quantity follows from the uniform computational histogram, which is identical for every phi.

The purity is lambda_plus^2+lambda_minus^2=(1+cos^2(phi/2))/2. It equals one at a multiple of 2pi and one-half at an odd multiple of pi. Near phi=0, the smaller Schmidt probability behaves as phi^2/16. Thus the state begins to acquire entanglement quadratically in the small phase, although certain interference amplitudes change linearly. This difference matters when interpreting a small-angle diagnostic.

A complete calibration-style ideal inference

One can infer the relative phase of this synthetic state through correlation measurements. For |psi_phi>=CP(phi)|++>, direct Pauli action gives <X tensor I>=(1+cos phi)/2, <Y tensor I>=sin phi/2, and <Z tensor Z>=0. The same single-qubit expectations hold with the qubits exchanged. For phi=2pi/3 they become 1/4, sqrt(3)/4 and zero. The reduced Bloch-vector length is one-half, agreeing with reduced eigenvalues 3/4 and 1/4.

These equations allow an ideal inversion: cos phi=2<X tensor I>-1 and sin phi=2<Y tensor I>. The angle is recovered with a two-argument arctangent. Finite-shot estimates may yield a point outside the unit circle because of statistical fluctuations; forcing the answer onto the circle is a fitted model, not an extra measurement. Moreover, a real preparation with additional noise need not lie on this one-parameter family. Observing one compatible expectation is insufficient to establish the full gate action.

The figure and inversion describe a deliberately specified input-state model. Full process characterization asks how the operation acts on a sufficiently rich set of inputs and is a different task. An alternative classical reference calculates the four amplitudes and their outer product directly. Because the state is only two qubits, there is no computational advantage claim in using a quantum device for this illustrative inference.

For coherent control of the entire operation, an otherwise global implementation phase becomes a relative phase between control branches. Any synthesis certified only up to global phase should be supplemented with the missing scalar before it is placed inside a larger controlled construction. The parity-phase identity above is useful because its basis check establishes exact equality, not equality modulo an unknown phase.

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.