quantum gate directory

Gates Groups SDKs GitHub
$\mathrm{C}Z$

controlled· 2 qubits

Controlled-Z

Applies a $-1$ phase to $|11\rangle$.

Open in Quirk ↗ hermitian

The controlled-$Z$ gate is a two-qubit diagonal entangling gate.

$$ \mathrm{C}Z = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \end{bmatrix} $$

Properties

  • Clifford, Hermitian, and self-inverse.
  • Related to CNOT by Hadamards on the target: $\mathrm{CNOT} = (I \otimes H)\,\mathrm{CZ}\,(I \otimes H)$.
  • Symmetric under exchange of the two qubits.

Usage

  • Native entangling gate on several hardware platforms.
  • Controlled phase flips and stabilizer circuits.

Also written

  • $\Lambda(Z)$
  • $\text{controlled-}Z$

Related

  • Controlled version of Pauli-Z
  • Controlled variant: Controlled-CZ

Groups

  • clifford
  • diagonal
  • orthogonal
  • number-preserving

Data

  • This gate as JSON
  • Edit this page on GitHub

The unitary, drawn

Every entry of the matrix as a disc. The area is the transition probability $|U_{jk}|^2$; the colour and the hand are the phase. Rows are outputs $\langle j|$, columns inputs $|k\rangle$, in the computational basis.

Phase

Disc area $= |U_{jk}|^2$. Hover an entry for its value, or take the JSON.

Weyl chamber

Where this gate sits among all two-qubit gates, up to single-qubit rotations before and after.

  • this gate
  • other gates
  • perfect entanglers

Coordinates:

not entangling entangling perfect entangler

$(a, b, c)$ means the gate equals $e^{i(a\,XX + b\,YY + c\,ZZ)}$ up to single-qubit gates, reduced to the chamber $\pi/4 \ge a \ge b \ge |c|$ (the convention of the canonical gate, Qiskit and Cirq). The $a = \pi/4$ face is a mirror: $(\pi/4, b, c)$ and $(\pi/4, b, -c)$ are the same gate. Drag the figure to rotate it, double-click to reset.

SDK support

How to call this gate in each framework. Hover a ⓘ for a note; the support matrix compares every gate at once.

SDKName
Qiskit qiskit.circuit.library.CZGate
PennyLane pennylane.CZ
Cirq cirq.CZ
Q# Std.Canon.CZ
PyQuil pyquil.gates.CZ
Braket braket.circuits.gates.CZ
BQSKit bqskit.ir.gates.CZGate
Qibo qibo.gates.CZ
pytket pytket.circuit.OpType.CZ
Stim CZ
OpenQASM stdgates.inc: cz

← All gates

gate.directory made by nts $\oplus$ rdls