Skip to content

Commit dbc9868

Browse files
authored
Generate Qiskit 2.2.0 API docs (#3936)
This PR generated the docs for Qiskit 2.2.0 ``` # Historical versions npm run gen-api -- -p qiskit -v 2.1.2 --historical npm run gen-api -- -p qiskit-c -v 2.1.2 --historical # Latest versions npm run gen-api -- -p qiskit -v 2.2.0 npm run gen-api -- -p qiskit-c -v 2.2.0 # Dev versions npm run gen-api -- -p qiskit -v 2.3.0-dev --dev npm run gen-api -- -p qiskit -c-v 2.3.0-dev --dev ```
1 parent ba86157 commit dbc9868

File tree

1,741 files changed

+124489
-8257
lines changed

Some content is hidden

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

1,741 files changed

+124489
-8257
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "qiskit-c",
3+
"version": "2.1.2"
4+
}

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

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"title": "Qiskit SDK C API",
3+
"children": [
4+
{
5+
"title": "API index",
6+
"url": "/docs/api/qiskit-c/2.1"
7+
},
8+
{
9+
"title": "QkBitTerm",
10+
"url": "/docs/api/qiskit-c/2.1/qk-bit-term"
11+
},
12+
{
13+
"title": "QkCircuit",
14+
"url": "/docs/api/qiskit-c/2.1/qk-circuit"
15+
},
16+
{
17+
"title": "QkClassicalRegister",
18+
"url": "/docs/api/qiskit-c/2.1/qk-classical-register"
19+
},
20+
{
21+
"title": "QkComplex64",
22+
"url": "/docs/api/qiskit-c/2.1/qk-complex-64"
23+
},
24+
{
25+
"title": "QkExitCode",
26+
"url": "/docs/api/qiskit-c/2.1/qk-exit-code"
27+
},
28+
{
29+
"title": "QkObs",
30+
"url": "/docs/api/qiskit-c/2.1/qk-obs"
31+
},
32+
{
33+
"title": "QkObsTerm",
34+
"url": "/docs/api/qiskit-c/2.1/qk-obs-term"
35+
},
36+
{
37+
"title": "QkQuantumRegister",
38+
"url": "/docs/api/qiskit-c/2.1/qk-quantum-register"
39+
},
40+
{
41+
"title": "QkTarget",
42+
"url": "/docs/api/qiskit-c/2.1/qk-target"
43+
},
44+
{
45+
"title": "QkTargetEntry",
46+
"url": "/docs/api/qiskit-c/2.1/qk-target-entry"
47+
},
48+
{
49+
"title": "Release notes",
50+
"url": "/docs/api/qiskit/release-notes"
51+
}
52+
],
53+
"collapsed": true
54+
}

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Qiskit SDK C API API documentation (v2.1)
3+
description: Index of all the modules in qiskit-c v2.1.
4+
---
5+
6+
<span id="qiskit-c-api-qiskit-h" />
7+
8+
<span id="c-api" />
9+
10+
# Qiskit C API (`qiskit.h`)
11+
12+
The Qiskit C API is a low level interface to the core data model of Qiskit. It is designed to provide a high performance interface to Qiskit for compiled languages and provides a defined ABI to the internal Rust data model that is used to create the Python API. There are two expected modes of operation for the C API:
13+
14+
* A standalone shared library for creating and working with Qiskit objects from compiled languages without a runtime dependency on Python, and
15+
* For building Python extensions that are using Qiskit but interface directly with the Rust objects from the extension code without using Python for better performance.
16+
17+
To get started, see [Install the Qiskit C API](/docs/guides/install-c-api). To combine the C API with custom Python extensions, see [Extend Qiskit in Python with C](/docs/guides/c-extension-for-python).
18+
19+
As this interface is still new in Qiskit it should be considered experimental and the interface might change between minor version releases.
20+
21+
## Quantum Circuit
22+
23+
* [QkCircuit](qk-circuit)
24+
* [QkQuantumRegister](qk-quantum-register)
25+
* [QkClassicalRegister](qk-classical-register)
26+
27+
## Quantum information
28+
29+
* [QkObs](qk-obs)
30+
* [QkObsTerm](qk-obs-term)
31+
* [QkBitTerm](qk-bit-term)
32+
* [QkComplex64](qk-complex-64)
33+
* [QkExitCode](qk-exit-code)
34+
* [QkTarget](qk-target)
35+
* [QkTargetEntry](qk-target-entry)
36+
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: QkBitTerm (v2.1)
3+
description: API reference for QkBitTerm in qiskit-c v2.1
4+
in_page_toc_min_heading_level: 2
5+
python_api_type: module
6+
python_api_name: QkBitTerm
7+
---
8+
9+
# QkBitTerm
10+
11+
```c
12+
enum QkBitTerm
13+
```
14+
15+
An enum that to represent each of the single-qubit alphabet terms enumerated below.
16+
17+
## Values
18+
19+
* **`QkBitTerm_X`**
20+
21+
The Pauli $X$ operator.
22+
23+
Value: 2 (`0b0010`)
24+
25+
* **`QkBitTerm_Y`**
26+
27+
The Pauli $Y$ operator.
28+
29+
Value: 3 (`0b0011`)
30+
31+
* **`QkBitTerm_Z`**
32+
33+
The Pauli $Z$ operator.
34+
35+
Value: 1 (`0b0001`)
36+
37+
* **`QkBitTerm_Plus`**
38+
39+
The projector $\lvert +\rangle\langle +\rvert$ to the positive $X$ eigenstate.
40+
41+
Value: 10 (`0b1010`)
42+
43+
* **`QkBitTerm_Minus`**
44+
45+
The projector $\lvert -\rangle\langle -\rvert$ to the negative $X$ eigenstate.
46+
47+
Value: 6 (`0b0110`)
48+
49+
* **`QkBitTerm_Right`**
50+
51+
The projector $\lvert r\rangle\langle r\rvert$ to the positive $Y$ eigenstate.
52+
53+
Value: 11 (`0b1011`)
54+
55+
* **`QkBitTerm_Left`**
56+
57+
The projector $\lvert l\rangle\langle l\rvert$ to the negative $Y$ eigenstate.
58+
59+
Value: 7 (`0b0111`)
60+
61+
* **`QkBitTerm_Zero`**
62+
63+
The projector $\lvert 0\rangle\langle 0\rvert$ to the positive $Z$ eigenstate.
64+
65+
Value: 9 (`0b1001`)
66+
67+
* **`QkBitTerm_One`**
68+
69+
The projector $\lvert 1\rangle\langle 1\rvert$ to the negative $Z$ eigenstate.
70+
71+
Value: 5 (`0b0101`)
72+
73+
## Representation
74+
75+
The enum is stored as single byte, its elements are represented as unsigned 8-bit integer.
76+
77+
```c
78+
typedef uint8_t QkBitTerm
79+
```
80+
81+
<Admonition title="Warning" type="caution">
82+
Not all `uint8_t` values are valid bit terms. Passing invalid values is undefined behavior.
83+
</Admonition>
84+
85+
The numeric structure of these is that they are all four-bit values of which the low two bits are the (phase-less) symplectic representation of the Pauli operator related to the object, where the low bit denotes a contribution by $Z$ and the second lowest a contribution by $X$, while the upper two bits are `00` for a Pauli operator, `01` for the negative-eigenstate projector, and `10` for the positive-eigenstate projector.
86+
87+
## Functions
88+
89+
### qk\_bitterm\_label
90+
91+
<Function id="qk_bitterm_label" signature="uint8_t qk_bitterm_label(QkBitTerm bit_term)">
92+
Get the label for a bit term.
93+
94+
<span id="group__QkBitTerm_1autotoc_md91" />
95+
96+
#### Example
97+
98+
```c
99+
QkBitTerm bit_term = QkBitTerm_Y;
100+
// cast the uint8_t to char
101+
char label = qk_bitterm_label(bit_term);
102+
```
103+
104+
<span id="group__QkBitTerm_1autotoc_md92" />
105+
106+
#### Safety
107+
108+
<span id="group__QkBitTerm_1autotoc_md92" />
109+
110+
The behavior is undefined if `bit_term` is not a valid `uint8_t` value of a `QkBitTerm`.
111+
112+
**Parameters**
113+
114+
**bit\_term** – The bit term.
115+
116+
**Returns**
117+
118+
The label as `uint8_t`, which can be cast to `char` to obtain the character.
119+
</Function>
120+

0 commit comments

Comments
 (0)