forked from quantumlib/Stim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Huge circuit streaming (quantumlib#15)
- Add main.perf.cc checking overall performance of simulators - Manage memory for jagged data directly instead of delegating to std::vector, removing a pointer indirection - Add MonotonicBuffer<T> - Add PointerRange<T> - Remove JaggedDataArena<T> - Remove VectorView<T> - Polish development documentation - Split `dev/README.md` out of `README.md` - Reference `dev/README.md` and `glue/python/README.md` from main readme (instead of repeating their contents) - Include `doctest` test commands in testing instructions - Tweak text representations - Drop the `# Circuit` context line from `circuit.str()` - Switch from having `__str__` to having `__repr__` for compiled python binding samplers - Give empty circuits a simpler repr - Refactor Circuit to support streaming - Add `blocks` property for storing sub-circuits. - Tweak `REPEAT` instructions to reference a block instead of flattening them into raw instructions. - Add `Circuit::max_lookback()` method for determining when measurement results can be discarded. - Simplify invariants by refactoring `num_qubits` and `num_measurements` fields into `count_qubits` and `count_measurements` methods. - Add `Circuit::count_detectors_and_observables`. - `Circuit::operator*` now wraps the circuit's body into a `REPEAT` block, instead of flat repeating - Add `Circuit::for_each_operation[_reverse]` for iterating over operations while recursing into `REPEAT` blocks - When the number of simulated measurements is huge, switch to streaming results instead of holding everything in memory - Add `#define SWITCH_TO_STREAMING_MEASUREMENT_THRESHOLD 100000000` - Ensure this works for `--sample` (tableau), `--sample=1000` (frame), and `--detect=1000` (detectors). - Allow `prepend_observable` to continue existing despite it preventing streaming from occurring - Refactor `FrameSimulator` to work with a `max_lookback` instead of a `num_measurements`. - Extract `MeasureRecord` from `TableauSimulator` - Extract `MeasureRecordBatch` from `FrameSimulator` - Add `MeasureRecordWriter` and `MeasureRecordWriterBatch` classes for consuming results - Add mask assignment operators `&=` and `|=` to `simd_bits` - Loosen version of cirq required by stimcirq
- Loading branch information
Showing
68 changed files
with
3,548 additions
and
1,339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.