Skip to content

v1.3.0 - Control, Closure, and Concatenation

Compare
Choose a tag to compare
@Strilanc Strilanc released this 16 Apr 17:28
· 410 commits to main since this release

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.PauliStrings concatenates them (computes their tensor product)
    • Adding stim.Tableaus 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 (#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 (#26)

Dev improvements:

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