Execution on Azure Hardware¶
The Classiq executor supports execution on Azure Quantum cloud simulators and hardware. For detailed information, visit https://azure.microsoft.com/en-us/services/quantum/.
Usage¶
Execution on Azure Quantum requires an Azure account with an active subscription, and an Azure Quantum workspace with the requested backend provider enabled. For more details, visit: https://docs.microsoft.com/en-us/azure/quantum/how-to-create-workspace.
{
"backend_preferences": {
"backend_service_provider": "Azure Quantum",
"backend_name": "Name of requested simulator or hardware",
"credential": {
"tenant_id": "Azure Tenant ID (from Azure Active Directory)",
"client_id": "Azure Application (client) ID",
"client_secret": "Azure Client Secret",
"resource_id": "Azure Quantum Workspace Resource ID",
},
"location": "Azure region of requested backend",
"run_through_classiq": "Boolean value, when set to True backend will run through classiq resources"
}
}
from classiq.execution import (
AzureCredential,
AzureBackendPreferences,
)
# Running through Classiq Azure integration:
preferences = AzureBackendPreferences(
backend_name="Name of requsted simulator or hardware",
)
# Running through private Azure account:
cred = AzureCredential(
tenant_id="Azure Tenant ID (from Azure Active Directory)",
client_id="Azure Application (client) ID",
client_secret="Azure Client Secret",
resource_id="Azure Quantum Workspace Resource ID",
)
preferences = AzureBackendPreferences(
backend_name="Name of requsted simulator or hardware",
credential=cred,
location="Azure region of requested backend",
)
NOTE: Some hardware is not available all the time. Check the availability windows with Azure Quantum.