Skip to content

Commit 02ea741

Browse files
Update API dev docs (#4017)
An action recently synced the latest dev docs. This PR updates all dev APIs that changed. > [!NOTE] > This pull request was created by a GitHub action. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 1f2a260 commit 02ea741

File tree

62 files changed

+290
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+290
-235
lines changed

docs/api/qiskit-c/dev/_toc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"title": "API index",
66
"url": "/docs/api/qiskit-c/dev"
77
},
8+
{
9+
"title": "Cirucit Library",
10+
"url": "/docs/api/qiskit-c/dev/qk-circuit-library"
11+
},
812
{
913
"title": "QkBitTerm",
1014
"url": "/docs/api/qiskit-c/dev/qk-bit-term"

docs/api/qiskit-c/dev/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ As this interface is still new in Qiskit it should be considered experimental an
2222
* [QkQuantumRegister](qk-quantum-register)
2323
* [QkClassicalRegister](qk-classical-register)
2424

25+
### Circuit Library
26+
27+
* [Cirucit Library](qk-circuit-library)
28+
2529
## Quantum information
2630

2731
* [QkObs](qk-obs)

docs/api/qiskit-c/dev/qk-bit-term.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The numeric structure of these is that they are all four-bit values of which the
9191
<Function id="qk_bitterm_label" signature="uint8_t qk_bitterm_label(QkBitTerm bit_term)">
9292
Get the label for a bit term.
9393

94-
<span id="group__QkBitTerm_1autotoc_md93" />
94+
<span id="group__QkBitTerm_1autotoc_md144" />
9595

9696
#### Example
9797

@@ -101,11 +101,11 @@ The numeric structure of these is that they are all four-bit values of which the
101101
char label = qk_bitterm_label(bit_term);
102102
```
103103

104-
<span id="group__QkBitTerm_1autotoc_md94" />
104+
<span id="group__QkBitTerm_1autotoc_md145" />
105105

106106
#### Safety
107107

108-
<span id="group__QkBitTerm_1autotoc_md94" />
108+
<span id="group__QkBitTerm_1autotoc_md145" />
109109

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Cirucit Library (dev version)
3+
description: API reference for Cirucit Library in the dev version of qiskit-c
4+
in_page_toc_min_heading_level: 2
5+
python_api_type: module
6+
python_api_name: Cirucit Library
7+
---
8+
9+
# Cirucit Library
10+
11+
The Qiskit circuit library contains functions for building commonly used quantum circuits.
12+
13+
## Functions
14+
15+
### qk\_circuit\_library\_quantum\_volume
16+
17+
<Function id="qk_circuit_library_quantum_volume" signature="QkCircuit *qk_circuit_library_quantum_volume(uint32_t num_qubits, size_t depth, int64_t seed)">
18+
Generate a Quantum Volume model circuit
19+
20+
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.
21+
22+
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.
23+
24+
\[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)
25+
26+
<span id="group__QkCircuitLibrary_1autotoc_md48" />
27+
28+
#### Parameters
29+
30+
<span id="group__QkCircuitLibrary_1autotoc_md48" />
31+
32+
* `num_qubits`: The number qubits to use for the generated circuit.
33+
* `depth`: The number of layers for the generated circuit.
34+
* `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.
35+
36+
<span id="group__QkCircuitLibrary_1autotoc_md49" />
37+
38+
#### Example
39+
40+
```c
41+
QkCircuit *qc = qk_circuit_library_quantum_volume(10, 10, -1)
42+
```
43+
</Function>
44+

docs/api/qiskit-c/dev/qk-obs-term.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ This is a group of functions for interacting with an opaque (Rust-space) SparseT
6666
<Function id="qk_obsterm_str" signature="char *qk_obsterm_str(const QkObsTerm *term)">
6767
Return a string representation of the sparse term.
6868

69-
<span id="group__QkObsTerm_1autotoc_md91" />
69+
<span id="group__QkObsTerm_1autotoc_md142" />
7070

7171
#### Example
7272

@@ -78,11 +78,11 @@ This is a group of functions for interacting with an opaque (Rust-space) SparseT
7878
qk_str_free(string);
7979
```
8080
81-
<span id="group__QkObsTerm_1autotoc_md92" />
81+
<span id="group__QkObsTerm_1autotoc_md143" />
8282
8383
#### Safety
8484
85-
<span id="group__QkObsTerm_1autotoc_md92" />
85+
<span id="group__QkObsTerm_1autotoc_md143" />
8686
8787
Behavior is undefined `term` is not a valid, non-null pointer to a `QkObsTerm`.
8888

0 commit comments

Comments
 (0)