Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/test_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_compiler_dmm(
) -> None:
program = dmm_program()
if device._device.dmm_channels:
program.compile_to(device)
program.compile_to(device, profile=CompilerProfile.MAX_ENERGY)
assert program.is_compiled
assert isinstance(program.compiled_sequence, PulserSequence)
else:
Expand Down Expand Up @@ -103,10 +103,12 @@ def test_compile_to_max_duration_ratio(ratio: float) -> None:
def test_compile_to_max_duration(duration: float) -> None:
"""Test that the compiled sequence's duration is set to the maximum allowed by the device."""
reg = Register.from_graph(DataGraph.line(2))
amp = ConstantWaveform(duration=duration, value=1.0)
amp = ConstantWaveform(duration=duration, value=0.2)
drive = Drive(amplitude=amp)
program = QuantumProgram(reg, drive)
program.compile_to(AnalogDevice(), device_max_duration_ratio=1.0)
program.compile_to(
AnalogDevice(), profile=CompilerProfile.WORKING_POINT, device_max_duration_ratio=1.0
)

assert program.is_compiled
assert program.compiled_sequence.get_duration() == 6000
Expand Down
Loading