TeamGraphix / graphix

measurement-based quantum computing (MBQC) compiler and simulator
https://graphix.readthedocs.io
Apache License 2.0
64 stars 21 forks source link

Move all Pauli measurements to the front before Pauli presimulation #209

Closed thierry-martinez closed 2 months ago

thierry-martinez commented 2 months ago

This commit adds a method __extract_pauli_nodes that applies exchange rules to move all Pauli measurements to the front of a pattern. This allows all the Pauli measurements to be presimulated, even if their initial domains depend on other measurements.

On random circuits of 10 qubits (depth 10), number of remaining nodes after Pauli presimulation is reduced by a factor of 4 on average, and the time spent on state vector simulation is reduced by a factor 75 (including the time for Pauli presimulation).