Skip to main contentIBM Quantum Documentation


class qiskit.circuit.Operation

GitHub(opens in a new tab)

Bases: ABC(opens in a new tab)

Quantum operation interface.

The minimal interface that any object must fulfil in order to be added to a QuantumCircuit.

Concrete instances of this interface include Gate, Reset, Barrier, Measure, and operators such as Clifford.

The main purpose is to add allow abstract mathematical objects to be added directly onto abstract circuits, and for the exact syntheses of these to be determined later, during compilation.


Add a Clifford and a Toffoli gate to a QuantumCircuit.

from qiskit import QuantumCircuit
from qiskit.quantum_info import Clifford, random_clifford
qc = QuantumCircuit(3)
cliff = random_clifford(2)
qc.append(cliff, [0, 1])
qc.ccx(0, 1, 2)



Unique string identifier for operation type.


Number of classical bits.


Number of qubits.

Was this page helpful?
Report a bug or request content on GitHub.