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
There are two possible states of ro at the end of this program. [0, 0] if Q0 measured to 0 or [1, 1] if Q0 measured to 1. The QVM produces these results consistently when the program is run as a single trial.
However, if you run this program with multiple trials, you'll get states for ro that should be impossible.
With the QVM server running in the background, if we run this program with 4 trials:
Notice the [0, 1] state, which should impossible for the given program. What I believe is happening is that memory isn't being reset between trials. In this case, we got [1, 1] for the first trial because Q0 measured out to 1, resulting in a measure of 1 to ro[1]. In the following trials, Q0 measured to 0, which means they didn't measure to ro[1], but since memory wasn't reset, the 1 from the first trial remained.
Should memory be reset between trials? Or is this intended behavior?
The text was updated successfully, but these errors were encountered:
While experimenting with dynamic control flow, I noticed that the QVM server doesn't reset memory between trials.
Consider a program where we create a bell pair out of
Q0
andQ1
, measureQ0
toro[0]
and only measureQ1
toro[1]
ifQ0
was measured out to1
.There are two possible states of
ro
at the end of this program.[0, 0]
ifQ0
measured to0
or[1, 1]
ifQ0
measured to1
. The QVM produces these results consistently when the program is run as a single trial.However, if you run this program with multiple trials, you'll get states for
ro
that should be impossible.With the QVM server running in the background, if we run this program with 4 trials:
We get a result that looks like this:
Notice the
[0, 1]
state, which should impossible for the given program. What I believe is happening is that memory isn't being reset between trials. In this case, we got[1, 1]
for the first trial becauseQ0
measured out to1
, resulting in a measure of1
toro[1]
. In the following trials,Q0
measured to0
, which means they didn't measure toro[1]
, but since memory wasn't reset, the1
from the first trial remained.Should memory be reset between trials? Or is this intended behavior?
The text was updated successfully, but these errors were encountered: