QuantumBFS / Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.
https://yaoquantum.org
Other
934 stars 123 forks source link

bloch sphere visualization #255

Open anandijain opened 4 years ago

anandijain commented 4 years ago

This might be outside the scope of the package, but I am learning quantum computing and using the symbolic @bra_str and @ket_str to do some basic operations.

I think it would be really cool to visualize individual qubits on the bloch sphere.

please close if this is not relevant.

thanks

GiggleLiu commented 4 years ago

Yeah, it should be cool. We just do not have a proper 3D visualization tool yet. We will try to implement one in https://github.com/QuantumBFS/YaoPlots.jl in the future.

Roger-luo commented 4 years ago

Hi, I don't think this will be in YaoPlots anytime soon since YaoPlots will focus on more serious plottings targetting research and papers. visualizing individual qubits does not have a concrete use case so far except if you just want to learn about the behavior of the gates, this is fairly easy to implement using Makie.jl this will even allow animations not just 3D plot. you can find it here: https://github.com/QuantumBFS/SSSS/blob/master/4_quantum/bloch_sphere.jl

The script is only compatible with Yao's previous release v0.5. But feel free to update and submit a PR to YaoPlot. Updating it to v0.6 should be fairly easy.

GiggleLiu commented 2 years ago

Can we move this issue to YaoPlots? It should be easy to implement with the Luxor backend. We can make it a bounty issue @Roger-luo .