Quantum Lab
Quantum Lab

An interactive quantum mechanics learning platform and cryostat wiring co-design tool. From plain-language intuition to formal mathematics.

contact@quantumcircuitsimulator.com

Product

  • Circuit Lab
  • Learn
  • Hardware Studio
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Quantum Lab. All rights reserved.

This site, including its original quantum simulations, cryostat reference systems, 3D models, and interface design, contains protected proprietary material.

Home/Quantum Physics/Lessons/Controlled-Phase Gate
CP

Controlled-Phase Gate

Entanglement2-qubitctrl-phase

Applies a configurable phase rotation to the |11⟩ state.

Intuition

CP is the parameterized generalization of CZ. Where CZ always applies a −1 phase to |11⟩, CP lets you choose any phase angle θ. At θ = π, CP becomes CZ. At smaller angles, it applies more subtle phase rotations. This fine-grained phase control is exactly what appears in the Quantum Fourier Transform, where each qubit pair gets a CP gate with a different angle, building up the precise phase relationships needed for the transform.

Matrix representation
diag(1,1,1,eiθ)
Action on states
∣11⟩→eiθ∣11⟩,other basis states unchanged
Circuit
q0q1HCP
Precise explanation

CP(θ) = diag(1, 1, 1, exp(iθ)). It applies a phase of exp(iθ) to the |11⟩ component only. Like CZ, CP is symmetric between the two qubits. The gate is unitary and its inverse is CP(−θ). The QFT on n qubits uses CP gates with angles π/2^k for k = 1, ..., n−1.

Observable effect

Joint phase structure changes by angle θ.

Hidden effect

At θ = π this becomes the CZ gate.

Bloch sphere

Conditional phase rotation by θ. Symmetric between qubits. At θ = π, becomes CZ.

Worked example

CP in the Quantum Fourier Transform

  1. 1In a 3-qubit QFT, after applying H to qubit 0, you apply CP(π/2) between qubits 0 and 1.
  2. 2Then CP(π/4) between qubits 0 and 2.
  3. 3These controlled phases encode the frequency information that the QFT extracts.
  4. 4Each CP angle is π/2^k, where k is the distance between the qubits.
  5. 5The decreasing angles build up the precise phase pattern that maps computational basis states to frequency basis states.
Common use cases
  • Quantum Fourier Transform (core building block)
  • Phase estimation algorithm
  • Quantum arithmetic circuits
  • Simulation of physical systems with configurable interactions
Relation to other gates
  • CP(π) = CZ — CZ is a special case
  • CP is symmetric between the two qubits
  • CP(θ)^{†} = CP(−θ) — inverse is the negative angle
  • CP appears at every stage of the QFT with angles π/2^k
Common misconception

CP might look like a minor variation of CZ, but the ability to choose arbitrary angles is what makes algorithms like the QFT work. The precision of these angles directly determines the resolution of quantum phase estimation.

Why this gate matters

CP is the engine of the Quantum Fourier Transform, which underlies Shor’s factoring algorithm and quantum phase estimation. Understanding CP means understanding how quantum computers extract frequency and period information exponentially faster than classical computers.

Test your understanding

In the Quantum Fourier Transform, why do the CP angles decrease as π/2^k?

Quick reference →↗ Nielsen and Chuang, Quantum Computation and Quantum Information
←
Previous
Controlled-Z
Next
Measure
→
← Back to all lessons