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

[BUG] Insane scaling on Bloqade.plot(atoms) #556

Open
jon-wurtz opened this issue May 10, 2023 · 1 comment
Open

[BUG] Insane scaling on Bloqade.plot(atoms) #556

jon-wurtz opened this issue May 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jon-wurtz
Copy link
Collaborator

Describe the bug
The visual called for Bloqade.plot(AtomList(**)) is insanely large when adding an intermediate number of atoms-- on my laptop, about 100,000 times larger than my screen-- zooming to 1% does not even see the dots.

To Reproduce
atom_positions = [Random.rand(2) for x in 1:500]
atoms1 = AtomList([tuple(x...) for x in atom_positions])

Expected behavior
An insanely large svg output

Screenshots
image

Version Info

  • Julia 1.8.2
  • Plot made with VSCode jupyter notebook. 4k Screen resolution

Additional context
Add any other context about the problem here.

@jon-wurtz jon-wurtz added the bug Something isn't working label May 10, 2023
@Roger-luo
Copy link
Member

seems due to this https://github.com/QuEraComputing/Bloqade.jl/blob/master/lib/BloqadeLattices/src/visualize.jl#LL137C1-L139C54 the size of the figure is calculated based on the number of atoms instead of a fixed size. I think a more robust implementation that I used in Python is to rescale the atom circle radius based on the number of atoms with a fixed figure size.

cc: @weinbe58, @johnzl-777 should be an easy fix if any of you want to spend some time on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants