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

feat: azure provider support #219

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 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
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ METRIQ_CLIENT_API_KEY="<METRIQ_CLIENT_API_KEY>"
AWS_ACCESS_KEY_ID="<AWS_ACCESS_KEY_ID>"
AWS_SECRET_ACCESS_KEY="<AWS_SECRET_ACCESS_KEY>"

# Azure
# Obtained at: https://portal.azure.com/
AZURE_SUBSCRIPTION_ID="<AZURE_SUBSCRIPTION_ID>"
AZURE_RESOURCE_GROUP="<AZURE_RESOURCE_GROUP>"
AZURE_WORKSPACE_NAME="<AZURE_WORKSPACE_NAME>"
AZURE_LOCATION="<AZURE_LOCATION>" # e.g. "westus"
Copy link
Contributor

Choose a reason for hiding this comment

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

we shall add the other three as well

AZURE_CLIENT_ID
AZURE_CLIENT_SECRET
AZURE_TENANT_ID

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in e578d2c


# IBM
# Obtained at: https://quantum.ibm.com
QISKIT_IBM_TOKEN="<QISKIT_IBM_TOKEN>"
Expand Down
7 changes: 5 additions & 2 deletions metriq_gym/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
QuantumProvider,
)
from qbraid.runtime import (
QiskitRuntimeProvider,
IonQProvider,
AzureQuantumProvider,
BraketProvider,
IonQProvider,
QiskitRuntimeProvider,
)
from enum import StrEnum

Expand All @@ -15,6 +16,7 @@ class ProviderType(StrEnum):
# https://github.com/qBraid/qBraid/blob/c6ec0a6fb48d4132c97d48845b6a630800578b78/pyproject.toml#L79-L85
# TODO: Consider moving this to a shared location
AWS = "aws" # supports IQM, QuEra, Rigetti devices
AZURE = "azure" # supports Rigetti, Quantinuum, IonQ devices
IBMQ = "ibm"
IONQ = "ionq"
QBRAID = "qbraid"
Expand All @@ -26,6 +28,7 @@ def value_list(cls):

QBRAID_PROVIDERS: dict[ProviderType, type[QuantumProvider]] = {
ProviderType.AWS: BraketProvider,
ProviderType.AZURE: AzureQuantumProvider,
ProviderType.IBMQ: QiskitRuntimeProvider,
ProviderType.IONQ: IonQProvider,
ProviderType.QBRAID: QbraidProvider,
Expand Down
Loading