sinter 1.15.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of sinter might be problematic. Click here for more details.
- sinter/__init__.py +47 -0
- sinter/_collection/__init__.py +10 -0
- sinter/_collection/_collection.py +480 -0
- sinter/_collection/_collection_manager.py +581 -0
- sinter/_collection/_collection_manager_test.py +287 -0
- sinter/_collection/_collection_test.py +317 -0
- sinter/_collection/_collection_worker_loop.py +35 -0
- sinter/_collection/_collection_worker_state.py +259 -0
- sinter/_collection/_collection_worker_test.py +222 -0
- sinter/_collection/_mux_sampler.py +56 -0
- sinter/_collection/_printer.py +65 -0
- sinter/_collection/_sampler_ramp_throttled.py +66 -0
- sinter/_collection/_sampler_ramp_throttled_test.py +144 -0
- sinter/_command/__init__.py +0 -0
- sinter/_command/_main.py +39 -0
- sinter/_command/_main_collect.py +350 -0
- sinter/_command/_main_collect_test.py +482 -0
- sinter/_command/_main_combine.py +84 -0
- sinter/_command/_main_combine_test.py +153 -0
- sinter/_command/_main_plot.py +817 -0
- sinter/_command/_main_plot_test.py +445 -0
- sinter/_command/_main_predict.py +75 -0
- sinter/_command/_main_predict_test.py +36 -0
- sinter/_data/__init__.py +20 -0
- sinter/_data/_anon_task_stats.py +89 -0
- sinter/_data/_anon_task_stats_test.py +35 -0
- sinter/_data/_collection_options.py +106 -0
- sinter/_data/_collection_options_test.py +24 -0
- sinter/_data/_csv_out.py +74 -0
- sinter/_data/_existing_data.py +173 -0
- sinter/_data/_existing_data_test.py +41 -0
- sinter/_data/_task.py +311 -0
- sinter/_data/_task_stats.py +244 -0
- sinter/_data/_task_stats_test.py +140 -0
- sinter/_data/_task_test.py +38 -0
- sinter/_decoding/__init__.py +16 -0
- sinter/_decoding/_decoding.py +419 -0
- sinter/_decoding/_decoding_all_built_in_decoders.py +25 -0
- sinter/_decoding/_decoding_decoder_class.py +161 -0
- sinter/_decoding/_decoding_fusion_blossom.py +193 -0
- sinter/_decoding/_decoding_mwpf.py +302 -0
- sinter/_decoding/_decoding_pymatching.py +81 -0
- sinter/_decoding/_decoding_test.py +480 -0
- sinter/_decoding/_decoding_vacuous.py +38 -0
- sinter/_decoding/_perfectionist_sampler.py +38 -0
- sinter/_decoding/_sampler.py +72 -0
- sinter/_decoding/_stim_then_decode_sampler.py +222 -0
- sinter/_decoding/_stim_then_decode_sampler_test.py +192 -0
- sinter/_plotting.py +619 -0
- sinter/_plotting_test.py +108 -0
- sinter/_predict.py +381 -0
- sinter/_predict_test.py +227 -0
- sinter/_probability_util.py +519 -0
- sinter/_probability_util_test.py +281 -0
- sinter-1.15.0.data/data/README.md +332 -0
- sinter-1.15.0.data/data/readme_example_plot.png +0 -0
- sinter-1.15.0.data/data/requirements.txt +4 -0
- sinter-1.15.0.dist-info/METADATA +354 -0
- sinter-1.15.0.dist-info/RECORD +62 -0
- sinter-1.15.0.dist-info/WHEEL +5 -0
- sinter-1.15.0.dist-info/entry_points.txt +2 -0
- sinter-1.15.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sinter
|
|
3
|
+
Version: 1.15.0
|
|
4
|
+
Summary: Samples stim circuits and decodes them using pymatching.
|
|
5
|
+
Author: Craig Gidney
|
|
6
|
+
Author-email: craig.gidney@gmail.com
|
|
7
|
+
License: Apache 2
|
|
8
|
+
Requires-Python: >=3.7.0
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: matplotlib
|
|
11
|
+
Requires-Dist: numpy
|
|
12
|
+
Requires-Dist: stim
|
|
13
|
+
Requires-Dist: scipy
|
|
14
|
+
Dynamic: author
|
|
15
|
+
Dynamic: author-email
|
|
16
|
+
Dynamic: description
|
|
17
|
+
Dynamic: description-content-type
|
|
18
|
+
Dynamic: license
|
|
19
|
+
Dynamic: requires-dist
|
|
20
|
+
Dynamic: requires-python
|
|
21
|
+
Dynamic: summary
|
|
22
|
+
|
|
23
|
+
# sinter: fast QEC sampling
|
|
24
|
+
|
|
25
|
+
Sinter is a software tool/library for doing fast monte carlo sampling of
|
|
26
|
+
quantum error correction circuits.
|
|
27
|
+
|
|
28
|
+
- [How it works](#how_it_works)
|
|
29
|
+
- [How to install](#how_to_install)
|
|
30
|
+
- [How to use: Python API](#how_to_use_python)
|
|
31
|
+
- [Sinter Python API Reference](doc/sinter_api.md)
|
|
32
|
+
- [How to use: Linux Command Line](#how_to_use_linux)
|
|
33
|
+
- [Sinter Command Line Reference](doc/sinter_command_line.md)
|
|
34
|
+
- [The csv format for sample statistics](#csv_format)
|
|
35
|
+
|
|
36
|
+
<a name="how_to_works"></a>
|
|
37
|
+
# How it works
|
|
38
|
+
|
|
39
|
+
Sinter takes Stim circuits annotated with noise, detectors, and logical
|
|
40
|
+
observables.
|
|
41
|
+
It uses stim to sample the circuits and a decoder such as pymatching to predict
|
|
42
|
+
whether the logical observables were flipped or not, given the detector data.
|
|
43
|
+
It records how often this succeeds, and how often it fails (the error rate).
|
|
44
|
+
|
|
45
|
+
Sinter uses python multiprocessing to do parallel sampling across multiple CPU
|
|
46
|
+
cores, dynamically decides which circuits need more samples based on parameters
|
|
47
|
+
specified by the user (such as a target number of errors), saves the results to
|
|
48
|
+
as simple CSV format, and has some basic plotting functionality for viewing the
|
|
49
|
+
results.
|
|
50
|
+
|
|
51
|
+
Sinter doesn't support cloud compute, but it does scale well on a single
|
|
52
|
+
machine.
|
|
53
|
+
I've tested it on 2 core machines, 4 core machines, and 96 core machines.
|
|
54
|
+
Although there are potential pitfalls (e.g. setting batch sizes too large causes
|
|
55
|
+
thrashing), sinter generally achieves good resource utilization of the processes
|
|
56
|
+
you assign to it.
|
|
57
|
+
|
|
58
|
+
<a name="how_to_install"></a>
|
|
59
|
+
# How to install
|
|
60
|
+
|
|
61
|
+
Sinter is available as a pypi package. It can be installed using pip:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
pip install sinter
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
When you are in a python virtual environment with sinter installed, you have
|
|
68
|
+
access to a command line command `sinter` which can be used to perform tasks
|
|
69
|
+
from the command line. You can also `import sinter` in a python program in order
|
|
70
|
+
to use sinter's python API.
|
|
71
|
+
|
|
72
|
+
<a name="how_to_use_python"></a>
|
|
73
|
+
# How to use: Python API
|
|
74
|
+
|
|
75
|
+
This example assumes you are in a python environment with `sinter` and
|
|
76
|
+
`pymatching` installed.
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
import stim
|
|
80
|
+
import sinter
|
|
81
|
+
import matplotlib.pyplot as plt
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# Generates surface code circuit tasks using Stim's circuit generation.
|
|
85
|
+
def generate_example_tasks():
|
|
86
|
+
for p in [0.001, 0.005, 0.01]:
|
|
87
|
+
for d in [3, 5]:
|
|
88
|
+
yield sinter.Task(
|
|
89
|
+
circuit=stim.Circuit.generated(
|
|
90
|
+
rounds=d,
|
|
91
|
+
distance=d,
|
|
92
|
+
after_clifford_depolarization=p,
|
|
93
|
+
code_task=f'surface_code:rotated_memory_x',
|
|
94
|
+
),
|
|
95
|
+
json_metadata={
|
|
96
|
+
'p': p,
|
|
97
|
+
'd': d,
|
|
98
|
+
},
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def main():
|
|
103
|
+
# Collect the samples (takes a few minutes).
|
|
104
|
+
samples = sinter.collect(
|
|
105
|
+
num_workers=4,
|
|
106
|
+
max_shots=1_000_000,
|
|
107
|
+
max_errors=1000,
|
|
108
|
+
tasks=generate_example_tasks(),
|
|
109
|
+
decoders=['pymatching'],
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
# Print samples as CSV data.
|
|
113
|
+
print(sinter.CSV_HEADER)
|
|
114
|
+
for sample in samples:
|
|
115
|
+
print(sample.to_csv_line())
|
|
116
|
+
|
|
117
|
+
# Render a matplotlib plot of the data.
|
|
118
|
+
fig, ax = plt.subplots(1, 1)
|
|
119
|
+
sinter.plot_error_rate(
|
|
120
|
+
ax=ax,
|
|
121
|
+
stats=samples,
|
|
122
|
+
group_func=lambda stat: f"Rotated Surface Code d={stat.json_metadata['d']}",
|
|
123
|
+
x_func=lambda stat: stat.json_metadata['p'],
|
|
124
|
+
)
|
|
125
|
+
ax.loglog()
|
|
126
|
+
ax.set_ylim(1e-5, 1)
|
|
127
|
+
ax.grid()
|
|
128
|
+
ax.set_title('Logical Error Rate vs Physical Error Rate')
|
|
129
|
+
ax.set_ylabel('Logical Error Probability (per shot)')
|
|
130
|
+
ax.set_xlabel('Physical Error Rate')
|
|
131
|
+
ax.legend()
|
|
132
|
+
|
|
133
|
+
# Save to file and also open in a window.
|
|
134
|
+
fig.savefig('plot.png')
|
|
135
|
+
plt.show()
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# NOTE: This is actually necessary! If the code inside 'main()' was at the
|
|
139
|
+
# module level, the multiprocessing children spawned by sinter.collect would
|
|
140
|
+
# also attempt to run that code.
|
|
141
|
+
if __name__ == '__main__':
|
|
142
|
+
main()
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Example output to stdout:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
shots, errors, discards, seconds,decoder,strong_id,json_metadata
|
|
149
|
+
1000000, 837, 0, 36.6,pymatching,9f7e20c54fec45b6aef7491b774dd5c0a3b9a005aa82faf5b9c051d6e40d60a9,"{""d"":3,""p"":0.001}"
|
|
150
|
+
53498, 1099, 0, 6.52,pymatching,3f40432443a99b933fb548b831fb54e7e245d9d73a35c03ea5a2fb2ce270f8c8,"{""d"":3,""p"":0.005}"
|
|
151
|
+
16269, 1023, 0, 3.23,pymatching,17b2e0c99560d20307204494ac50e31b33e50721b4ebae99d9e3577ae7248874,"{""d"":3,""p"":0.01}"
|
|
152
|
+
1000000, 151, 0, 77.3,pymatching,e179a18739201250371ffaae0197d8fa19d26b58dfc2942f9f1c85568645387a,"{""d"":5,""p"":0.001}"
|
|
153
|
+
11363, 1068, 0, 12.5,pymatching,a4dec28934a033215ff1389651a26114ecc22016a6e122008830cf7dd04ba5ad,"{""d"":5,""p"":0.01}"
|
|
154
|
+
61569, 1001, 0, 24.5,pymatching,2fefcc356752482fb4c6d912c228f6d18762f5752796c668b6abeb7775f5de92,"{""d"":5,""p"":0.005}"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
and the corresponding image saved to `plot.png`:
|
|
158
|
+
|
|
159
|
+

|
|
160
|
+
|
|
161
|
+
## python API utility methods
|
|
162
|
+
|
|
163
|
+
Sinter's python module exposes a variety of methods that are handy for plotting
|
|
164
|
+
or analyzing QEC data.
|
|
165
|
+
See the [sinter API reference](https://github.com/quantumlib/Stim/blob/main/doc/sinter_api.md).
|
|
166
|
+
|
|
167
|
+
<a name="how_to_use_linux"></a>
|
|
168
|
+
# How to use: Linux Command Line
|
|
169
|
+
|
|
170
|
+
This example assumes you are using a linux command line in a python virtualenv with `sinter` installed.
|
|
171
|
+
|
|
172
|
+
## pick circuits
|
|
173
|
+
|
|
174
|
+
For this example, we will use Stim's circuit generation functionality to produce
|
|
175
|
+
circuits to benchmark.
|
|
176
|
+
We will make rotated surface code circuits with various physical error rates,
|
|
177
|
+
with filenames like `rotated_d5_p0.001_surface_code.stim`.
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
mkdir -p circuits
|
|
181
|
+
python -c "
|
|
182
|
+
|
|
183
|
+
import stim
|
|
184
|
+
|
|
185
|
+
for p in [0.001, 0.005, 0.01]:
|
|
186
|
+
for d in [3, 5]:
|
|
187
|
+
with open(f'circuits/d={d},p={p},b=X,type=rotated_surface_memory.stim', 'w') as f:
|
|
188
|
+
c = stim.Circuit.generated(
|
|
189
|
+
rounds=d,
|
|
190
|
+
distance=d,
|
|
191
|
+
after_clifford_depolarization=p,
|
|
192
|
+
after_reset_flip_probability=p,
|
|
193
|
+
before_measure_flip_probability=p,
|
|
194
|
+
before_round_data_depolarization=p,
|
|
195
|
+
code_task=f'surface_code:rotated_memory_x')
|
|
196
|
+
print(c, file=f)
|
|
197
|
+
"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Normally, making the circuit files is the hardest step, because they are what
|
|
201
|
+
specifies the problem you are sampling from.
|
|
202
|
+
Almost all of the work you do will generally involve creating the exact perfect
|
|
203
|
+
circuit file for your needs.
|
|
204
|
+
But this is just an example, so we'll use normal surface code circuits.
|
|
205
|
+
|
|
206
|
+
# collect
|
|
207
|
+
|
|
208
|
+
You can use sinter to collect statistics on each circuit by using the `sinter collect` command.
|
|
209
|
+
This command takes options specifying how much data to collect, how to do decoding, etc.
|
|
210
|
+
|
|
211
|
+
The `processes` argument decides how many workers to use. Set it to `auto` to set
|
|
212
|
+
it to the number of CPUs on your machine.
|
|
213
|
+
|
|
214
|
+
The `metadata_func` argument can be used to specify custom python expression that turns the `path`
|
|
215
|
+
into a dictionary or other JSON object associated with the circuit.
|
|
216
|
+
If you set `metadata_func` to `auto` then will use the method
|
|
217
|
+
`sinter.comma_separated_key_values(path)` which parses
|
|
218
|
+
stim circuit paths like `folder/a=2,b=test.stim` into a dictionary like `{'a': 2, 'b': 'test'}`.
|
|
219
|
+
|
|
220
|
+
By default, sinter writes the collected statistics to stdout as CSV data.
|
|
221
|
+
One particularly important option that changes this behavior is `--save_resume_filepath`,
|
|
222
|
+
which allows the command to be interrupted and restarted without losing data.
|
|
223
|
+
Any data already at the file specified by `--save_resume_filepath` will count towards the
|
|
224
|
+
amount of statistics asked to be collected, and sinter will append new statistics to this file
|
|
225
|
+
instead of overwriting it.
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
sinter collect \
|
|
229
|
+
--processes auto \
|
|
230
|
+
--circuits circuits/*.stim \
|
|
231
|
+
--metadata_func auto \
|
|
232
|
+
--decoders pymatching \
|
|
233
|
+
--max_shots 1_000_000 \
|
|
234
|
+
--max_errors 1000 \
|
|
235
|
+
--save_resume_filepath stats.csv
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Beware that if you SIGKILL or SIGTEM sinter, instead of just using SIGINT, it's possible
|
|
239
|
+
(though unlikely) that you are killing it just as it writes a row of CSV data. This truncates
|
|
240
|
+
the data, which requires manual intervention on your part to fix (e.g. by deleting the partial row
|
|
241
|
+
using a text editor).
|
|
242
|
+
|
|
243
|
+
# combine
|
|
244
|
+
|
|
245
|
+
Note that the CSV data written by sinter will contain multiple rows for each case, because
|
|
246
|
+
sinter starts by running small batches to see roughly what the error rate is before moving
|
|
247
|
+
to larger batch sizes.
|
|
248
|
+
|
|
249
|
+
You can get a single-row-per-case CSV file by using `sinter combine`:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
sinter combine stats.csv
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
shots, errors, discards, seconds,decoder,strong_id,json_metadata
|
|
257
|
+
58591, 1067, 0, 5.50,pymatching,bb46c8fca4d9fd9d4d27a5039686332ac5e24011a7f2aea5a65f6040445567c0,"{""b"":""X"",""d"":3,""p"":0.005,""type"":""rotated_surface_memory""}"
|
|
258
|
+
1000000, 901, 0, 73.4,pymatching,4c0780830fe1747ab22767b69d1178f803943c83dd4afa6d241acf02e6dfa71f,"{""b"":""X"",""d"":3,""p"":0.001,""type"":""rotated_surface_memory""}"
|
|
259
|
+
16315, 1026, 0, 2.39,pymatching,64d81b177ef1a455644ac3e03f374394cd8ad385ba2ee0ac147b2405107564fc,"{""b"":""X"",""d"":3,""p"":0.01,""type"":""rotated_surface_memory""}"
|
|
260
|
+
1000000, 157, 0, 116.5,pymatching,100855c078af0936d098cecbd8bfb7591c0951ae69527c002c9c5f4c79bde129,"{""b"":""X"",""d"":5,""p"":0.001,""type"":""rotated_surface_memory""}"
|
|
261
|
+
61677, 1005, 0, 21.2,pymatching,6d7b8b312a5460c7fe08119d3c7a040daa25bd34d524611160e4aac6196293fe,"{""b"":""X"",""d"":5,""p"":0.005,""type"":""rotated_surface_memory""}"
|
|
262
|
+
10891, 1021, 0, 7.43,pymatching,477252e968f0f22f64ccb058c0e1e9c77b765f60f74df8b6707de7ec65ed13b7,"{""b"":""X"",""d"":5,""p"":0.01,""type"":""rotated_surface_memory""}"
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
# plot
|
|
266
|
+
|
|
267
|
+
You can use `sinter plot` to view the results you've collected.
|
|
268
|
+
This command takes a CSV file, an argument `--group_func` indicating how to
|
|
269
|
+
group the statistics into curves, an argument `--x_func` indicating how to
|
|
270
|
+
pick the X coordinate of each point, and various other arguments. Each `*_func`
|
|
271
|
+
argument takes a string that will be evaluated as a python expression, with
|
|
272
|
+
various useful values in scope such as a `metadata` value containing the
|
|
273
|
+
json metadata for the various points being evaluated. There is also a special
|
|
274
|
+
`m` value where `m.key` is shorthand for `metadata.get('key', None)`.
|
|
275
|
+
|
|
276
|
+
Here is an example of a `sinter plot` command:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
sinter plot \
|
|
280
|
+
--in stats.csv \
|
|
281
|
+
--group_func "f'''Rotated Surface Code d={m.d}'''" \
|
|
282
|
+
--x_func m.p \
|
|
283
|
+
--xaxis "[log]Physical Error Rate" \
|
|
284
|
+
--fig_size 1024 1024 \
|
|
285
|
+
--out surface_code_figure.png \
|
|
286
|
+
--show
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Which will save a png image of, and also open a window showing, a plot like this one:
|
|
290
|
+
|
|
291
|
+

|
|
292
|
+
|
|
293
|
+
<a name="csv_format"></a>
|
|
294
|
+
# The csv format for sample statistics
|
|
295
|
+
|
|
296
|
+
Sinter saves samples as a table using a Comma Separated Value format.
|
|
297
|
+
For example:
|
|
298
|
+
|
|
299
|
+
```
|
|
300
|
+
shots,errors,discards,seconds,decoder,strong_id,json_metadata
|
|
301
|
+
1000000, 837, 0, 36.6,pymatching,9f7e20c54fec45b6aef7491b774dd5c0a3b9a005aa82faf5b9c051d6e40d60a9,"{""d"":3,""p"":0.001}"
|
|
302
|
+
53498, 1099, 0, 6.52,pymatching,3f40432443a99b933fb548b831fb54e7e245d9d73a35c03ea5a2fb2ce270f8c8,"{""d"":3,""p"":0.005}"
|
|
303
|
+
16269, 1023, 0, 3.23,pymatching,17b2e0c99560d20307204494ac50e31b33e50721b4ebae99d9e3577ae7248874,"{""d"":3,""p"":0.01}"
|
|
304
|
+
1000000, 151, 0, 77.3,pymatching,e179a18739201250371ffaae0197d8fa19d26b58dfc2942f9f1c85568645387a,"{""d"":5,""p"":0.001}"
|
|
305
|
+
11363, 1068, 0, 12.5,pymatching,a4dec28934a033215ff1389651a26114ecc22016a6e122008830cf7dd04ba5ad,"{""d"":5,""p"":0.01}"
|
|
306
|
+
61569, 1001, 0, 24.5,pymatching,2fefcc356752482fb4c6d912c228f6d18762f5752796c668b6abeb7775f5de92,"{""d"":5,""p"":0.005}"
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
The columns are:
|
|
310
|
+
|
|
311
|
+
- `shots` (unsigned int): How many times the circuit was sampled.
|
|
312
|
+
- `errors` (unsigned int): How many times the decoder failed to predict any logical observable.
|
|
313
|
+
- `discards` (unsigned int): How many times a shot was discarded because a postselected detector fired or because the decoder incorrectly predicted the value of a postselected observable. Discarded shots never count as errors.
|
|
314
|
+
- `seconds` (non-negative float): How many CPU core seconds it took to simulate and decode these shots.
|
|
315
|
+
- `decoder` (str): Which decoder was used.
|
|
316
|
+
- `strong_id` (str):
|
|
317
|
+
Hex representation of a cryptographic hash of the problem
|
|
318
|
+
being sampled from.
|
|
319
|
+
The hashed data includes the exact circuit that was simulated,
|
|
320
|
+
the decoder that was used,
|
|
321
|
+
the exact detector error model that was given to the decoder,
|
|
322
|
+
the postselection rules that were applied,
|
|
323
|
+
and the metadata associated with the circuit.
|
|
324
|
+
The purpose of the strong id is to make it impossible to accidentally combine
|
|
325
|
+
shots that were from separate circuits or separate versions of a circuit.
|
|
326
|
+
- `json_metadata` (json): A free form field that can store any value representable in
|
|
327
|
+
[Java Script Object Notation](https://json.org). For example, this could be a
|
|
328
|
+
dictionary with helpful keys like "noise_level" or "circuit_name". The json
|
|
329
|
+
value is serialized into JSON and then escaped so that it can be put into the
|
|
330
|
+
CSV data (e.g. quotes get doubled up).
|
|
331
|
+
- `custom_counts` (json[Dict[str, int]]): An optional field that can store a
|
|
332
|
+
dictionary from string keys to integer counts represented in
|
|
333
|
+
[Java Script Object Notation](https://json.org).
|
|
334
|
+
The counts can be a huge variety of things, ranging from per-observable error
|
|
335
|
+
counts to detection event counts. In general, any value that should be added
|
|
336
|
+
when merging rows could be in these counters.
|
|
337
|
+
|
|
338
|
+
Note shots may be spread across multiple rows.
|
|
339
|
+
For example, this data:
|
|
340
|
+
|
|
341
|
+
```
|
|
342
|
+
shots,errors,discards,seconds,decoder,strong_id,json_metadata
|
|
343
|
+
500000, 437, 0, 20.5,pymatching,9f7e20c54fec45b6aef7491b774dd5c0a3b9a005aa82faf5b9c051d6e40d60a9,"{""d"":3,""p"":0.001}"
|
|
344
|
+
500000, 400, 0, 16.1,pymatching,9f7e20c54fec45b6aef7491b774dd5c0a3b9a005aa82faf5b9c051d6e40d60a9,"{""d"":3,""p"":0.001}"
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
has the same total statistics as this data:
|
|
348
|
+
|
|
349
|
+
```
|
|
350
|
+
shots,errors,discards,seconds,decoder,strong_id,json_metadata
|
|
351
|
+
1000000, 837, 0, 36.6,pymatching,9f7e20c54fec45b6aef7491b774dd5c0a3b9a005aa82faf5b9c051d6e40d60a9,"{""d"":3,""p"":0.001}"
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
just split over two rows instead of combined into one.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
sinter/__init__.py,sha256=BQFyNM08FTc5i_N88F5M1ZTKFokxf8S9p9voKDEddl0,946
|
|
2
|
+
sinter/_plotting.py,sha256=nlnKNwVJQMzZvP3u6aITcC1FZpzPFMh3QgZg9Xzh5WE,27779
|
|
3
|
+
sinter/_plotting_test.py,sha256=br3zFWO90tUNRCFAKsze74neyCw7oA6WPp5aimV3YhI,4181
|
|
4
|
+
sinter/_predict.py,sha256=7iZJyuq993Mi4fFndGEo71fzbS0P1yPS_YYUJcqRYSQ,14688
|
|
5
|
+
sinter/_predict_test.py,sha256=Hsq7TbnU3sXfiEHPSRGAP7Q9y3-IRVxGfgQHccvJ0Xw,5852
|
|
6
|
+
sinter/_probability_util.py,sha256=fCGp7mzkc8KMnZoh_h9bP-VFKMiayFKJN8dRhCzBDdg,21041
|
|
7
|
+
sinter/_probability_util_test.py,sha256=DeEkqGEJ2qHYqxrF6my86ZhNaym21Bqbsf8RbNguZj4,8756
|
|
8
|
+
sinter/_collection/__init__.py,sha256=3XzHBrE0EpXZJB7pfUSZI4jCk7oOLFGuCTYSPZV_OLM,246
|
|
9
|
+
sinter/_collection/_collection.py,sha256=6rVY9bf86HAf2VJbK03R_u36wtp_Mko0vRPe_jbfwLA,22189
|
|
10
|
+
sinter/_collection/_collection_manager.py,sha256=DXA9SPgpCFS7eZNMTUZsj4z0wc47qs0ujlAaDAJujg8,25608
|
|
11
|
+
sinter/_collection/_collection_manager_test.py,sha256=8VbokuLL3Ukv2SVbM8Dvpgq6K-XZkb--OSBJ5s0iNY0,10894
|
|
12
|
+
sinter/_collection/_collection_test.py,sha256=hIch-CEd76inAJ-kulUqyB9V2oY4s2sbrPvRacE5uvI,10472
|
|
13
|
+
sinter/_collection/_collection_worker_loop.py,sha256=THya6mUrIdAOv8Ypp4zprK2rykbITpLk3kXVfbFrLjI,953
|
|
14
|
+
sinter/_collection/_collection_worker_state.py,sha256=se_rEf3ooWOy5Bwbh62k5ZvHQV1MnTUb9OXVoZh9-kE,10078
|
|
15
|
+
sinter/_collection/_collection_worker_test.py,sha256=wirzBTlnctXoMxt-lm6lFfMcexxMXqPLYMIqNdTnAww,6379
|
|
16
|
+
sinter/_collection/_mux_sampler.py,sha256=PeiKCmtl2fmWUBuIKHLotokyQ2aRgJZ7hd6ASwecnO0,2532
|
|
17
|
+
sinter/_collection/_printer.py,sha256=wLIYX55dg8YmmbMazJ6fi0OuutN9vx8-jUQyMqLGZeE,2345
|
|
18
|
+
sinter/_collection/_sampler_ramp_throttled.py,sha256=iuMsxUYInQT_m5k2z2x1dwSEbMYQ8cwQHDD-XZdmnqA,2619
|
|
19
|
+
sinter/_collection/_sampler_ramp_throttled_test.py,sha256=16c0hCCStKxbA_1xILZYKc2UZ-vXwm7OaHaC5o6m7z4,4424
|
|
20
|
+
sinter/_command/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
sinter/_command/_main.py,sha256=OCtw5yu-oiCd635TRhpbBpC4r41K1eOTIV9kteP0ZBQ,1488
|
|
22
|
+
sinter/_command/_main_collect.py,sha256=wA4GieUjNnpf9zx6B0RlzvWVF0Hu-yq319pIqU4QeOw,19022
|
|
23
|
+
sinter/_command/_main_collect_test.py,sha256=HQS8bLauXSCIFy00cW5019fpR2IbWaY9_V9pWW1g34g,15189
|
|
24
|
+
sinter/_command/_main_combine.py,sha256=ep6RNdvJUJy32OBe1vDYl3w0OStHvbaG5_GOm0QR2Ww,3082
|
|
25
|
+
sinter/_command/_main_combine_test.py,sha256=ZmWCztDoj6jfsR7shJsUmW3mEa2Jh2HbTVnydcNl1HQ,6800
|
|
26
|
+
sinter/_command/_main_plot.py,sha256=w-hcKxQfRc6181jY9FYX9ylya6IIa5lSqiD535eGW-o,37932
|
|
27
|
+
sinter/_command/_main_plot_test.py,sha256=RQZJXQVwFwnAKbFWpg5-1KfG9qrfirqmhLP4V4YJ9JI,14590
|
|
28
|
+
sinter/_command/_main_predict.py,sha256=7aA-00-wNy0Xffrc5UXyQeQMGu53poT2iBo5NfJMjVI,3315
|
|
29
|
+
sinter/_command/_main_predict_test.py,sha256=JsHJpavQUMZ7MxIBSKfoZdXxWGPeaLWNak8fEMRFfTQ,860
|
|
30
|
+
sinter/_data/__init__.py,sha256=IuUsljA4_39dVF-Ifd40z6mCkaGbvuchYJfES53TPio,411
|
|
31
|
+
sinter/_data/_anon_task_stats.py,sha256=BqCdh46rVIkG_rUjJAZWk3eXaIll95LApQXZVDHxv9k,3408
|
|
32
|
+
sinter/_data/_anon_task_stats_test.py,sha256=3NliI_eY5Pnmo6DRpYW42G3KMNPq6bTOarNEqGRW_Ag,1720
|
|
33
|
+
sinter/_data/_collection_options.py,sha256=VM2UA04QsApE3FcVdya4QPbWFKfbfMLY5ncvcZdcnQE,4913
|
|
34
|
+
sinter/_data/_collection_options_test.py,sha256=RK0_aF_NF37DRjDTF-pySQixc66KdLF7wBAru2JeBTg,1074
|
|
35
|
+
sinter/_data/_csv_out.py,sha256=WNeSV02XjpJ2cGwGVSOEEkFn5dCrMZm5O5_OQodlixw,2296
|
|
36
|
+
sinter/_data/_existing_data.py,sha256=6SgSrUtyxiI4N0CSrg4yN75WITQC2CP-6ssUuXnlUtE,7283
|
|
37
|
+
sinter/_data/_existing_data_test.py,sha256=XMHOeAVoRc-CyW1E-vKUMN7Wgx17l18qhCt5W8fm4t0,2101
|
|
38
|
+
sinter/_data/_task.py,sha256=FmSJl7lFBitMQ2fLWDe9GN-W-bZjqwn6hcwbG7l3rcU,15633
|
|
39
|
+
sinter/_data/_task_stats.py,sha256=9564xk9JbqlV5u4HBumUlebX2_hZcKmfkrdedE7VU-M,10270
|
|
40
|
+
sinter/_data/_task_stats_test.py,sha256=C5Hbht_UitdX_Xt7E5UofcSet9OHZ6SsCDXWxahkDNQ,4116
|
|
41
|
+
sinter/_data/_task_test.py,sha256=8oe-ER_Rs4m7_19QQJZF0NArkpMJxQhf9whBeqfVmQA,1467
|
|
42
|
+
sinter/_decoding/__init__.py,sha256=dVsxCaPLTNM3fLRwmVl4kv239yPjVQ9wVRAAeh8wwdM,367
|
|
43
|
+
sinter/_decoding/_decoding.py,sha256=lOsnfXe9NZBMflqig4FmnIfodhscoFzp5I1HBtFTWhQ,17879
|
|
44
|
+
sinter/_decoding/_decoding_all_built_in_decoders.py,sha256=O308o43iI5dUuooBP-hSqFzQZTVtdLDqfdIoZWjxjb8,1105
|
|
45
|
+
sinter/_decoding/_decoding_decoder_class.py,sha256=BjYLT4sy7nWuZztn-FXmUSaCuqPqEhK58H5-xDnJDgA,7384
|
|
46
|
+
sinter/_decoding/_decoding_fusion_blossom.py,sha256=tx2QSsbYnTdbSVibU2HNXOyiZGbY79XOkf1cTIVnGZU,8708
|
|
47
|
+
sinter/_decoding/_decoding_mwpf.py,sha256=VXm1CCrHAsxz8sKITdDARAYz5hJrxhDdHkbBPkNAjf0,11329
|
|
48
|
+
sinter/_decoding/_decoding_pymatching.py,sha256=8BLx-cF3_3Yw0Vovn79sTJS4ZzsQJUxwTp181eXqcoE,2921
|
|
49
|
+
sinter/_decoding/_decoding_test.py,sha256=6iYxCbz2VW4yCTv8JdvfjTNwCBXNmua2sT9NX2Ga-Ds,16405
|
|
50
|
+
sinter/_decoding/_decoding_vacuous.py,sha256=gWVzNU1dUlWnLJaA23toSQD-dWnukiTsEGdQ1xOvtok,1391
|
|
51
|
+
sinter/_decoding/_perfectionist_sampler.py,sha256=81lPR_h2r0a59z4Wfs_IZ_s-FzAQqDUhW1MwXihG2LY,1195
|
|
52
|
+
sinter/_decoding/_sampler.py,sha256=0nOVh3JvEpaBITlAHXK0MWRCW7Lm-v_NbWPeEoEqyDY,3129
|
|
53
|
+
sinter/_decoding/_stim_then_decode_sampler.py,sha256=OTDEmtU60oDUG-t6Ls689z1y534hbtbNaczEPQvhTxA,8850
|
|
54
|
+
sinter/_decoding/_stim_then_decode_sampler_test.py,sha256=LA3qu2KFb_Q-QSw2Xe5Waits0gikyi9oNXzd9yWMPqU,4754
|
|
55
|
+
sinter-1.15.0.data/data/README.md,sha256=tL9vPyJ8Svp3OwEvufybHpRYpjUFquAgdqvyBcVknoQ,14309
|
|
56
|
+
sinter-1.15.0.data/data/readme_example_plot.png,sha256=LTc9tuKddT-6yAbRLEIpngaKCzM3R6wVnxgWBSAj1QU,91472
|
|
57
|
+
sinter-1.15.0.data/data/requirements.txt,sha256=0RMgyfnkeD0XV1wFU94OkKi5SoK6d3aXDy_GYq1CzJw,28
|
|
58
|
+
sinter-1.15.0.dist-info/METADATA,sha256=zr4IIYJ31VI7mS0yQEEKytJmMukXk89BBoKWcZTac1Y,14831
|
|
59
|
+
sinter-1.15.0.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
|
60
|
+
sinter-1.15.0.dist-info/entry_points.txt,sha256=nPBE3eZfZEPX9oCzfv-zZlo3LMvmjWBVIBIfb7fEQY4,54
|
|
61
|
+
sinter-1.15.0.dist-info/top_level.txt,sha256=MToOcZ_REx6QQc6l7aktV-3dO2VBpy438BhA_KKxg5Y,7
|
|
62
|
+
sinter-1.15.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sinter
|