qiskit.circuit.QuantumCircuit.size¶
- QuantumCircuit.size(filter_function=<function QuantumCircuit.<lambda>>)[source]¶
Returns total number of instructions in circuit.
- Paramètres
filter_function (callable) – a function to filter out some instructions. Should take as input a tuple of (Instruction, list(Qubit), list(Clbit)). By default filters out « directives », such as barrier or snapshot.
- Renvoie
Total number of gate operations.
- Type renvoyé
int