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

Prevent double authentication while using openqaoa-azure #249

Merged
merged 2 commits into from
Jun 14, 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
4 changes: 2 additions & 2 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[pytest]
markers =
qpu: marks tests that require a QPU connection (deselect with '-m "not qpu"')
api: marks tests that require a coonection to a QC cloud (deselect with '-m "not api"')
qvm: marks tests that require an attive Rigetti QVM and QILC compiler (deselect with '-m "not qvm"')
api: marks tests that require a connection to a QC cloud (deselect with '-m "not api"')
qvm: marks tests that require an active Rigetti QVM and QILC compiler (deselect with '-m "not qvm"')
docker_aws: marks tests that require to build aws docker (deselect with '-m "not docker_aws"')
braket_api: marks tests that require valid AWS credentials (no QPU) (deselect with '-m "not braket_api"')
notebook: marks tests that run on jupyter noteboks (deselect with '-m "not notebook"')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class QAOA(Workflow):

>>> q = QAOA()
>>> q.compile(QUBO)
>>> q.optimise()
>>> q.optimize()

Where `QUBO` is a an instance of `openqaoa.problems.problem.QUBO`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RQAOA(Workflow):

>>> r = RQAOA()
>>> r.compile(QUBO)
>>> r.optimise()
>>> r.optimize()

Where `QUBO` is a an instance of `openqaoa.problems.problem.QUBO`

Expand Down
3 changes: 2 additions & 1 deletion src/openqaoa-core/openqaoa/backends/basebackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ class QAOABaseBackendCloud:

def __init__(self, device: DeviceBase):
self.device = device
self.device.check_connection()
if getattr(self.device, "provider_connected", None) is None and getattr(self.device, "qpu_connected", None) is None:
self.device.check_connection()


class QAOABaseBackendParametric:
Expand Down