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
I started going through Yao's tutorial notebooks, and I noticed something peculiar when running the application tutorial in Pluto:
If I rerun the cell with the command state(a) (by pressing Shift+Enter) the result changes to (approximately) |00> instead of (|00>+|11>)/\sqrt 2
I know that Pluto is reactive, and usually there should not be any reason to rerun a cell, but... it still seems strange (naturally, this doesn't happen in the REPL)
Other cells in this notebook seem to be OK with reexecution by Shift+Enter. Except for the other state cell, which is state(q1) which also causes the output to change to approximately |00> instead of precisely |00>.
If I change the value of q1, it causes the output of reexecution of state(a) to change to that value. It seems that the somehow q1 is being parsed instead of q1 |> bellcircuit
The text was updated successfully, but these errors were encountered:
We really need to polish the online documentations of Yao. The pluto checks your variable dependency and re-evaluate cells automatically, it is not very compatible with inplace operations because the change of variables is implicit.
e.g. instead of using inplace apply q1 |> bellcircuit, use q2 = apply(q1, bellcircuit) will make pluto update correctly.
We are sorry that Yao's |> does not follow the standard convension. It is a legacy issue which is hard to change now.
I started going through Yao's tutorial notebooks, and I noticed something peculiar when running the application tutorial in Pluto:
If I rerun the cell with the command
state(a)
(by pressing Shift+Enter) the result changes to (approximately)|00>
instead of(|00>+|11>)/\sqrt 2
I know that Pluto is reactive, and usually there should not be any reason to rerun a cell, but... it still seems strange (naturally, this doesn't happen in the REPL)
Other cells in this notebook seem to be OK with reexecution by Shift+Enter. Except for the other
state
cell, which isstate(q1)
which also causes the output to change to approximately|00>
instead of precisely|00>
.If I change the value of
q1
, it causes the output of reexecution ofstate(a)
to change to that value. It seems that the somehowq1
is being parsed instead ofq1 |> bellcircuit
The text was updated successfully, but these errors were encountered: