Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4: fix: The default QCSClient will now load without having QCS credentials #1582

Merged
merged 2 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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