-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plot error? #439
Comments
Maybe I know which editor are you using? I tried VSCode, it plots correctly. |
I am not using an editor, I used Jupiter notebook. For Vscode, it works fine. |
I met a problem alike yesterday. (Both in Jupyter notebook & VSCode builtin step1In one block, I wrote: output is as expected: step2then I ran another block of codes: output is wrong: step3I clean the output of the step1 block step4I re-executed the step1 block, step5I cleared output of step1 block again, (yeah, the step2 output remain correct: Y H H ) the output is: step6repeat: I clear the step2 output, step7I insert a new block after step1 block, wrong plots happened again. step8I use step9even if I |
The plotting backend we are using is Luxor. IIUC, it is a wield interaction between Luxor and Jupyter. |
FYI: the reltated code block is https://github.com/QuantumBFS/YaoPlots.jl/blob/0157a3e8d57113d6219a8dba9d2f320f99fc1395/src/vizcircuit.jl#L463 |
thanks. I'll try the solution in the quoted issues. |
I think this is the infamous "SVG/Jupyter cell interaction" problem, summarised by knuesel here: MakieOrg/Makie.jl#952 (comment) ie SVGs in different cells in a Jupyter notebook share definitions, which is usually not what you want. A related issue was found in Pluto (JuliaGraphics/Luxor.jl#228) - but Pluto handles SVGs more carefully than Jupyter and doesn't have this problem. |
Thanks, that would be great! |
hopefully fixed in Luxor 3.6.0. |
Hello,
I plotted a circuit in jupyter notebook in one cell, it worked fine. However, I continue to plot another circuit in the next cell, it always give me error. See below
circuit1 = chain(1, put(1=>H)); plot(circuit1)
circuit2 = chain(1, put(1=>X)); plot(circuit2)
The first one gives me the correct H gate, but I run the second code,
circuit2
always gives me the same plot ascircuit1
, which is incorrect since it is an X gate. I am not quite sure whether it is a bug or it is because the setup on my computer is wrong. Could you help me verify that?The text was updated successfully, but these errors were encountered: