C-Phase gate
Identifier | Operator | Example statement |
---|---|---|
CZ | \(CZ\) | CZ q[0], q[1] |
Description
The C-Phase, or CZ, gate is a two-qubit gate. It performs a Z gate (negates the relative phase) on the second qubit, conditional on the state of the first qubit. The first qubit is usually referred to as the control qubit and the second qubit as the target qubit.
In the standard computational basis \(\{ |0\rangle ,|1\rangle \}\), the CZ gate:
- leaves the control qubit unchanged,
- performs a Z gate on the target qubit, when the control qubit is in state \(|1\rangle\),
- leaves the target qubit unchanged, when the control qubit is in state \(|0\rangle\).
Note
The notion of a control qubit and a target qubit (for any controlled operation) only holds for the standard computational basis. Generally, in another basis, both the 'control' and 'target' qubit change.
The CZ gate is a specific example of the controlled phase shift gate (CR gate): \(CZ = CR(\pi)\).
Aliases
Also known as C-Phase , controlled-Z , or controlled phase-flip gate.
Properties
- Clifford gate;
- Involutory operation (its own inverse);
- Controlled gate.
Representation
which is equal to:
Operation examples
Standard basis
Qubit state ordering
Note that qubits in a ket are ordered with qubit indices decreasing from left to right, i.e.,