Skip to content

Commit

Permalink
Fix: Failing a fetch to get an ISA will no longer raise errors when i…
Browse files Browse the repository at this point in the history
…nitializing a backend (#46)
  • Loading branch information
MarquessV authored Feb 6, 2024
1 parent bacbcf6 commit e7b2fd1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions qiskit_rigetti/_qcs_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from typing import Any, Optional, List, Dict

from pyquil.api import QCSClient, list_quantum_computers
from qcs_sdk.qpu.isa import InstructionSetArchitecture, get_instruction_set_architecture
from qcs_sdk.qpu.isa import InstructionSetArchitecture, get_instruction_set_architecture, GetISAError
from qiskit.providers import ProviderV1
from qiskit.providers.models import QasmBackendConfiguration

Expand Down Expand Up @@ -105,7 +105,13 @@ def get_simulator(self, *, num_qubits: int, noisy: bool = False) -> RigettiQCSBa

def _get_quantum_processors(self) -> Dict[str, InstructionSetArchitecture]:
qpus = list_quantum_computers(qvms=False, client_configuration=self._client_configuration)
return {qpu: get_instruction_set_architecture(qpu, client=self._client_configuration) for qpu in qpus}
qpu_to_isa: Dict[str, InstructionSetArchitecture] = {}
for qpu in qpus:
try:
qpu_to_isa[qpu] = get_instruction_set_architecture(qpu, client=self._client_configuration)
except GetISAError:
pass
return qpu_to_isa


def _configuration(name: str, num_qubits: int, local: bool, simulator: bool) -> QasmBackendConfiguration:
Expand Down

0 comments on commit e7b2fd1

Please sign in to comment.