8000 Fix simulator check for Azure targets by cosenal · Pull Request #956 · qBraid/qBraid · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix simulator check for Azure targets #956

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

Merged
merged 2 commits into from
Apr 21, 2025

Conversation

cosenal
Copy link
Contributor
@cosenal cosenal commented Apr 21, 2025

Summary of changes

Non-simulator target profiles on Azure follow the pattern provider_id.qpu.device_id, see https://learn.microsoft.com/en-us/azure/quantum/qc-target-list
Old code was not working as it'd compare the string qpu.device_id against qpu, producing ill results.

Testing

Smoke test

from qbraid.runtime import AzureQuantumProvider
provider = AzureQuantumProvider()
device = provider.get_device("ionq.simulator")
assert(device.simulator)
device = provider.get_device("ionq.qpu.aria-1")
assert(not device.simulator)

Unit test

tox -e unit-tests -- tests/runtime/azure/test_azure_runtime.py

@cosenal cosenal requested a review from ryanhill1 as a code owner April 21, 2025 08:48
@cosenal
Copy link
Contributor Author
cosenal commented Apr 21, 2025

Same test failures are in main as well, and unrelated to the scope of this PR.

Copy link
Member
@ryanhill1 ryanhill1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Yes, other test failures due to pyqasm bug in latest release: qBraid/pyqasm#175

Patching with #957

@ryanhill1 ryanhill1 merged commit 7d993fe into qBraid:main Apr 21, 2025
3 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0