-
Notifications
You must be signed in to change notification settings - Fork 115
Submitting jobs to Azure Quantum
To submit to real quantum environments, or to use a specific vendor's simulator, you can submit your Q# file to Azure Quantum. Note that only base-profile-compliant quantum programs can be submitted to Azure Quantum. In the VS Code status bar, if you see an indicator stating "QIR:Full", click on it and switch the QIR profile to Base before proceeding.

Follow the following steps to submit your base-profile-compliant Q# file to Azure Quantum:
- Sign in to an Azure Quantum Workspace.
- From the VS Code Command Palette, run the "Q#: Add an Azure Quantum Workspace" command and follow the instructions provided. (Note: This may prompt several times for permission as it requests access to the Azure subscription and Quantum workspace).
- Select a provider.
-
Ensure you have a Q# file selected and open.
-
Find the "Quantum Workspaces" section
-
Select the provider you want to submit to.
-
Either click the ⏵︎ (Play) button to the right of the provider, or run the "Q#: Submit current Q# program" command from the Command Palette while a provider is selected. (Note: These will only be available if the provider selected supports jobs targeting the QIR Base profile, which not all do currently).
-
Enter a friendly name and the number of shots for the job submission in the input boxes that appear.
-
After a short while, if submitted successfully, the new job should appear in the Jobs list for the workspace. Currently you need to manually refresh using the Refresh icon in the tree view to update this list.
-
If the job completed successfully, you will see an icon to the right of the job in the tree view to download the results. (Currently a histogram in text format).
-