diff --git a/tests/test_builder_factory.py b/tests/test_builder_factory.py index 65eb3728c..95d2e9b11 100644 --- a/tests/test_builder_factory.py +++ b/tests/test_builder_factory.py @@ -20,8 +20,8 @@ Field, Uniform, ) -from bloqade.ir.routine.params import Params from bloqade.ir.routine.base import Routine +from bloqade.ir.routine.params import Params import numpy as np @@ -89,7 +89,7 @@ def delta(t, amp, omega): batch_params = [{"omega": omega} for omega in [1, 2, 4, 8]] args = ["run_time"] - prog = rydberg_h( + routine = rydberg_h( register, detuning=delta, amplitude=ampl, @@ -108,12 +108,23 @@ def delta(t, amp, omega): ) sequence = Sequence({rydberg: pulse}) - routine = prog.parse() + source = ( + register.rydberg.detuning.uniform.apply(delta) + .amplitude.uniform.apply(ampl) + .phase.uniform.apply(phase) + .assign(**static_params) + .batch_assign(batch_params) + .args(args) + ) circuit = AnalogCircuit(register, sequence) params = Params(static_params, batch_params, args) + expected_routine = Routine(source, circuit, params) - assert routine == Routine(prog, circuit, params) + # ignore because no equality implemented + # assert routine.source == expected_routine.source + assert routine.circuit == expected_routine.circuit + assert routine.params == expected_routine.params def test_rydberg_h_2():