QuantumVolume
class qiskit.circuit.library.QuantumVolume(num_qubits, depth=None, seed=None, classical_permutation=True, *, flatten=False)
Bases: QuantumCircuit
A quantum volume model circuit.
The model circuits are random instances of circuits used to measure the Quantum Volume metric, as introduced in [1].
The model circuits consist of layers of Haar random elements of SU(4) applied between corresponding pairs of qubits in a random bipartition.
Reference Circuit:

Expanded Circuit:

References:
[1] A. Cross et al. Validating quantum computers using randomized model circuits, Phys. Rev. A 100, 032328 (2019). [arXiv:1811.12926]
Create quantum volume model circuit of size num_qubits x depth.
Parameters
- num_qubits (int) – number of active qubits in model circuit.
- depth (Optional[int]) – layers of SU(4) operations in model circuit.
- seed (Optional[Union[int, np.random.Generator]]) – Random number generator or generator seed.
- classical_permutation (bool) – use classical permutations at every layer, rather than quantum.
- flatten (bool) – If
False
(the default), construct a circuit that contains a single instruction, which in turn has the actual volume structure. IfTrue
, construct the volume structure directly.
Attributes
name
Type: str
A human-readable name for the circuit.
Example
from qiskit import QuantumCircuit
qc = QuantumCircuit(2, 2, name="my_circuit")
print(qc.name)
my_circuit