Skip to main content

Python client for Azure Quantum

Project description

Python SDK for Azure Quantum

The azure-quantum package for Python provides functionality for interacting with Azure Quantum workspaces, including creating jobs, listing jobs, and retrieving job results.

For details on how to get started with Azure Quantum, please visit https://azure.com/quantum.

You can also try our Quantum Computing Fundamentals learning path to get familiar with the basic concepts of quantum computing, build quantum programs, and identify the kind of problems that can be solved.

Installing with pip

pip install azure-quantum

Development

The best way to install all the Python pre-reqs packages is to create a new Conda environment. Run at the root of the azure-quantum directory:

conda env create -f environment.yml

Then to activate the environment:

conda activate azurequantum

In case you have created the conda environment a while ago, you can make sure you have the latest versions of all dependencies by updating your environment:

conda env update -f environment.yml --prune

Install the local development package

To install the package in development mode, run:

pip install -e .

Unit tests

To run the unit tests, simply run pytest from the root of the azure-quantum directory:

pytest

To run the a specific unit test class, run:

pytest ./tests/unit/test_job.py

To run the a specific unit test case, run:

pytest -k test_job_refresh

Building the azure-quantum Package

The Azure Quantum Python SDK uses a standard setuptools-based packaging strategy. To build a platform-independent wheel, run the setup script with bdist_wheel instead:

cd src/Python/
python setup.py bdist_wheel

By default, this will create a azure-quantum wheel in dist/ with the version number set to 0.0.0.1. To provide a more useful version number, set the PYTHON_VERSION environment variable before running setup.py.

Environment Variables

In addition to the common Azure SDK environment variables, you can also set the following environment variables to change the behaviour of the Azure Quantum SDK for Python:

Environment Variable Description
AZURE_QUANTUM_PYTHON_APPID Prefixes the HTTP User-Agent header with the specified value

Support and Q&A

If you have questions about the Quantum Development Kit and the Q# language, or if you encounter issues while using any of the components of the kit, you can reach out to the quantum team and the community of users in Stack Overflow and in Quantum Computing Stack Exchange tagging your questions with q#.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azure-quantum-0.18.2108.160310.tar.gz (52.2 kB view details)

Uploaded Source

Built Distribution

azure_quantum-0.18.2108.160310-py3-none-any.whl (93.9 kB view details)

Uploaded Python 3

File details

Details for the file azure-quantum-0.18.2108.160310.tar.gz.

File metadata

  • Download URL: azure-quantum-0.18.2108.160310.tar.gz
  • Upload date:
  • Size: 52.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

File hashes

Hashes for azure-quantum-0.18.2108.160310.tar.gz
Algorithm Hash digest
SHA256 764cfaa010e4787413c7a5df41536276b48d3fc548b9e14e40b1e122aabbf7c5
MD5 b8a035573891f26465069edc60809115
BLAKE2b-256 858a742995a4e88bbfd0888c778d08b5eb302f50e433e8c6869134e575933d83

See more details on using hashes here.

File details

Details for the file azure_quantum-0.18.2108.160310-py3-none-any.whl.

File metadata

  • Download URL: azure_quantum-0.18.2108.160310-py3-none-any.whl
  • Upload date:
  • Size: 93.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

File hashes

Hashes for azure_quantum-0.18.2108.160310-py3-none-any.whl
Algorithm Hash digest
SHA256 4412eca1fec8cf183c53a2e08cb8383cac590290eabab2ac0b3d9d621d532562
MD5 3f74887fa9415200dd018bf7c7fc4c84
BLAKE2b-256 2dd4680cf941f46fbeb1740d5dc28aab72891529c470a153a0510eb8d3d51771

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page