Mid circuit measurements and qubit reuse

Pertaining Simulators Only

Can we assume that doing a time sweep in batch_assign like the following is equivalent to mid-measuring the evolution even though we have a small ramp_time at the end of each protocol? What I mean is, though, I want to record the analog evolution till 2.4 microseconds for which I would record the state of the system after each time step. What I do instead, is change the sweep_time from 0.05 microseconds to 2.4 and record the final state for each sweep_time. But there is a difference in both ways of having a “ramp_down” time of 0.05 microsecond in which Rabi amplitude goes to 0.0 (but principally, mid-measuring would be said when amplitude stays non-zero) in the latter approach. Should I assume that this small time step doesn’t do anything to state so I consider

# Define relevant parameters for the lattice geometry and pulse schedule
n_atoms = 11
lattice_spacing = 6.1
min_time_step = 0.05

# Define Rabi amplitude and detuning values.
# Note the addition of a "sweep_time" variable
# for performing sweeps of time values.
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)
)

# Allow "sweep_time" to assume values from 0.05 to 2.4 microseconds for a total of
# 20 possible values.
# Starting at exactly 0.0 isn't feasible so we use the `min_time_step` defined
# previously.
time_sweep_z2_job = time_sweep_z2_prog.batch_assign(
    sweep_time=np.linspace(min_time_step, 2.4, 20)
)