← 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
Takes3 qubitsWhat joins here

Takes a 3-qubit register and states no assumption about what is on it. That is the whole condition: anything returning 3 qubits can feed it.

4 entries meet this end · 1 entry lines up on shape, composition unverified. Named below.

Returns3 qubitsWhat joins here

Returns a 3-qubit register a next stage can take. This is the end that joins.

2 entries meet this end · 14 entries line up on shape, composition unverified. Named below.

A unitary. The same register goes in and comes out, and this entry states no assumption about what is on it — which is what lets anything of the same width feed it. See all 29 →

Shapes fit before this, composition unverified 1

The widths and types line up. What is not established is everything a width does not carry — the basis convention, the normalisation, the state each was written to start from — so this is not a claim that the two compose.

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.