v1.9.0 - Sintered Samples
Flagship changes:
- Released
sinter
, which uses stim and pymatching to perform multicore Monte Carlo sampling of error correction circuits. - Added a python stub file (
stim/__init__.pyi
) to improve autocompletion in IDEs.
Breaking changes:
- The
"ptb64"
format now requires the shot count to be a multiple of 64, both when reading and when writing. (Previously, missing shots resulted in padding with zero'd data, which created a very easy way to get bad data when reading if the number of shots was not known.) - The default value of
stim.Circuit.shortest_graphlike_error
's argumentignore_ungraphlike_errors
has changed from fromFalse
toTrue
. (Setting it toFalse
can use "remnant edges" that only appear as components of decomposed errors, and so do not correspond to a single physical error mechanism.)
Notable changes:
- New global methods:
stim.main
stim.read_shot_data_file
stim.write_shot_data_file
- New
stim.DetectorErrorModel
methods:stim.DetectorErrorModel.to_file
stim.DetectorErrorModel.from_file
- New
stim.Circuit
methods:stim.Circuit.without_noise
stim.Circuit.flattened
stim.Circuit.search_for_undetectable_logical_errors
stim.Circuit.to_file
stim.Circuit.from_file
- New
stim.TableauSimulator
methods:stim.TableauSimulator.c_xyz
stim.TableauSimulator.c_zyx
stim.TableauSimulator.cx
stim.TableauSimulator.do_circuit
stim.TableauSimulator.do_pauli_string
stim.TableauSimulator.do_tableau
stim.TableauSimulator.h_xz
stim.TableauSimulator.num_qubits
stim.TableauSimulator.peek_x
stim.TableauSimulator.peek_y
stim.TableauSimulator.peek_z
stim.TableauSimulator.postselect_x
stim.TableauSimulator.postselect_y
stim.TableauSimulator.postselect_z
stim.TableauSimulator.reset_x
stim.TableauSimulator.reset_y
stim.TableauSimulator.reset_z
stim.TableauSimulator.zcx
stim.TableauSimulator.zcy
stim.TableauSimulator.zcz
- New
stim.Tableau
methods:stim.Tableau.to_unitary_matrix
- New method options:
obs_path=None
andobs_format
forstim.CompiledDetectorSampler.sample_file
obs_path=None
andobs_format
forstim.CompiledMeasurementsToDetectionEventsConverter.convert_file
ignore_decomposition_failures=False
forstim.Circuit.detector_error_model
block_decompose_from_introducing_remnant_edges=False
option for thestim.Circuit.detector_error_model
bit_pack_result=False
forstim.CompiledMeasurementsToDetectionEventsConverter.convert
- Functional changes:
- Error analysis now attempts to avoid introducing remnant edges unless absolutely necessary (improves detector error models)
- Error analysis now supports
ELSE_CORRELATED_ERROR
instructions as long they occur in contiguous blocks started by aCORRELATED_ERROR
- The stim python package now includes the stim command line tool. Much easier than building it for yourself.
- The floating point accuracy of
stim.TableauSimulator.state_vector
has been substantially improved (e.g. all zeros are now exact) - The method signatures shown in the API reference are now more accurate, matching the ones in
__init__.pyi
Bug fixes:
- Worked around the pseudo random number generator state being duplicated when using multiprocessing with start method
"fork"
. Samplers now seed from external entropy when constructed, instead of using entropy acquired at startup. - Fixed various reported build failures related to MacOS and Apple M chips.
- Fixed
setup.py
not forcing UTF8 encoding when loadingREADME.md
, causing crashes on systems configured to use other encodings by default. - Fixed
stimcirq
not understanding probabilisticcirq.DensePauliString
gates. - Worked around an issue where pytest gives useless failure messages for asserts involving stim objects.
- Fixed an infinite loop in
stim.Circuit.get_detector_coords
. - Fixed complex indices like
stim.Circuit()[1j]
crashing the python interpreter (by switching to latest version of pybind11). - Fix loop folding during error analysis incorrectly folding loops with observables including measurements from only the last few iterations
- Fixed a segfault in measurement-to-detection-event conversion related to failing to ignore noise channels
- Fixed a bug in measurement-to-detection-event conversion where some OBSERVABLE_INCLUDE instructions were being forgotten