Skip to content

Commit

Permalink
Update tests/test_backends.py
Browse files Browse the repository at this point in the history
Co-authored-by: Alessandro Candido <candido.ale@gmail.com>
  • Loading branch information
csookim and alecandido authored Oct 25, 2024
1 parent 6471dfb commit 93ec160
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ 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",
Expand All @@ -75,7 +71,14 @@ def test_natives_no_cz_cnot():
"GPI2",
"GPI",
"M",
"CZ",
"CNOT"
}

for gate in ["CZ", "CNOT"]:
for p in platform.pairs:
setattr(platform.pairs[p].native_gates, gate, None)
assert gate not in set(backend.natives)


def test_execute_circuit_initial_state():
Expand Down

0 comments on commit 93ec160

Please sign in to comment.