← Atlas

Gates · Multi-qubit gate

CCZ (doubly-controlled Z) gate

The phase-only sibling of the Toffoli gate that applies a -1 phase exactly when all three qubits are |1⟩, symmetric in all three qubits and the natural three-qubit generalization of CZ.

Exact & formalUpdated

View frozen graph

q[0]q[1]q[2]Step 1 of 1 · CCZ · on q[0], q[1], q[2]CCZ

1 step across 3 wires. Hover a step, or press play to go through them in order.

Expected outcomes

  • |111⟩ phase-flipped100%
  • all other 7 inputs unchanged100%
  • Steps1
  • Wires3
  • Qubits3
  • Depth1 native / 3-gate decomposition around Toffoli (H, CCX, H)
  • T-count7 (inherited from Toffoli)
  • Papers2

CCZ matters wherever Grover-style diffusion or oracle marking needs a symmetric multi-controlled phase rather than a bit flip: because it treats all three qubits identically, it composes more transparently into larger multi-controlled-phase constructions than Toffoli does.

References

Exact & formal
  • Basis-state truth table
  • Unitary / matrix equivalence
  • Textbook / standard citation
Method
Apply CCZ to all eight computational-basis inputs and confirm only |111⟩ picks up a sign flip, with all other seven states unchanged.
Result
Pass · CCZ|111⟩ = -|111⟩ and CCZ leaves all other seven basis states unchanged.
OpenQASM 3 standard gate set ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
CC BY 4.0-compatible reference metadata
multi-controlledphasethree qubitnon-clifford

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.