Quantum instruction glossary¶
This page is a reference that defines the various quantum instructions you can use to manipulate qubits in a quantum circuit. Quantum instructions include quantum gates, such as the Hadamard gate, as well as operations that are not quantum gates, such as the measurement instruction.
To learn more about using quantum gates to create quantum algorithms, see the single and multiqubit gates chapter of the IBM textbook, Learn Quantum Computation using Qiskit.
Click on a quantum instruction below to view its definition.
H gate¶
The H or Hadamard gate rotates the states and to and , respectively. It is useful for making superpositions. As a Clifford gate, it is useful for moving information between the x and z bases.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


CX gate¶
The controlledX gate is also known as the controlledNOT. It acts on a pair of qubits, with one acting as ‘control’ and the other as ‘target’. It performs an X on the target whenever the control is in state . If the control qubit is in a superposition, this gate creates entanglement.
Composer reference 
OpenQASM reference 


Id gate¶
The identity gate is actually the absence of a gate. It ensures that nothing is applied to a qubit for one unit of gate time.
Composer reference 
OpenQASM reference 


Rx gate¶
The Rx gate requires a single parameter: an angle expressed in radians. On the Bloch sphere, this gate corresponds to rotating the qubit state around the x axis by the given angle.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


Ry gate¶
The Ry gate requires a single parameter: an angle expressed in radians. On the Bloch sphere, this gate corresponds to rotating the qubit state around the y axis by the given angle.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


Rz gate¶
The Rz gate requires a single parameter: an angle expressed in radians. On the Bloch sphere, this gate corresponds to rotating the qubit state around the z axis by the given angle.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


X gate¶
The Pauli X gate has the property of flipping the state to , and vice versa. It is equivalent to Rx for the angle .
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


Y gate¶
The Pauli Y gate is equivalent to Ry for the angle . It is also equivalent to the combined effect of X and Z.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


Z gate¶
The Pauli Z gate has the property of flipping the to , and vice versa. It is equivalent to Rz for the angle .
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


S gate¶
The S gate is equivalent to Rz for the angle . As a Clifford gate, it is useful for moving information between the x and y bases.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


Sdg gate¶
The inverse of the S gate. Equivalent to Rz for the angle . As a Clifford gate, it is useful for moving information between the x and y bases.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


T gate¶
The T gate is equivalent to Rz for the angle . Faulttolerant quantum computers will compile all quantum programs down to just the T gate and its inverse, as well as the Clifford gates.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


Tdg gate¶
The inverse of the T gate, which is equivalent to Rz for the angle . Faulttolerant quantum computers will compile all quantum programs down to just the T gate and its inverse, as well as the Clifford gates.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


cH gate¶
The controlledHadamard gate, like the controlledNOT, acts on a control and target qubit. It performs an H on the target whenever the control is in state .
Composer reference 
OpenQASM reference 


cZ gate¶
The controlledZ gate, like the controlledNOT, acts on a control and target qubit. It performs a Z on the target whenever the control is in state .
Composer reference 
OpenQASM reference 


cRz gate¶
The controlledRz gate, like the controlledNOT, acts on a control and target qubit. It performs a Rz rotation on the target whenever the control is in state .
Composer reference 
OpenQASM reference 


ccX gate¶
The ccX gate, commonly known as the Toffoli, has two control qubits and one target. At applies an X to the target only when both controls are in state .
Composer reference 
OpenQASM reference 


SWAP gate¶
The SWAP gate simply swaps the states of two qubits.
Composer reference 
OpenQASM reference 


Barrier operation¶
To make your quantum program more efficient, the compiler will try to combine gates. The barrier is an instruction to the compiler to prevent these combinations being made.
Composer reference 
OpenQASM reference 


operation¶
The reset operation returns a qubit to state , irrespective of its state before the operation was applied. It is not a reversible operation.
Composer reference 
OpenQASM reference 


IF operation¶
The IF operation allows quantum gates to be conditionally applied, depending on the state of a classical register.
Composer reference 
OpenQASM reference 


z measurement¶
Measurement in the standard basis, also known as the z basis or computational basis. Can be used to implement any kind of measurement when combined with gates. It is not a reversible operation.
Composer reference 
OpenQASM reference 


U3 gate¶
The three parameters allow the construction of any singlequbit gate. Has a duration of one unit of gate time.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 


U2 gate¶
The two parameters control two different rotations within the gate. Has a duration of one unit of gate time.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 

u2(pi/2,pi/2) q[0]; 
U1 gate¶
Equivalent to Rz. This can be implemented by the control software, requiring no actual manipulation of the qubits, and so effectively has a duration of zero.
Composer reference 
OpenQASM reference 
Bloch sphere rotation 

