Skip to content

Commit

Permalink
fix: The default QCSClient will now load without having QCS credentia…
Browse files Browse the repository at this point in the history
…ls (#1582)
  • Loading branch information
MarquessV committed May 30, 2023
1 parent 295ec07 commit 3341d79
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 26 deletions.
32 changes: 16 additions & 16 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rpcq = "^3.10.0"
pydantic = "^1.10.7"
networkx = "^2.5"
importlib-metadata = { version = ">=3.7.3,<5", python = "<3.8" }
qcs-sdk-python = "0.6.0rc.2"
qcs-sdk-python = "0.7.0"
retry = "^0.9.2"
types-python-dateutil = "^2.8.19"
types-retry = "^0.9.9"
Expand Down
10 changes: 1 addition & 9 deletions pyquil/api/_quantum_computer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.
##############################################################################
import itertools
import logging
import re
import socket
import subprocess
Expand All @@ -40,7 +39,6 @@

from qcs_sdk import QCSClient
from qcs_sdk.qpu import list_quantum_processors
from qcs_sdk.qpu.client import LoadClientError

from pyquil.api._abstract_compiler import AbstractCompiler, QuantumExecutable
from pyquil.api._compiler import QPUCompiler, QVMCompiler
Expand Down Expand Up @@ -797,13 +795,7 @@ def get_qc(
.. _QCS API Docs: https://docs.api.qcs.rigetti.com/#tag/endpoints
"""

if client_configuration is None:
try:
client_configuration = QCSClient.load()
except LoadClientError:
logging.getLogger().info("No QCS client configuration found, only generic QVMs will be accessible.")
client_configuration = QCSClient()
client_configuration = QCSClient.load()

# 1. Parse name, check for redundant options, canonicalize names.
prefix, qvm_type, noisy = _parse_name(name, as_qvm, noisy)
Expand Down

0 comments on commit 3341d79

Please sign in to comment.