---
title: Cirucit Library (v2.3)
description: API reference for Cirucit Library in qiskit-c v2.3
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit-c/2.3/qk-circuit-library
---

# Cirucit Library

The Qiskit circuit library contains functions for building commonly used quantum circuits.

## Functions

### qk\_circuit\_library\_quantum\_volume

`QkCircuit *qk_circuit_library_quantum_volume(uint32_t num_qubits, size_t depth, int64_t seed)`

Generate 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.

This function is multithreaded and will launch a thread pool with threads equal to the number of CPUs by default. You can tune the number of threads with the RAYON\_NUM\_THREADS environment variable. For example, setting RAYON\_NUM\_THREADS=4 would limit the thread pool to 4 threads.

\[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)

#### Example

```c
QkCircuit *qc = qk_circuit_library_quantum_volume(10, 10, -1)
```

**Parameters**

- **num\_qubits** – The number qubits to use for the generated circuit.
- **depth** – The number of layers for the generated circuit.
- **seed** – An RNG seed used for generating the random SU(4) matrices used in the output circuit. If the provided number is negative the seed used will be soured from system entropy.

**Returns**

A pointer to the quantum volume circuit.
