Q# 2/3 โ€“ Running Q# on Microsoft Azure Quantum

After giving you a snipplet on how to create a Qubit in superposition in Q#, let’s have look how to run this program via your Visual Studio Code instance using the Microsofts Quantum Development Kit (QDK).

To run the snipplet on a simulator or even on real quantum hardware Microsoft Azure Quantum service is the place, where you have to start. The service offers to test several Quantum computation approaches.

Here’s a quick overview of the features of Azure Quantum:

CapabilityDetails
Multiโ€‘provider accessIonQ (ion traps), Rigetti (superconducting Qubits), and topological qubits (Majorana-Qubits as derived from Microsoft research)
Simulation and executionRun your Q# code locally and then scale to cloud-based simulators or hardware
Hybrid workflowsCombine classical and quantum code in one pipeline via Q#

So let’s start on how to run your Q# code:

  1. As Microsoft developer, I assume you have an active Azure account. Just create an Azure Quantum Workspace via azure.microsoft.com.
  2. Install the Q# Azure QDK in Visual Studio Code from https://marketplace.visualstudio.com/items?itemName=quantum.qsharp-lang-vscode.
  3. Write your Q# in your Visual Studio Code environment, then run your local simulation or submit the code to the chosen Azure Quantum provider, and then just analyze the results.

At the moment Microsoft provides free introductory credits, so a great way to start experimenting with Q# without additional costs.

Part 3 of my little Q# series will show you, how to generate your Q# code using natural language and Microsoft Copilot. Have fun and happy coding ๐Ÿš€!