![]() |
Quantum gates that are commonly used in the literature.
This module creates Gate instances for the following gates: X,Y,Z: Pauli gates. H,S: Clifford gates. T: A non-Clifford gate. CZ: Controlled phase gate. CNOT: Controlled not gate.
Each of these are implemented as EigenGates, which means that they can be raised to a power (i.e. cirq.H**0.5). See the definition in EigenGate.
Classes
class CNotPowGate
: A gate that applies a controlled power of an X gate.
class CXPowGate
: A gate that applies a controlled power of an X gate.
class CZPowGate
: A gate that applies a phase to the |11⟩ state of two qubits.
class HPowGate
: A Gate that performs a rotation around the X+Z axis of the Bloch sphere.
class Rx
: A gate, with matrix e^{-i X rads/2}, that rotates around the X axis of the Bloch sphere.
class Ry
: A gate, with matrix e^{-i Y rads/2}, that rotates around the Y axis of the Bloch sphere.
class Rz
: A gate, with matrix e^{-i Z rads/2}, that rotates around the Z axis of the Bloch sphere.
class XPowGate
: A gate that rotates around the X axis of the Bloch sphere.
class YPowGate
: A gate that rotates around the Y axis of the Bloch sphere.
class ZPowGate
: A gate that rotates around the Z axis of the Bloch sphere.
Functions
CNOT(...)
: The controlled NOT gate.
CX(...)
: The controlled NOT gate.
CZ(...)
: The controlled Z gate.
H(...)
: The Hadamard gate.
ISWAP(...)
: The iswap gate.
S(...)
: The Clifford S gate.
SWAP(...)
: The swap gate.
T(...)
: The non-Clifford T gate.
cphase(...)
: Returns a gate with the matrix diag(1, 1, 1, e^{i rads}.
rx(...)
: Returns a gate with the matrix e^{-i X rads / 2}.
ry(...)
: Returns a gate with the matrix e^{-i Y rads / 2}.
rz(...)
: Returns a gate with the matrix e^{-i Z rads / 2}.