Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ line-length = 100

[tool.ruff.lint]
select = ["E", "F", "I", "Q"]
extend-ignore = ["F841"]
isort.required-imports = ["from __future__ import annotations"]
mccabe.max-complexity = 15
flake8-quotes.docstring-quotes = "double"
Expand Down
8 changes: 7 additions & 1 deletion tests/test_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def test_max_duration_ratio_error() -> None:
program.compile_to(device=MockDevice(), device_max_duration_ratio=0.5)


def test_program_with_dmm() -> None:
def test_program_with_dmm_init() -> None:
register = Register(qubits={"q0": (0.0, 0.0), "q1": (1.3, 0.0)})

valid_weights = {"q0": 0.1, "q1": 0.2}
Expand All @@ -141,6 +141,12 @@ def test_program_with_dmm() -> None:
amplitude=ConstantWaveform(5.0, 1.0), detuning=ConstantWaveform(5.0, 1.0), dmm=dmm
)
program = QuantumProgram(register=register, drive=drive)
assert program.register == register
assert program.drive == drive


def test_program_with_dmm_invalid_qubit_id() -> None:
register = Register(qubits={"q0": (0.0, 0.0), "q1": (1.3, 0.0)})

invalid_weights = {"q0": 0.1, "q1": 0.2, "wrong_qubit_id": 0.3}

Expand Down
Loading