Skip to content

Commit

Permalink
Use QTM_DEFAULT_GATESET instead of tk_gateset.
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec committed Jan 26, 2024
1 parent 0a83af6 commit 08b6934
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions tests/e2e_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@
from phir.model import PHIRModel
from rich import print

from pytket.circuit import OpType
from pytket.phir.machine import Machine, MachineTimings
from pytket.phir.phirgen import genphir
from pytket.phir.place_and_route import place_and_route
from pytket.phir.placement import placement_check
from pytket.phir.qtm_machine import QTM_MACHINES_MAP, QtmMachine
from pytket.phir.qtm_machine import QTM_DEFAULT_GATESET, QTM_MACHINES_MAP, QtmMachine
from pytket.phir.sharding.sharder import Sharder
from tests.test_utils import QasmFile, get_qasm_as_circuit

if __name__ == "__main__":
machine = Machine(3, {OpType.TK1, OpType.TK2}, {1}, MachineTimings(3.0, 1.0, 2.0))
machine = Machine(3, QTM_DEFAULT_GATESET, {1}, MachineTimings(3.0, 1.0, 2.0))
# force machine options for this test
# machines normally don't like odd numbers of qubits
machine.sq_options = {0, 1, 2}
Expand Down
10 changes: 4 additions & 6 deletions tests/test_placement.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,18 @@

import pytest

from pytket.circuit import OpType
from pytket.phir.machine import Machine, MachineTimings
from pytket.phir.placement import (
GateOpportunitiesError,
InvalidParallelOpsError,
place,
placement_check,
)
from pytket.phir.qtm_machine import QTM_DEFAULT_GATESET

tk_gateset = {OpType.TK1, OpType.TK2}

m = Machine(4, tk_gateset, {1}, MachineTimings(10, 2, 2))
m2 = Machine(6, tk_gateset, {1, 3}, MachineTimings(10, 2, 2))
m3 = Machine(8, tk_gateset, {0, 6}, MachineTimings(10, 2, 2))
m = Machine(4, QTM_DEFAULT_GATESET, {1}, MachineTimings(10, 2, 2))
m2 = Machine(6, QTM_DEFAULT_GATESET, {1, 3}, MachineTimings(10, 2, 2))
m3 = Machine(8, QTM_DEFAULT_GATESET, {0, 6}, MachineTimings(10, 2, 2))


def test_placement_check() -> None:
Expand Down

0 comments on commit 08b6934

Please sign in to comment.