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

Add feature "connection_string" #15

Merged
merged 3 commits into from
Oct 7, 2024
Merged

Conversation

yoshi-qc
Copy link
Contributor

Description

Add Azure Quantum connection_string.
https://learn.microsoft.com/en-us/azure/quantum/how-to-connect-workspace?tabs=tabid-python1%2Ctabid-python

In this PR, the options connection_string and use_string are added on AzureBackend in azure.py and AzureConfig in config.py.

  • Set connection_string on Azure quantum.
connection_string = "your_connection_string"
set_azure_config(connection_string= connection_string, use_string = True)

After seting as above, the quantum computing using TKET's manners, AzureBackend.available_devices(), AzureBackend('quantinuum.sim.h1-1e'), etc., works.

Checklist

  • I have performed a self-review of my code.
  • I have commented hard-to-understand parts of my code.
  • I have made corresponding changes to the public API documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the changelog with any user-facing changes.

@yoshi-qc yoshi-qc requested a review from cqc-alec as a code owner August 22, 2024 02:15
@yoshi-qc
Copy link
Contributor Author

yoshi-qc commented Oct 4, 2024

We can access to Azure Quantum without a popup window as below. I have confirmed that AzureQuantum can be accessed from a docker container. I hope this helps for Nexus.

from pytket.extensions.azure import AzureBackend, AzureConfig, set_azure_config
connection_string = "your_connection_string"
set_azure_config(connection_string= connection_string, use_string = True)
AzureBackend.available_devices()

@cqc-alec cqc-alec merged commit 76e8f79 into main Oct 7, 2024
1 of 2 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