Use case: selecting individual tasks in a batch with square brackets
Get an individual task from a batch assigned task. For example,
rabi_oscillation_job = rabi_oscillations_program.assign(
ramp_time=0.06, rabi_value=15, detuning_value=0.0
).batch_assign(run_time=np.around(np.arange(0, 21, 1) * 0.05, 13))
single_job = rabi_oscillation_job[5]
Or alternatively
rabi_oscillation_job = rabi_oscillations_program.assign(
ramp_time=0.06, rabi_value=15, detuning_value=0.0
).batch_assign(run_time={"time 1":1.05, "time 2": 2.24, "endtime":4.45))
single_job = rabi_oscillation_job["time 1"] # Returns the one with run time 1.05
Is there another way to select single jobs that I'm missing?
This is a nice feature to have. I think the getindex syntax is a good idea, and implementation is trivial, all we need is to support __getitem__ for the assign builder, but perhaps we can support this after beta due to bandwidth, I'll mark this as a blocking issue for 1.0 for now.
This doesn't belong in the builder because the builder contains the bloqade-IR
This doesn't belong in the builder because the builder contains the bloqade-IR
It can just return the corresponding lazy object of builder