-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
good for learningFor beginners in QC, this will help picking up some knowledge. Bit harder than "good first issues"For beginners in QC, this will help picking up some knowledge. Bit harder than "good first issues"kind/bug-reportSomething doesn't seem to work.Something doesn't seem to work.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on
Description
When simulating circuits with the qsimcirq simulator, measurement confusion maps are ignored. If this is expected behaviour, I have no been able to find it in the documentation.
How to reproduce the issue
import numpy as np
import cirq
import qsimcirq
print("Cirq: " + cirq.__version__)
print("QSimCirq: " + qsimcirq.__version__)
qubit = cirq.LineQubit(0)
cmap = {(0,): np.array([[0.8, 0.2], [0.2, 0.8]])}
circuit = cirq.Circuit()
circuit += cirq.X(qubit)
circuit += cirq.MeasurementGate(1, confusion_map=cmap)(qubit)
print(circuit)
results = cirq.Simulator(seed=0).run(circuit, repetitions=100)
print("Cirq Simulator: " + str(results))
results = qsimcirq.QSimSimulator(seed=0).run(circuit, repetitions=100)
print("QSim Simulator: " + str(results))
Output:
Cirq: 1.2.0
QSimCirq: 0.16.3
0: ───X───?M('')───
Cirq Simulator: =1111111111111111111111111101111101111111111111011101010111101111110110100011111001111111111101111101
QSim Simulator: =1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Cirq version
Cirq: 1.2.0
QSimCirq: 0.16.3
Metadata
Metadata
Assignees
Labels
good for learningFor beginners in QC, this will help picking up some knowledge. Bit harder than "good first issues"For beginners in QC, this will help picking up some knowledge. Bit harder than "good first issues"kind/bug-reportSomething doesn't seem to work.Something doesn't seem to work.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on