Stim

Latest version: v1.14.0

Safety actively analyzes 682471 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

1.4.0

Flagship features:

- Convert circuits into detector error models, suitable for configuring decoders with.
- Generate annotated error correction circuits using the repetition code, surface code, or color code.

Notable changes:

- Added `stim.Circuit.generated(...)` to generate common error corrected circuits.
- Added `stim.Circuit.detector_error_model(...)` to simplify circuits into detector error models.
- Added `stim.DetectorErrorModel` and related classes such as `stim.DemTarget`.
- Made inspecting `stim.Circuit`easier. You can now index into and iterate over its instructions and blocks.
- Made inspecting `stim.Tableau`easier. Added efficient methods for getting single Pauli terms or inverse terms.
- New supported circuit instructions:
- XYZ measurement/reset gates: `MX`, `MY`, `MZ`, `RX`, `RY`, `RZ`, `MRX`, `MRY`, `MRZ`
- Period 3 rotations around X+Y+Z: `C_XYZ` and `C_ZYX`.
- Ion trap gates: `SQRT_XX`, `SQRT_XX_DAG`, `SQRT_YY`, `SQRT_YY_DAG`, `SQRT_ZZ`, `SQRT_ZZ_DAG`
- Coordinate annotations: `QUBIT_COORDS` and `SHIFT_COORDS` (and `DETECTOR` now takes optional coordinate arguments).
- Custom pauli error channels: `PAULI_CHANNEL_1(x, y, z)` and `PAULI_CHANNEL_2(ix, iy, iz, xi, xx, xy, xz, yi, yx, yy, yz, zi, zx, zy, zz)`
- Increased various repetition limits from tens of millions of iterations to quintillions of iterations.
- Added `stim.TableauSimulator.state_vector` for converting the stabilizer state into a state vector.
- Created better documentation of the circuit format, the detector error model format, and supported gates in the `doc/` directory of the github repo.
- In addition to being exposed to python, error analysis now supports folding loops, decomposing errors, allowing gauge detectors, and optionally approximating disjoint error mechanisms as independent error mechanisms.

1.3

- Command line `--detector_hypergraph` flag now complains that you should use `--analyze_errors`

Bug fixes:

- Fixed error analysis incorrectly handling MR gates operating on the same qubit multiple times.
- Fixed `stim.TableauSimulator.cnot` and other two qubit methods not enforcing that the two qubits must be different.
- Fixed `OBSERVABLE_INCLUDE` indices being summed instead of maxed when estimating memory usage.
- Fixed way-too-large command line integer arguments silently overflowing to smaller values and being accepted.
- Fixed some cases where gates with incompatible targets could be added to a circuit.
- Fixed exceeding the linux file handle limit when taking thousands of shots from a circuit with billions of measurements with both `--in` and `--out` files specified.

Notable internal changes:

- The supported gates documentation is now autogenerated from the internal gate data.
- Gates now take a variable number of arguments instead of only one.
- Documented on how to statically link to stim in cmake projects
- Initial work on possible `stimzx` package.
- Initial work on possible `stimjs` package.

1.3.0

User improvements:

- `stimcirq` can now convert in both directions, and preserves circuit moment structure when converting
- `stim.TableauSimulator` is easier to control and inspect
- Truncate the state using `stim.TableauSimulator.set_num_qubits`
- Replace the state using `stim.TableauSimulator.set_inverse_tableau`
- Recognize single qubit stabilizer states non-destructively using `stim.TableauSimulator.peek_bloch`
- Get state stabilizers in a standard form using `stim.TableauSimulator.canonical_stabilizers`
- Guide measurement results after the fact using `stim.TableauSimulator.measure_kickback`
- `stim.PauliString` is now closed under multiplication
- `stim.PauliString.sign` is now allowed to be `1j` or `-1j`
- Added `allow_imaginary=False` parameter to `stim.PauliString.random`
- Multiplying anti-commuting Pauli strings now produces a result instead of an error
- `stim.PauliString` and `stim.Tableau` now support concatenation via `+` and/or `*`
- Adding `stim.PauliString`s concatenates them (computes their tensor product)
- Adding `stim.Tableau`s concatenates them (computes their direct sum)
- Multiplying `stim.PauliString` self-concatenates a variable number of times
- Mutable semantics have been improved
- `stim.PauliString` now has a `*=` operator that works inline
- Added `copy` methods to `stim.{Circuit,Tableau,PauliString,TableauSimulator}`
- Bug fixes
- Fixed `stim.TableauSimulator.measure` reading invalid memory when applied to a qubit that hadn't been touched yet
- Fixed `import stim` failing in some environments due to a unicode docstring not being marked as UTF8 (https://github.com/quantumlib/Stim/issues/20)
- Fixed `stim.TableauSimulator.cnot` and other controlled operation methods failing when given a classical control
- Worked around a bug in `std::random_device` in some environments (https://github.com/quantumlib/Stim/issues/26)

Dev improvements:

- Added a test command to `cibuildwheel`, so continuous integration now confirms tests pass on multiple platforms
- Fixed stimcirq doctests being skipped

1.2.1

Major improvements:

- Fixed the effects of X_ERROR and Z_ERROR being swapped in TableauSimulator

Dev improvements:

- Fixed noisy operations of TableauSimulator not being verified against known-good operations from cirq using black box sample statistics

1.2.0

Major improvements:

- Worked around [a PyCharm autocomplete bug](https://youtrack.jetbrains.com/issue/PY-47605) triggered by having `"""` in `__doc__` strings.
- `stim.Circuit` no longer unrolls `REPEAT` blocks.
- `stim.Circuit.__mul__` now wraps the circuit into a `REPEAT` block.

Minor improvements:

- Shorter `stim.Circuit.__repr__`
- Compiled samplers now have an eval-able `__repr__`.
- stimcirq no longer forces a specific version of cirq as a requirement.

Dev improvements:

- Split python and dev documentation into a separate README.
- Refactored underlying code to support streaming circuits with results too large to store in memory (not yet exposed as python bindings).

1.1.0

Major improvements:

- Added `stim.PauliString`, a datatype for representing and manipulating Pauli products
- Added `stim.Tableau`, a datatype for representing and manipulating stabilizer tableaus
- Added `stim.TableauSimulator.current_inverse_tableau` for introspecting the simulator state
- Added examples to most docstrings
- There is now an API reference at the github wiki https://github.com/quantumlib/Stim/wiki

Minor improvements:

- Fixed `stim.__version__` returning the string `"VERSION_INFO"` instead of something useful
- `stim.Circuit.__init__` now takes an optional stim program string
- New methods on existing types:
- `stim.Circuit.__eq__(other)`
- `stim.Circuit.__ne__(other)`
- `stim.Circuit.__repr__()`
- `stim.Circuit.clear()`
- `stim.TableauSimulator.current_measurement_record()`
- `stim.TableauSimulator.do(stim.Circuit)`
- `stim.TableauSimulator.h_xy(...)`
- `stim.TableauSimulator.h_yz(...)`
- `stim.TableauSimulator.swap(...)`
- `stim.TableauSimulator.iswap(...)`
- `stim.TableauSimulator.iswap_dag(...)`
- `stim.TableauSimulator.xcx(...)`
- `stim.TableauSimulator.xcy(...)`
- `stim.TableauSimulator.xcz(...)`
- `stim.TableauSimulator.ycx(...)`
- `stim.TableauSimulator.ycy(...)`
- `stim.TableauSimulator.ycz(...)`

Dev improvements:

- Docstring examples are now verified by a doctest step during continuous integration
- Added `glue/python/generate_api_reference.py` for generating the API reference

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.