You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there are classically conditioned gates in the middle of the circuits, the shot distribution calculated from either sv-sim or dm-sim shows wrong statistics.
Taking the following teleportation circuit as an example,
This is a circuit that prepares a Bell state between qubit q[1] and q[2], while teleporting the state of q[0], which is in the 0 state, to the q[2]. The measurements on qubits q[0] and q[1] should have an equal probability to get either 0 or 1.
Runing noiseless sv-sim with 1024 shots to simulate this qasm code with CPU backend (macOS 14.3), the resulting shots are
We expect the outcomes should be equally distributed shots among 000, 010, 100, and 110. The simulation result using ibmq circuit composer is attached.
In order to make this circuit implementable using dm-sim, the conditional z gate is changed to rz(pi), which will add a global phase to the state and not affect the shots. The simulation from dm-sim is
When there are classically conditioned gates in the middle of the circuits, the shot distribution calculated from either sv-sim or dm-sim shows wrong statistics.
Taking the following teleportation circuit as an example,
This is a circuit that prepares a Bell state between qubit q[1] and q[2], while teleporting the state of q[0], which is in the 0 state, to the q[2]. The measurements on qubits q[0] and q[1] should have an equal probability to get either 0 or 1.
Runing noiseless sv-sim with 1024 shots to simulate this qasm code with CPU backend (macOS 14.3), the resulting shots are
We expect the outcomes should be equally distributed shots among 000, 010, 100, and 110. The simulation result using ibmq circuit composer is attached.
In order to make this circuit implementable using dm-sim, the conditional z gate is changed to rz(pi), which will add a global phase to the state and not affect the shots. The simulation from dm-sim is
which is also not consistent with the correct result.
The text was updated successfully, but these errors were encountered: