1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
"""
The QPU module contains the API for interacting with Rigetti Quantum Processing Units (QPUs).
🔨 This page is under construction and the documentation for some submodules is missing.
In the meantime, you can find documentation in the [the type hints](https://github.com/rigetti/qcs-sdk-rust/tree/main/crates/python/qcs_sdk/qpu).
"""
=
"""
A row of readout values from the QPU. Each row contains all the values emitted
to a memory reference across all shots. There is a variant for each possible type
the list of readout values could be.
## Variants:
- ``integer``: Corresponds to the Quil ``BIT``, ``OCTET``, or ``INTEGER`` types.
- ``real``: Corresponds to the Quil ``REAL`` type.
- ``complex``: Corresponds to readout values containing complex numbers
## Methods (each per variant):
- ``is_*``: if the underlying values are that type.
- ``as_*``: if the underlying values are that type, then those values, otherwise ``None``.
- ``to_*``: the underlying values as that type, raises `ValueError` if they are not.
- ``from_*``: wrap underlying values as this enum type.
"""
"""Construct a new `ReadoutValues` from a list of values."""
...
"""Return the inner list of readout values."""
...
...
...
...
...
...
...
...
...
...
...
...
...
"""
A row of data containing the contents of a memory region at the end of a job. There
is a variant for each possible type the memory region could be.
## Variants:
- ``binary``: Corresponds to the Quil ``BIT`` and ``OCTET`` types.
- ``integer``: Corresponds to the Quil ``INTEGER`` types.
- ``real``: Corresponds to the Quil `RE`AL`` type.
Methods (each per variant):
- ``is_*``: if the underlying values are that type.
- ``as_*``: if the underlying values are that type, then those values, otherwise ``None``.
- ``to_*``: the underlying values as that type, raises `ValueError` if they are not.
- ``from_*``: wrap underlying values as this enum type.
"""
"""Construct a new `ReadoutValues` from a list of values."""
...
"""Return the inner list of readout values."""
...
...
...
...
...
...
...
...
...
...
...
...
...
"""
Encapsulates data returned from the QPU after executing a job.
`QPUResultData` contains "mappings", which map declared memory regions
in a program (ie. "ro[0]") to that regions readout key in `QPUResultData.readout_values`.
`readout_values` maps those readout keys to the values emitted for that region
across all shots.
Read more about QPU readout data in the
[QCS Documentation](https://docs.rigetti.com/qcs/guides/qpus-vs-qvms#qpu-readout-data)
"""
...
"""
Get the mappings of a memory region (ie. "ro[0]") to it's key name in `QPUResultData.readout_values`
"""
...
"""
Get the mappings of a readout values identifier (ie. "q0") to a set of `ReadoutValues`
"""
...
"""
Get mapping of a memory region (ie. "ro") to the final contents of that memory region.
"""
...
"""
Get a copy of this result data flattened into a `RawQPUReadoutData`. This reduces
the contained data down to primitive types, offering a simpler structure at the
cost of the type safety provided by `ReadoutValues` and `MemoryValues`.
"""
...
"""
Encapsulates data returned from the QPU after executing a job. Compared to
`QPUResultData.readout_values`, the readout values in this class are returned as lists
of numbers instead of values wrapped by the `ReadoutValues` class.
"""
"""
Get the mappings of a memory region (ie. "ro[0]") to it's key name in readout_values
"""
...
"""
Get the mappings of a readout values identifier (ie. "q0") to a list of those readout values
"""
...
"""
Get mapping of a memory region (ie. "ro") to the final contents of that memory region.
"""
...
"""A request to list available Quantum Processors failed."""
...
"""
Returns all available Quantum Processor (QPU) IDs.
:param client: The `qcs_sdk.client.QCSClient` to use. Creates one using environment configuration if unset - see https://docs.rigetti.com/qcs/references/qcs-client-configuration
:param timeout: Maximum duration to wait for API calls to complete, in seconds.
:raises ListQuantumProcessorsError: If the request to list available QPU IDs failed.
"""
...
"""
Returns all available Quantum Processor IDs.
(async analog of `list_quantum_processors`)
:param client: The `qcs_sdk.client.QCSClient` to use. Creates one using environment configuration if unset - see https://docs.rigetti.com/qcs/references/qcs-client-configuration
:param timeout: Maximum duration to wait for API calls to complete, in seconds.
:raises ListQuantumProcessorsError: If the request to list available QPU IDs failed.
"""
...