bloqade-python icon indicating copy to clipboard operation
bloqade-python copied to clipboard

assign does not work with show

Open Roger-luo opened this issue 1 year ago • 0 comments

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 avatar May 15 '24 20:05 Roger-luo