Skip to content

Commit 4c85602

Browse files
doc: job/device compatibility
1 parent 95f0774 commit 4c85602

File tree

1 file changed

+70
-19
lines changed

1 file changed

+70
-19
lines changed

mpqp/execution/devices.py

+70-19
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
1313
Not all combinations of :class:`AvailableDevice` and
1414
:class:`JobType<mpqp.execution.job.JobType>` are possible, for each device
15-
listed bellow, ``S`` means if supports the ``SAMPLE`` job type, ``SV`` the
16-
``STATE_VECTOR`` one and ``O`` the ``OBSERVABLE`` one.
15+
listed bellow, ``S`` means it supports the ``SAMPLE`` job type, ``SV`` the
16+
``STATE_VECTOR`` one and ``O`` the ``OBSERVABLE`` one. A variation of the
17+
``OBSERVABLE`` job type is the ideal case (when ``shots=0``), this one is denoted
18+
``Oi``.
1719
"""
1820

1921
from abc import abstractmethod
@@ -52,55 +54,84 @@ def is_simulator(self) -> bool:
5254

5355

5456
class IBMDevice(AvailableDevice):
55-
"""Enum regrouping all available devices provided by IBM Quantum."""
57+
"""Enum regrouping all available devices provided by IBM Quantum.
5658
57-
PULSE_SIMULATOR = "pulse_simulator"
59+
Warning:
60+
Since previous version, many devices were disabled by IBM. This may
61+
affect your code. We are currently investigating the issue to check if a
62+
workaround is possible for some of them (like replacing a simulator by
63+
an equivalent one for instance).
64+
"""
65+
66+
# PULSE_SIMULATOR = "pulse_simulator"
5867

5968
AER_SIMULATOR = "aer_simulator"
60-
"""``S``"""
69+
"""``S`` ``O`` ``Oi``"""
6170
AER_SIMULATOR_STATEVECTOR = "aer_simulator_statevector"
62-
"""``SV``"""
63-
AER_SIMULATOR_DENSITY_MATRIX = "aer_simulator_density_matrix"
64-
AER_SIMULATOR_STABILIZER = "aer_simulator_stabilizer"
65-
AER_SIMULATOR_MATRIX_PRODUCT_STATE = "aer_simulator_matrix_product_state"
66-
AER_SIMULATOR_EXTENDED_STABILIZER = "aer_simulator_extended_stabilizer"
67-
AER_SIMULATOR_UNITARY = "aer_simulator_unitary"
68-
AER_SIMULATOR_SUPEROP = "aer_simulator_superop"
69-
70-
IBMQ_SIMULATOR_STATEVECTOR = "simulator_statevector"
71-
IBMQ_SIMULATOR_STABILIZER = "simulator_stabilizer"
72-
IBMQ_SIMULATOR_EXTENDED_STABILIZER = "simulator_extended_stabilizer"
73-
IBMQ_SIMULATOR_MPS = "simulator_mps"
74-
IBMQ_QASM_SIMULATOR = "ibmq_qasm_simulator"
71+
"""``SV`` ``O``"""
72+
# TODO: many devices are no longer working, explore why
73+
# AER_SIMULATOR_DENSITY_MATRIX = "aer_simulator_density_matrix"
74+
# AER_SIMULATOR_STABILIZER = "aer_simulator_stabilizer"
75+
# AER_SIMULATOR_MATRIX_PRODUCT_STATE = "aer_simulator_matrix_product_state"
76+
# AER_SIMULATOR_EXTENDED_STABILIZER = "aer_simulator_extended_stabilizer"
77+
# AER_SIMULATOR_UNITARY = "aer_simulator_unitary"
78+
# AER_SIMULATOR_SUPEROP = "aer_simulator_superop"
79+
80+
# IBMQ_SIMULATOR_STATEVECTOR = "simulator_statevector"
81+
# IBMQ_SIMULATOR_STABILIZER = "simulator_stabilizer"
82+
# IBMQ_SIMULATOR_EXTENDED_STABILIZER = "simulator_extended_stabilizer"
83+
# IBMQ_SIMULATOR_MPS = "simulator_mps"
84+
# IBMQ_QASM_SIMULATOR = "ibmq_qasm_simulator"
7585

7686
IBM_BRISBANE = "ibm_brisbane"
87+
"""``S`` ``O``"""
7788
IBM_OSAKA = "ibm_osaka"
89+
"""``S`` ``O``"""
7890
IBM_KYOTO = "ibm_kyoto"
91+
"""``S`` ``O``"""
7992

8093
IBM_SHERBROOKE = "ibm_sherbrooke"
94+
"""``S`` ``O``"""
8195
IBM_KYIV = "ibm_kyiv"
96+
"""``S`` ``O``"""
8297
IBM_NAZCA = "ibm_nazca"
98+
"""``S`` ``O``"""
8399
IBM_CUSCO = "ibm_cusco"
100+
"""``S`` ``O``"""
84101
IBM_ITHACA = "ibm_ithaca"
102+
"""``S`` ``O``"""
85103
IBM_TORINO = "ibm_torino"
104+
"""``S`` ``O``"""
86105
IBM_QUEBEC = "ibm_quebec"
106+
"""``S`` ``O``"""
87107
IBM_KAWASAKI = "ibm_kawasaki"
108+
"""``S`` ``O``"""
88109
IBM_CLEVELAND = "ibm_cleveland"
110+
"""``S`` ``O``"""
89111
IBM_CAIRO = "ibm_cairo"
112+
"""``S`` ``O``"""
90113
IBM_HANOI = "ibm_hanoi"
114+
"""``S`` ``O``"""
91115
IBM_ALGIERS = "ibm_algiers"
116+
"""``S`` ``O``"""
92117
IBM_KOLKATA = "ibm_kolkata"
118+
"""``S`` ``O``"""
93119
IBM_MUMBAI = "ibm_mumbai"
120+
"""``S`` ``O``"""
94121
IBM_PEEKSKILL = "ibm_peekskill"
122+
"""``S`` ``O``"""
95123

96124
IBM_RANDOM_SMALL_DEVICE = "ibm_small_device"
125+
"""``S`` ``O``"""
97126
IBM_SMALL_DEVICES_LEAST_BUSY = "ibm_least_busy"
127+
"""``S`` ``O``"""
98128

99129
def is_remote(self) -> bool:
100130
return self.name.startswith("IBM")
101131

102132
def is_gate_based(self) -> bool:
103-
return self != IBMDevice.PULSE_SIMULATOR
133+
return True
134+
# return self != IBMDevice.PULSE_SIMULATOR
104135

105136
def is_simulator(self) -> bool:
106137
return "simulator" in self.value
@@ -110,16 +141,22 @@ class ATOSDevice(AvailableDevice):
110141
"""Enum regrouping all available devices provided by ATOS."""
111142

112143
MYQLM_PYLINALG = auto()
144+
"""``S`` ``SV`` ``O`` ``Oi``"""
113145
MYQLM_CLINALG = auto()
146+
"""``S`` ``SV`` ``O`` ``Oi``"""
114147

115148
QLM_LINALG = auto()
149+
"""``S`` ``SV`` ``O`` ``Oi``"""
116150
QLM_MPS = auto()
151+
"""``S`` ``SV`` ``Oi``"""
117152
QLM_MPS_LEGACY = auto()
118153
QLM_MPO = auto()
154+
"""``S`` ``Oi``"""
119155
QLM_STABS = auto()
120156
QLM_FEYNMAN = auto()
121157
QLM_BDD = auto()
122158
QLM_NOISY_QPROC = auto()
159+
"""``S`` ``O`` ``Oi``"""
123160
QLM_SQA = auto()
124161
QLM_QPEG = auto()
125162
QLM_CLASSICAL_QPU = auto()
@@ -138,18 +175,27 @@ class AWSDevice(AvailableDevice):
138175
"""Enum regrouping all available devices provided by AWS Braket."""
139176

140177
BRAKET_LOCAL_SIMULATOR = "LocalSimulator"
178+
"""``S`` ``SV`` ``O`` ``Oi``"""
141179

142180
BRAKET_SV1_SIMULATOR = "quantum-simulator/amazon/sv1"
181+
"""``SV`` ``Oi``"""
143182
BRAKET_DM1_SIMULATOR = "quantum-simulator/amazon/dm1"
144183
BRAKET_TN1_SIMULATOR = "quantum-simulator/amazon/tn1"
145184

146185
BRAKET_IONQ_HARMONY = "qpu/ionq/Harmony"
186+
"""``S`` ``O``"""
147187
BRAKET_IONQ_ARIA_1 = "qpu/ionq/Aria-1"
188+
"""``S`` ``O``"""
148189
BRAKET_IONQ_ARIA_2 = "qpu/ionq/Aria-2"
190+
"""``S`` ``O``"""
149191
BRAKET_IONQ_FORTE_1 = "qpu/ionq/Forte-1"
192+
"""``S`` ``O``"""
150193
BRAKET_OQC_LUCY = "qpu/oqc/Lucy"
194+
"""``S`` ``O``"""
151195
BRAKET_QUERA_AQUILA = "qpu/quera/Aquila"
196+
"""``S`` ``O``"""
152197
BRAKET_RIGETTI_ASPEN_M_3 = "qpu/rigetti/Aspen-M-3"
198+
"""``S`` ``O``"""
153199

154200
def is_remote(self):
155201
return self != AWSDevice.BRAKET_LOCAL_SIMULATOR
@@ -236,10 +282,15 @@ class GOOGLEDevice(AvailableDevice):
236282
"""Enum regrouping all available devices provided by CIRQ."""
237283

238284
CIRQ_LOCAL_SIMULATOR = "LocalSimulator"
285+
"""``S`` ``SV`` ``O`` ``Oi``"""
239286
PROCESSOR_RAINBOW = "rainbow"
287+
"""``S``"""
240288
PROCESSOR_WEBER = "weber"
289+
"""``S``"""
241290
IONQ_SIMULATOR = "simulator"
291+
"""``S``"""
242292
IONQ_QPU = "qpu"
293+
"""``S``"""
243294

244295
def is_remote(self):
245296
if self.name.startswith("IONQ"):

0 commit comments

Comments
 (0)