Skip to content

Commit

Permalink
fix: add test_natives_no_cz_cnot
Browse files Browse the repository at this point in the history
  • Loading branch information
changsookim committed Oct 25, 2024
1 parent 70bb422 commit 6471dfb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,24 @@ def test_natives():
}


def test_natives_no_cz_cnot():
platform = create_platform("dummy")
for p in platform.pairs:
platform.pairs[p].native_gates.CZ = None
platform.pairs[p].native_gates.CNOT = None

backend = QibolabBackend(platform)
assert set(backend.natives) == {
"I",
"Z",
"RZ",
"U3",
"GPI2",
"GPI",
"M",
}


def test_execute_circuit_initial_state():
backend = QibolabBackend("dummy")
circuit = Circuit(1)
Expand Down

0 comments on commit 6471dfb

Please sign in to comment.