|
2 | 2 | # Copyright (c) Microsoft Corporation.
|
3 | 3 | # Licensed under the MIT License.
|
4 | 4 | ##
|
5 |
| -from typing import TYPE_CHECKING |
| 5 | +from typing import TYPE_CHECKING, Union, List |
6 | 6 | from azure.quantum.version import __version__
|
7 | 7 | from azure.quantum.qiskit.job import AzureQuantumJob
|
8 | 8 |
|
|
56 | 56 |
|
57 | 57 |
|
58 | 58 | class HoneywellBackend(Backend):
|
59 |
| - """Base class for interfacing with an Honeywell backend in Azure Quantum""" |
| 59 | + """Base class for interfacing with a Honeywell backend in Azure Quantum""" |
60 | 60 |
|
61 | 61 | @classmethod
|
62 | 62 | def _default_options(cls):
|
63 | 63 | return Options(count=500)
|
64 | 64 |
|
65 |
| - def run(self, circuit: QuantumCircuit, **kwargs): |
66 |
| - """Submits the given circuit for execution on an Honeywell target.""" |
| 65 | + def run(self, circuit: Union[QuantumCircuit, List[QuantumCircuit]], **kwargs): |
| 66 | + """Submits the given circuit for execution on a Honeywell target.""" |
| 67 | + # Some Qiskit features require passing lists of circuits, so unpack those here. |
| 68 | + # We currently only support single-experiment jobs. |
| 69 | + if isinstance(circuit, (list, tuple)): |
| 70 | + if len(circuit) > 1: |
| 71 | + raise NotImplementedError("Multi-experiment jobs are not supported!") |
| 72 | + circuit = circuit[0] |
| 73 | + |
67 | 74 | # If the circuit was created using qiskit.assemble,
|
68 | 75 | # disassemble into QASM here
|
69 | 76 | if isinstance(circuit, QasmQobj) or isinstance(circuit, Qobj):
|
|
0 commit comments