QSimSimulator does not respect invert_mask on measurements
Closed this issue · 1 comments
maffoo commented
Simple example:
In [1]: import cirq, qsimcirq
In [2]: circuit = cirq.Circuit(cirq.measure(cirq.LineQubit(0), key='a', invert_mask=[True]))
In [3]: cirq.Simulator().sample(circuit, repetitions=5)
Out[3]:
a
0 1
1 1
2 1
3 1
4 1
In [4]: qsimcirq.QSimSimulator().sample(circuit, repetitions=5)
Out[4]:
a
0 0
1 0
2 0
3 0
4 0
dabacon commented
qsimcirq in good company with all of the other times we forgot to implement invert_mask!