Package: azure-quantum
Azure QuantumAzure Quantum is Microsoft's cloud service for running Quantum Computing programs and circuits with our quantum partners and technologies. Theazure-quantumpackage for Python provides functionality for interacting with Azure Quantum workspaces, including creating jobs, listing jobs, and retrieving job results. For more information, view theAzure Quantum Documentation.This package supports submitting quantum programs or circuits written with Python. To submit quantum programs written with Q#, Microsoft's Domain-specific language for Quantum Programming, viewSubmit Q# Jobs to Azure Quantum.InstallationThe package is released on PyPI and can be installed viapip:pipinstallazure-quantumTo useazure-quantumfor submitting quantum circuits expressed withQiskit, install with optional dependencies:pipinstallazure-quantum[qiskit]To useazure-quantumfor submitting quantum circuits expressed withCirq, install with optional dependencies:pipinstallazure-quantum[cirq]Getting started and Quickstart guidesTo work in Azure Quantum, you need an Azure subscription. If you don't have an Azure subscription, create afree account. Follow theCreate an Azure Quantum workspacehow-to guide to set up your Workspace and enable your preferred providers.To get started, visit the following Quickstart guides:Quickstart: Submit a circuit with QiskitQuickstart: Submit a circuit with CirqQuickstart: Submit a circuit with a provider-specific format.General usageTo connect to your Azure Quantum Workspace, go to theAzure Portal, navigate to your Workspace and copy-paste the resource ID and location into the code snippet below.fromazure.quantumimportWorkspace# Enter your Workspace details (resource ID and location) belowworkspace=Workspace(resource_id="",location="")List all targetsTo list all targets that are available to your workspace, runworkspace.get_targets()Submit a quantum program or circuitFirst, define a quantum program or circuit, and create a job by submitting it to one of the available targets:# Enter target name belowtarget=workspace.get_targets("mytarget")# Submit quantum program or circuitjob=target.submit(my_quantum_program)# Wait for job to complete and fetch resultsresult=job.get_results()ExamplesYou can find example Python scripts that use the Azure Quantum Python API in theexamplesdirectory.ContributingFor details on contributing to this package, see thecontributing guide.This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visithttps://cla.microsoft.com.When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.This project has adopted theMicrosoft Open Source Code of Conduct.
For more information see theCode of Conduct FAQor contactopencode@microsoft.comwith any additional questions or comments.SupportIf you run into any problems or bugs using this package, please head over to theissuespage and open a new issue, if it does not already exist.