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

Hoe make plot circuit like qiskit have it? #298

Open
Penghmed opened this issue Oct 18, 2022 · 2 comments
Open

Hoe make plot circuit like qiskit have it? #298

Penghmed opened this issue Oct 18, 2022 · 2 comments

Comments

@Penghmed
Copy link

No description provided.

@Penghmed
Copy link
Author

Is having answer? Thanks you

@mtfishman
Copy link
Collaborator

Unfortunately we don't have native support for that right now. There are two possible workarounds. You can ITensor's general tensor network visualization packages, and turn the quantum circuit into a tensor network. For example:
https://github.com/ITensor/ITensors.jl/blob/main/ITensorGLMakie/examples/ex_quantum_circuit.jl

This can use a variety of backends for choosing the layout of the network, some of which will look more like a traditional quantum circuit visualization than others.

Another option would be to try using YaoPastaQ.jl (https://github.com/QuantumBFS/YaoPastaQ.jl) to convert the circuit to the Yao format, and then visualize the circuit with YaoPlots.jl (https://github.com/QuantumBFS/YaoPlots.jl). I haven't tried that so I'm curious how well it would work.

A third option would be to convert that PastaQ.jl circuit format to Qiskit's circuit format, and then visualize using Qiskit (say by calling Qiskit using PyCall.jl or PythonCall.jl). I don't think we have native support for converting from PastaQ.jl's circuit format to Qiskit's circuit format right now, maybe @GTorlai has something lying around for that but I presume it wouldn't be too hard to write.

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

No branches or pull requests

2 participants