v1.10.0 - Inviting Interop
Flagship changes:
- Use open source decoders that are 100x to 1000x faster than before! (pymatching v2 and fusion_blossom)
- Produce 2d and 3d diagrams of circuits and detector error models, with built-in viewers for Jupyter notebooks!
- Sample directly from detector error models. Record the errors that occurred, edit them, and play them back!
Notable changes:
- Added
stim.Circuit.diagram- Added diagram type
"detector-slice-text" - Added diagram type
"detector-slice-svg" - Added diagram type
"match-graph-svg" - Added diagram type
"match-graph-3d" - Added diagram type
"match-graph-3d-html" - Added diagram type
"timeline-text" - Added diagram type
"timeline-svg" - Added diagram type
"timeline-3d" - Added diagram type
"timeline-3d-html"
- Added diagram type
- Added
stim.DetectorErrorModel.diagram- Added diagram type
"match-graph-svg" - Added diagram type
"match-graph-3d" - Added diagram type
"match-graph-3d-html"
- Added diagram type
- Added methods to
stim.PauliString:stim.PauliString.from_numpystim.PauliString.from_unitary_matrixstim.PauliString.to_numpystim.PauliString.to_tableaustim.PauliString.to_unitary_matrix
- Added methods to
stim.TableauSimulator:stim.TableauSimulator.__init__now has an optionalseedargumentstim.TableauSimulator.set_state_from_stabilizersstim.TableauSimulator.set_state_from_state_vectorstim.TableauSimulator.donow acceptsstim.CircuitInstructionandstim.CircuitRepeatBlock
- Added methods to
stim.Tableau:stim.Tableau.iter_allstim.Tableau.from_circuitstim.Tableau.from_numpystim.Tableau.from_stabilizersstim.Tableau.from_state_vectorstim.Tableau.from_unitary_matrixstim.Tableau.to_circuitstim.Tableau.to_numpystim.Tableau.to_pauli_stringstim.Tableau.to_state_vector
- Added methods to
stim.DetectorErrorModel:stim.DetectorErrorModel.flattenedstim.DetectorErrorModel.roundedstim.DetectorErrorModel.compile_sampler
- Added
stim.CompiledDemSamplerclass with methods:stim.CompiledDemSampler.samplestim.CompiledDemSampler.sample_write
- Improvements to
sinter- Added support for pymatching v2
- Added support for fusion_blossom decoder
- Added flag
--titletosinter plot - Added flag
--minytosinter plot - Added flag
--plot_args_functosinter plot - Added flag
--failure_units_per_shot_functosinter plot - Added flag
--failure_unit_nameargument tosinter plot - Added grid lines to the plots made by
sinter plot - Added
filter_func,failure_units_per_shot_func, andfailure_unit_namearguments tosinter.plot_error_rateandsinter.plot_discard_rate - Added
sinter.predict_observablesmethod - Added ability to discard shots based on observables being mispredicted
- Added
--postselected_observables_predicateflag tosinter collect - Added
sinter.Task.postselected_observables_maskfield - Added
postselected_observable_maskargument tosinter.sample_decode
- Added
- Added
stim diagramcommand for producing diagrams, with flags--in,--type,--out,--tick,--remove_noise,--filter_coords. - Added
stim sample_demcommand for directly sampling from detector error model files, with flags--err_out,--err_out_format,--in,--obs_out,--obs_out_format,--out,--out_format,--replay_err_in,--replay_err_in_format,--seed,--shots,--err_out,--err_out_format,--replay_err_in,--replay_err_in_format. - Added
separate_observables=Falseargument tostim.CompiledDetectorSampler.sample - Added
bit_packed=Falseargument tostim.CompiledDetectorSampler.sample - Added
bit_packed=Falseargument tostim.CompiledMeasurementSampler.sample - Deprecated
stim.CompiledDetectorSampler.sample_bit_packed - Deprecated
stim.CompiledMeasurementSampler.sample_bit_packed
Notable bug fixes:
- Fixed
stim.Circuit.flattenednot fusing all operations - Fixed
stim.Circuit.without_noisenot fusing all operations - Fixed
PAULI_CHANNEL_2not being marked as targeting pairs of qubits - Fixed sinter's internal python files not being marked as private, so they don't appear as autocomplete suggestions
- Fixed
stim.Circuit.detector_error_modelfailing when errors affected more than 15 detectors (unless decompose_errors=True) - Fixed
stim.Circuit.without_noisenot making independent copies of the operations (!) - Fixed sinter only sampling using the first decoder given to it, instead of all decoders, when given multiple decoders
- Fixed not redirecting stdout and stderr to python's when calling
stim.main - Fixed unnecessary overhead in the conversion to/from numpy arrays (10x faster for small arrays)
- Fixed a segfault and bad parsing logic in
stim.read_shot_data_file(!). Fuzz tested the read/write methods against the python reference methods to avoid this happening again.
Notable dev changes:
- Fixed files being opened in text mode instead of binary mode, resulting in bad parsing/serialization on Windows due to \n bytes being turned into \r\n and vice versa.
- Templatized classes like
simd_wordso AVX and SSE code can coexist in the same binary - Added
stim_python_bindingscmake target - The cmake build now uses file lists which can be regenerated using a script
- Added
dev/directory for scripts - File lists used by cmake are now generated automatically instead of maintained manually
- The polyfill simd_word that uses 64 bit words now only uses one word instead of two (reducing padding overhead)
- To allow supporting a larger variety of decoders, sinter no longer includes each decoder in its requirements. Decoders need to be installed separately to use them.
- Added
-fPICtolibstimcmake target - Sinter now passes most information via the disk instead of through the multiprocessing API. This reduced the workload on the manager and the startup costs of batches, but made it much more disk limited on high core count machines.
- The API reference no longer shows deprecated methods (these methods are still listed in the .pyi stubs file)
- All doc strings now wrap at 80 characters, and this is enforced by continuous integration.
- The command line reference documentation has been substantially improved (e.g. flag information now grouped with the command instead of separate)
- Added python 3.11 support and OSX ARM support to the set of prebuilt wheels