---
title: QuantumVolume (latest version)
description: API reference for qiskit.circuit.library.QuantumVolume in the latest version of qiskit
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/qiskit.circuit.library.QuantumVolume
---

# QuantumVolume

*class* `qiskit.circuit.library.QuantumVolume(num_qubits, depth=None, seed=None, classical_permutation=True, *, flatten=False)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/circuit/library/quantum_volume.py#L25-L135)

Bases: [`QuantumCircuit`](/docs/api/qiskit/qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.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:

![Diagram illustrating the previously described circuit.](https://eu-de.quantum.cloud.ibm.com/docs/images/api/qiskit/qiskit-circuit-library-QuantumVolume-1.avif)

Expanded Circuit:

![Diagram illustrating the previously described circuit.](https://eu-de.quantum.cloud.ibm.com/docs/images/api/qiskit/qiskit-circuit-library-QuantumVolume-2.avif)

References:

\[1] A. Cross et al. Validating quantum computers using randomized model circuits, Phys. Rev. A 100, 032328 (2019). [arXiv:1811.12926](https://arxiv.org/abs/1811.12926)

> **Deprecated since version 2.2**
>
> The class `qiskit.circuit.library.quantum_volume.QuantumVolume` is deprecated as of Qiskit 2.2. It will be removed in Qiskit 3.0. Use the function qiskit.circuit.library.quantum\_volume instead.

**Parameters**

- **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – number of active qubits in model circuit.
- **depth** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*) – layers of SU(4) operations in model circuit.
- **seed** ([*int*](https://docs.python.org/3/library/functions.html#int) *| np.random.Generator | None*) – Random number generator or generator seed.
- **classical\_permutation** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – use classical permutations at every layer, rather than quantum.
- **flatten** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – If `False` (the default), construct a circuit that contains a single instruction, which in turn has the actual volume structure. If `True`, construct the volume structure directly.

## Attributes

### name

Type: `str`

A human-readable name for the circuit.

**Example**

```python
from qiskit import QuantumCircuit

qc = QuantumCircuit(2, 2, name="my_circuit")
print(qc.name)
```

```text
my_circuit
```
