QuantumClifford.jl
QuantumClifford.jl copied to clipboard
Pauli frames on circuits that measure [0,0,...,0] with 0% likelihood.
Pauli frames always operate with a measurement reference sample, and it seems the current implementation assumes this reference sample is [0,0,...,0]. For our case, mostly working with error correction, a zero syndrome is always a possibility and so this problem hasn't come up yet.
However, when the circuit being simulated on the Pauli frame measures all zeroes with 0% likelihood, the Pauli Frames gives the wrong answer.
I suggest we add an optional argument to the constructor that can designates a non all-zero reference.
I think it makes most sense to consider this a documentation issue. Pauli frames simulations inherently only provide samples with respect to a reference and we should put a few warning blocks in the documentation that this is the case, together with examples of how to make a reference simulation.
To the question of how to make a reference simulation... Let's start by documenting how it can be done right now, by running mctrajectory! separately. Then we can decide whether it is worth it to make it "built in" for the Pauli frame object.