QuEraComputing / Bloqade.jl

Package for the quantum computation and quantum simulation based on the neutral-atom architecture.
https://queracomputing.github.io/Bloqade.jl/dev/
Other
181 stars 35 forks source link

Switch to GR or Plots for plotting and guide people to use 1.9 #554

Open jon-wurtz opened 1 year ago

jon-wurtz commented 1 year ago

Confirm that Bloqade does not need Python as a dependency. I think that when Bloqade is installed, it also adds an entire conda environment. This can sometimes run into environment issues.

This should perhaps extend to all of our examples too. That is a little harder, of course, because Python plots are pretty. However, it does remove a barrier to running examples!

weinbe58 commented 1 year ago

@Roger-luo We can try to make these a weak dependence but It doesn't look like Julia 1.9 is being widely yet so perhaps splitting the visualization tools into its own sub-package would be best?

Roger-luo commented 1 year ago

There are a few things that can be done here:

  1. We can switch to a pure Julia plotting backend in 1.9 now (e.g. Plots or GR, they have similar plotting quality as matplotlib, and has a much smaller binary size than matplotlib), the latency is quite reasonable in 1.9. Its stable version is just released, and we can guide people with latency issues to use 1.9 (HPC center require their own version, so 1.9 may take time to propagate)
  2. Figure out why it's downloading the entire conda environment or why conda is having trouble setting up environments that shouldn't because we are using micromamba and only installs the minimum dependencies.
  3. Splitting out plotting functionalities would be nice (we can always re-export that in the meta-package), but it doesn't resolve the installation problem.

after the above steps, we can start moving things into weakdeps.

jon-wurtz commented 1 year ago

Pending more python functionality, perhaps we can try more towards (1)? This way the user can choose their own plotting backends and where necessary (eg visualizing waveforms) a julia plot can do. Is 1.9 necessary for that?

Roger-luo commented 1 year ago

Is 1.9 necessary for that?

nope, the only difference is on 1.9 the experience will be much better because the latency of the first plot will be unnoticeable. So compatibility is guaranteed to all 1.x versions, tho 1.9 is recommended. But this was the main reason why we were not using Plots/GR because there was no option for good UX back then.