Skip to content

Commit

Permalink
Add key for each device name
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasenQunasys committed Jun 14, 2024
1 parent 7216935 commit 47f0a1b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/braket/quri_parts/braket/backend/transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,22 @@ class AwsDeviceTranspiler(SequentialTranspiler):
"""

def __init__(self, device: AwsDevice):
name_action_type = {
"LocalSimulator": "braket.ir.jaqcd.program",
"SV1": "braket.ir.jaqcd.program",
"TN1": "braket.ir.jaqcd.program",
"dm1": "braket.ir.jaqcd.program",
"Harmony": "braket.ir.jaqcd.program",
"Aria 1": "braket.ir.openqasm.program",
"Aria 2": "braket.ir.openqasm.program",
"Garnet": "braket.ir.openqasm.program",
}
transpilers = []
action_type = name_action_type[device.name]
device_operation = device.properties.dict()["action"][
"braket.ir.openqasm.program"
action_type
]["supportedOperations"]

if "cz" not in device_operation:
transpilers.append(CZ2CNOTHTranspiler())
super().__init__(transpilers)

0 comments on commit 47f0a1b

Please sign in to comment.