Skip to content
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

Cannot Plot ZXDiagram with YaoPlots #100

Closed
contra-bit opened this issue Sep 18, 2023 · 2 comments · Fixed by #102
Closed

Cannot Plot ZXDiagram with YaoPlots #100

contra-bit opened this issue Sep 18, 2023 · 2 comments · Fixed by #102

Comments

@contra-bit
Copy link
Contributor

Dear Developers.

Please help me to get this library to Plot ZXDiagrams.
I cannot run the examples provided in this repository.

After installing ZXCalculus and YaoPlots. I tried running the examples from the
shell, repl and in Pluto.

julia example/ex1.jl 
julia example/ex2.jl

Everytime I get the a *. See Stacktrace:

LoadError: BoundsError: attempt to access 1-element Vector{Int64} at index [2]
Stacktrace:
 [1] getindex
   @ ./array.jl:805 [inlined]
 [2] indexed_iterate
   @ ./tuple.jl:87 [inlined]
 [3] layout2locs(zxd::ZXDiagram{Int64, ZXCalculus.Phase})
   @ YaoPlots ~/.julia/packages/YaoPlots/U4hOY/src/zx_plot.jl:108
 [4] plot(zxd::ZXDiagram{Int64, ZXCalculus.Phase}; size_x::Nothing, size_y::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ YaoPlots ~/.julia/packages/YaoPlots/U4hOY/src/zx_plot.jl:176
 [5] plot(zxd::ZXDiagram{Int64, ZXCalculus.Phase})
   @ YaoPlots ~/.julia/packages/YaoPlots/U4hOY/src/zx_plot.jl:171
 [6] top-level scope
   @ ~/src/quantum-circuits/software/ZXCalculus.jl/example/ex2.jl:84

PS: Should this issue be moved to YaoPlots?

@ChenZhao44
Copy link
Member

The ZXCalculus support of YaoPlots has been removed. Could you tell me which version of YaoPlots are you using?

@contra-bit
Copy link
Contributor Author

contra-bit commented Feb 4, 2024

#102 closes this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants