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

assign does not work with show #948

Open
Roger-luo opened this issue May 15, 2024 · 0 comments
Open

assign does not work with show #948

Roger-luo opened this issue May 15, 2024 · 0 comments
Labels
bug Something isn't working mod:builder issues related to builder module mod:visualization issues related to visualization, plotting

Comments

@Roger-luo
Copy link
Member

Roger-luo commented May 15, 2024

this is from the Z2 state preparation example

from bloqade import save, load
from bloqade.atom_arrangement import Chain
import numpy as np

n_atoms = 11
lattice_spacing = 6.1
min_time_step = 0.05
rabi_amplitude_values = [0.0, 15.8, 15.8, 0.0]
rabi_detuning_values = [-16.33, -16.33, 16.33, 16.33]
durations = [0.8, "sweep_time", 0.8]

time_sweep_z2_prog = (
    Chain(n_atoms, lattice_spacing=lattice_spacing)
    .rydberg.rabi.amplitude.uniform.piecewise_linear(durations, rabi_amplitude_values)
    .detuning.uniform.piecewise_linear(durations, rabi_detuning_values)
)

this does not work with show directly and complains about missing the sweep_time assignment, which makes sense. However, calling assign(sweep_time=20.2).show() fails for the same reason. The type signature of show is also extremely unclear what it accepts.

@Roger-luo Roger-luo added bug Something isn't working mod:visualization issues related to visualization, plotting mod:builder issues related to builder module labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mod:builder issues related to builder module mod:visualization issues related to visualization, plotting
Projects
None yet
Development

No branches or pull requests

1 participant