Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/api/qiskit-c/dev/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
"title": "QkExitCode",
"url": "/docs/api/qiskit-c/dev/qk-exit-code"
},
{
"title": "QkNeighbors",
"url": "/docs/api/qiskit-c/dev/qk-neighbors"
},
{
"title": "QkObs",
"url": "/docs/api/qiskit-c/dev/qk-obs"
Expand Down
1 change: 1 addition & 0 deletions docs/api/qiskit-c/dev/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Using the transpiler from the C API is intended to only cover circuits created s
* [QkTranspiler](qk-transpiler)
* [QkTarget](qk-target)
* [QkTargetEntry](qk-target-entry)
* [QkNeighbors](qk-neighbors)
* [QkTranspileLayout](qk-transpile-layout)
* [Transpiler Passes](qk-transpiler-passes)
* [VF2 compiler-pass objects](qk-vf-2-layout)
Expand Down
36 changes: 17 additions & 19 deletions docs/api/qiskit-c/dev/qk-bit-term.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,35 +86,33 @@ The numeric structure of these is that they are all four-bit values of which the

## Functions

### qk\_bitterm\_label
**<span id="group__QkBitTerm_1gad8255603d800498cc15ac43da08b11a3" />uint8\_t qk\_bitterm\_label(QkBitTerm bit\_term)**

<Function id="qk_bitterm_label" signature="uint8_t qk_bitterm_label(QkBitTerm bit_term)">
Get the label for a bit term.
Get the label for a bit term.

<span id="group__QkBitTerm_1autotoc_md155" />
<span id="group__QkBitTerm_1autotoc_md156" />

#### Example
### Example

```c
QkBitTerm bit_term = QkBitTerm_Y;
// cast the uint8_t to char
char label = qk_bitterm_label(bit_term);
```
```c
QkBitTerm bit_term = QkBitTerm_Y;
// cast the uint8_t to char
char label = qk_bitterm_label(bit_term);
```

<span id="group__QkBitTerm_1autotoc_md156" />
<span id="group__QkBitTerm_1autotoc_md157" />

#### Safety
### Safety

<span id="group__QkBitTerm_1autotoc_md156" />
<span id="group__QkBitTerm_1autotoc_md157" />

The behavior is undefined if `bit_term` is not a valid `uint8_t` value of a `QkBitTerm`.
The behavior is undefined if `bit_term` is not a valid `uint8_t` value of a `QkBitTerm`.

**Parameters**
**Parameters**

**bit\_term** – The bit term.
* **bit\_term** – The bit term.

**Returns**
**Returns**

The label as `uint8_t`, which can be cast to `char` to obtain the character.
</Function>
The label as `uint8_t`, which can be cast to `char` to obtain the character.

34 changes: 16 additions & 18 deletions docs/api/qiskit-c/dev/qk-circuit-library.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,31 @@ The Qiskit circuit library contains functions for building commonly used quantum

## Functions

### qk\_circuit\_library\_quantum\_volume
**<span id="group__QkCircuitLibrary_1ga0439f468ed42f2ad0c4ee00206f6db1c" />QkCircuit \*qk\_circuit\_library\_quantum\_volume(uint32\_t num\_qubits, size\_t depth, int64\_t seed)**

<Function id="qk_circuit_library_quantum_volume" signature="QkCircuit *qk_circuit_library_quantum_volume(uint32_t num_qubits, size_t depth, int64_t seed)">
Generate a Quantum Volume model circuit
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.
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.
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)
\[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)

<span id="group__QkCircuitLibrary_1autotoc_md48" />
<span id="group__QkCircuitLibrary_1autotoc_md49" />

#### Parameters
### Parameters

<span id="group__QkCircuitLibrary_1autotoc_md48" />
<span id="group__QkCircuitLibrary_1autotoc_md49" />

* `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.
* `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.

<span id="group__QkCircuitLibrary_1autotoc_md49" />
<span id="group__QkCircuitLibrary_1autotoc_md50" />

#### Example
### Example

```c
QkCircuit *qc = qk_circuit_library_quantum_volume(10, 10, -1)
```
</Function>
```c
QkCircuit *qc = qk_circuit_library_quantum_volume(10, 10, -1)
```

Loading