Skip to main content

The SDK in the Tergite software stack for connecting to the Swedish quantum computer

Project description

Tergite

PyPI version license CI PyPI pyversions

The SDK in the Tergite software stack for connecting to the Swedish quantum computer.

It includes:

This project is developed by a core group of collaborators. Chalmers Next Labs AB (CNL) takes on the role of managing and maintaining this project.

Version Control

The tergite stack is developed on a separate version control system and mirrored on Github. If you are reading this on GitHub, then you are looking at a mirror.

Installation

Install using pip

pip install tergite

Dependencies

Provider Setup

  • Ensure you have Python +3.12 installed.

  • Create an account with QAL 9000 if you haven't already. (Or you can have your own tergite Frontend running)

  • With the credentials received from Tergite, create and save a provider account by calling Tergite.use_provider_account(..., save=True).

from tergite import Tergite

provider = Tergite.use_provider_account(
    service_name="MY_SERVICE_NAME",
    url="https://api.qal9000.se",  # or the URL to your own tergite MSS,
    token="MY_API_TOKEN",
    save=True,
)

The code above stores your credentials in a configuration file called tergiterc, located in $HOME/.qiskit folder, $HOME being your home directory.

Once saved, you can retrieve this particular account using the SERVICE_NAME from anywhere in your code. From the provider, you can retrieve any backend you wish by name.

provider = Tergite.get_provider(service_name="MY_SERVICE_NAME")

# display list of backends
print(provider.backends())

# access the 'Loke' backend
backend = provider.get_backend("Loke")

Create a Throw-away Provider Account

  • Alternatively, you can create a provider account that won't be saved. This is useful in things like automated tests. Just call the Tergite.use_provider_account(account) without the save option.
from tergite import Tergite

# the account from before
provider = Tergite.use_provider_account( 
    service_name="MY_SERVICE_NAME",
    url="https://api.qal9000.se",  # or the URL to your own tergite MSS
    token="MY_API_TOKEN",
)

Examples and demos

This project has a long history with contributions of many different partners. All files in the archive folder are scripts from live demonstrations, which show the historical progression of the project. Since research in quantum computing is moving fast, these files are meant to inspire and might not be functional with the source code of this library.

To find out how to use the library, please take a look into the notebooks and scripts inside the examples folder.

ToDo

  • Add docs and doc generation
  • Convert archives into examples, adding proper credits and timestamps

Contribution Guidelines

If you would like to contribute to tergite, please have a look at our contribution guidelines

Authors

This project is a work of many contributors.

Special credit goes to the authors of this project as seen in the CREDITS file.

ChangeLog

To view the changelog for each version, have a look at the CHANGELOG.md file.

License

Apache 2.0 License

Acknowledgements

This project was sponsored by:

Project details


Download files

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

Source Distribution

tergite-2025.12.0.tar.gz (85.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tergite-2025.12.0-py3-none-any.whl (98.3 kB view details)

Uploaded Python 3

File details

Details for the file tergite-2025.12.0.tar.gz.

File metadata

  • Download URL: tergite-2025.12.0.tar.gz
  • Upload date:
  • Size: 85.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for tergite-2025.12.0.tar.gz
Algorithm Hash digest
SHA256 1f9e9a37ada660f18f4a45e80ae7d1c36ad092dfd26245c5a1a773558e960beb
MD5 537a553dfae275b5176c3d7f8196f7cf
BLAKE2b-256 7df98e23477772cf48293e2e37fe11e4d4479e4474fd4746ab6d4a2ac92ab385

See more details on using hashes here.

File details

Details for the file tergite-2025.12.0-py3-none-any.whl.

File metadata

  • Download URL: tergite-2025.12.0-py3-none-any.whl
  • Upload date:
  • Size: 98.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for tergite-2025.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc33f96bc79699b45649e2c61f3ae6b361585fe056317f92ca339e7fe4106c44
MD5 9aed3ae9b7dcff538b9689c7549e268c
BLAKE2b-256 a51cac4a4c30e9f37963f3e2863c0506e3dc0d716281df2f10de789ac02d8be4

See more details on using hashes here.

Supported by

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