Skip to content

Commit

Permalink
Merge pull request #277 from BQSKit/update-models
Browse files Browse the repository at this point in the history
Update Pre-built Models
  • Loading branch information
edyounis authored Sep 11, 2024
2 parents c301746 + c33fda2 commit 264ded8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
9 changes: 9 additions & 0 deletions bqskit/ext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
Aspen11Model
AspenM2Model
ANKAA2Model
ANKAA9Q3Model
H1_1Model
H1_2Model
H2_1Model
Sycamore23Model
SycamoreModel
model_from_backend
Expand Down Expand Up @@ -64,8 +67,11 @@
from bqskit.ext.qiskit.translate import qiskit_to_bqskit
from bqskit.ext.quantinuum import H1_1Model
from bqskit.ext.quantinuum import H1_2Model
from bqskit.ext.quantinuum import H2_1Model
from bqskit.ext.qutip.translate import bqskit_to_qutip
from bqskit.ext.qutip.translate import qutip_to_bqskit
from bqskit.ext.rigetti import ANKAA2Model
from bqskit.ext.rigetti import ANKAA9Q3Model
from bqskit.ext.rigetti import Aspen11Model
from bqskit.ext.rigetti import AspenM2Model
from bqskit.ext.supermarq import supermarq_critical_depth
Expand Down Expand Up @@ -95,6 +101,9 @@
'AspenM2Model',
'H1_1Model',
'H1_2Model',
'H2_1Model',
'ANKAA2Model',
'ANKAA9Q3Model',
'Sycamore23Model',
'SycamoreModel',
]
23 changes: 0 additions & 23 deletions bqskit/ext/honeywell.py

This file was deleted.

5 changes: 3 additions & 2 deletions bqskit/ext/quantinuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

from bqskit.compiler.machine import MachineModel
from bqskit.ir.gate import Gate
from bqskit.ir.gates.constant.zz import ZZGate
from bqskit.ir.gates.parameterized.rz import RZGate
from bqskit.ir.gates.parameterized.rzz import RZZGate
from bqskit.ir.gates.parameterized.u1q import U1qPi2Gate
from bqskit.ir.gates.parameterized.u1q import U1qPiGate

quantinuum_gate_set: set[Gate] = {U1qPiGate, U1qPi2Gate, RZGate(), ZZGate()}
quantinuum_gate_set: set[Gate] = {U1qPiGate, U1qPi2Gate, RZGate(), RZZGate()}

H1_1Model = MachineModel(20, None, quantinuum_gate_set)
H1_2Model = MachineModel(20, None, quantinuum_gate_set)
H2_1Model = MachineModel(56, None, quantinuum_gate_set)
13 changes: 13 additions & 0 deletions bqskit/ext/rigetti.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

from bqskit.compiler.machine import MachineModel
from bqskit.ir.gates.constant.cz import CZGate
from bqskit.ir.gates.constant.iswap import ISwapGate
from bqskit.ir.gates.constant.sx import SXGate
from bqskit.ir.gates.constant.x import XGate
from bqskit.ir.gates.parameterized.rz import RZGate
from bqskit.qis.graph import CouplingGraph

rigetti_gate_set = {SXGate(), XGate(), RZGate(), CZGate()}

ankaa_gate_set = {SXGate(), XGate(), RZGate(), CZGate(), ISwapGate()}

_aspen_11_coupling_graph = CouplingGraph([
# Ring 1
(0, 1), (1, 2), (2, 3), (3, 4),
Expand Down Expand Up @@ -79,10 +82,20 @@
_aspen_m2_coupling_graph = CouplingGraph(_links)
"""Retrieved August 31, 2022: https://qcs.rigetti.com/qpus."""

_ankaa_9q_3_coupling_graph = CouplingGraph.grid(3, 3)
"""Retrieved September 11, 2024: https://qcs.rigetti.com/qpus."""

_ankaa_2_coupling_graph = CouplingGraph.grid(7, 12)
"""Retrieved September 11, 2024: https://qcs.rigetti.com/qpus."""

Aspen11Model = MachineModel(40, _aspen_11_coupling_graph, rigetti_gate_set)
"""A BQSKit MachineModel for Rigetti's Aspen-11 quantum processor."""

AspenM2Model = MachineModel(80, _aspen_m2_coupling_graph, rigetti_gate_set)
"""A BQSKit MachineModel for Rigetti's Aspen-M-2 quantum processor."""

ANKAA2Model = MachineModel(84, _ankaa_2_coupling_graph, ankaa_gate_set)

ANKAA9Q3Model = MachineModel(9, _ankaa_9q_3_coupling_graph, ankaa_gate_set)

__all__ = ['Aspen11Model', 'AspenM2Model']

0 comments on commit 264ded8

Please sign in to comment.