Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stim.FlipSimulator #612

Merged
merged 9 commits into from
Aug 20, 2023
Merged

Add stim.FlipSimulator #612

merged 9 commits into from
Aug 20, 2023

Conversation

Strilanc
Copy link
Collaborator

@Strilanc Strilanc commented Aug 20, 2023

Python API changes:

  • Add stim.FlipSimulator
  • Add stim.FlipSimulator.__init__
  • Add stim.FlipSimulator.batch_size
  • Add stim.FlipSimulator.do
  • Add stim.FlipSimulator.get_detector_flips
  • Add stim.FlipSimulator.get_observable_flips
  • Add stim.FlipSimulator.get_measurement_flips
  • Add stim.FlipSimulator.num_detectors
  • Add stim.FlipSimulator.num_measurements
  • Add stim.FlipSimulator.num_observables
  • Add stim.FlipSimulator.num_qubits
  • Add stim.FlipSimulator.peek_pauli_flips
  • Add stim.FlipSimulator.set_pauli_flip

C++ changes:

  • Add frame_simulator.pybind.{h,cc}
  • Add stim::simd_bit_table<W>::read_across_majors_at_minor_index
  • Add stim::simd_bit_table<W>::copy_into_different_size_table
  • Add stim::simd_bit_table<W>::resize
  • Add stim.FlipSimulator
  • Split stim::FrameSimulator::reset_all_and_run into two methods
  • Add FrameSimulatorMode::STORE_EVERYTHING_TO_MEMORY
  • Add FrameSimulator::ensure_safe_to_do_circuit_with_stats
  • Add FrameSimulator::safe_do_instruction
  • Add FrameSimulator::safe_do_circuit
  • Move stim::CircuitStats from circuit file to circuit instruction file
  • Add stim::CircuitInstruction::compute_stats

Fixes #306

- Change `stim::TableauSimulator`'s constructor to require a move-reference for its rng
- Change `stim::FrameSimulator`'s constructor to require a move-reference for its rng
- Change `stim::FrameSimulator`'s RNG from a reference to a normal object owned by the simulator
- Replace SHARED_TEST_RNG method with INDEPENDENT_TEST_RNG method
- Rewrite all tests to use INDEPENDENT_TEST_RNG, fixing potential overlaps in randomness
- Also fix some `pybind11::args args` -> `const pybind11::args &args` warnings
- Also fix some int vs size_t comparison warnings

Fixes #353
- Add `stim.FlipSimulator.__init__`
- Add `stim.FlipSimulator.batch_size`
- Add `stim.FlipSimulator.do`
- Add `stim.FlipSimulator.do_circuit`
- Add `stim.FlipSimulator.do_instruction`
- Add `stim.FlipSimulator.get_detector_flips`
- Add `stim.FlipSimulator.get_observable_flips`
- Add `stim.FlipSimulator.get_measurement_flips`
- Add `stim.FlipSimulator.num_detectors`
- Add `stim.FlipSimulator.num_measurements`
- Add `stim.FlipSimulator.num_observables`
- Add `stim.FlipSimulator.num_qubits`
- Add `stim.FlipSimulator.peek_current_pauli_errors`
- Add `frame_simulator.pybind.{h,cc}`
- Add `stim::simd_bit_table<W>::read_across_majors_at_minor_index`
- Add `stim::simd_bit_table<W>::copy_into_different_size_table`
- Add `stim::simd_bit_table<W>::resize`
- Add `stim.FlipSimulator`
- Split `stim::FrameSimulator::reset_all_and_run` into two methods
- Add `FrameSimulatorMode::STORE_EVERYTHING_TO_MEMORY`
- Add `FrameSimulator::ensure_safe_to_do_circuit_with_stats`
- Add `FrameSimulator::safe_do_instruction`
- Add `FrameSimulator::safe_do_circuit`
- Move `stim::CircuitStats` from circuit file to circuit instruction file
- Add `stim::CircuitInstruction::compute_stats`
- Add `stim::CircuitInstruction::add_stats_to`
# Conflicts:
#	src/stim/mem/simd_bit_table.test.cc
#	src/stim/simulators/frame_simulator_util.inl
@Strilanc Strilanc merged commit 836a564 into main Aug 20, 2023
53 checks passed
@Strilanc Strilanc deleted the flipsim2 branch August 20, 2023 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose stim.FrameSimulator to python API
1 participant