Skip to main content

SDK for the Quantum Inspire platform.

Project description

Quantum Inspire

License

Welcome to the repository for the Quantum Inspire tool. The goal of this project to offer basic support for interacting with the Quantum Inspire platform. Currently, functionality of the tool is still limited, but the tool is required for logging in to the Quantum Inspire systems. For example, if you would like to use the QI Qiskit or Pennylane plugins.

Installation

The recommended way of installing the CLI is to use pipx. (Conda users should refer to the subsection below). After following the pipx installation instructions, run the following command:

pipx install quantuminspire

Afterwards, running qi --help should show a help menu.

[!NOTE]
If your python version is newer then supported by quantuminspire, please run the following command: pipx install quantuminspire --python /path/to/python3.12. Check which versions of python are supported by the tool.

Installation using Conda

[!WARNING]
Installing quantuminspire using pipx inside a conda environment may cause conflicts with other packages. This can result in unexpected behavior and prevent you from using the tool correctly. To avoid these issues, it is recommended to instead create a Conda environment from an environment.yml file.

Check you Conda version with conda --version, then run the appropriate command:

Conda >= 26.3:

conda create --file https://conda.quantum-inspire.com/cli.yml

Conda < 26.3:

conda env create --file https://conda.quantum-inspire.com/cli.yml

By default, the environment that will be created will be named quantuminspire; use the -n/--name <CUSTOM-ENV-NAME> option to overwrite this.

After creating the environment, you need to activate it (use your custom environment name if you have defined it):

conda activate quantuminspire

Using the CLI to login

In order to login to the platform, run the following command:

qi login

This will open a browser window that will allow you to login or create an account. By default this command will login to the production environment, but the command accepts an argument for a different host URL if needed (e.g. for beta testing purposes).

Upload files

The CLI can be used to upload files to Quantum Inspire. These files can both be hybrid and quantum circuits.

IMPORTANT: Submitting a (python) .py file for hybrid algorithms requires a specific format. Not all .py files are valid for submission.

qi files upload <filename> <backend_id>

The CLI will assume that files with the extension .cq are quantum circuits, while files with a .py extension are python files.

The list of backends (and their properties) can be retrieved using the following command, from which id field can be read.

qi backends list

Get results

The previous command outputs a job ID for the job that was just started. Use this job ID when querying for results.

qi results get <job_id>

List projects

List all projects belonging to the current user. You can optionally filter projects by name, either using substring matching (default) or exact matching.

Usage

qi projects list

Options

  • --print, -p Print the full project list as a table.

  • --name <name> Filter projects by name or description using substring matching.

  • --exact When used with --name, only return projects whose name exactly matches the given value.

Examples

List all projects:

qi projects list

List projects whose name or description contains "quantum":

qi projects list --name quantum

List projects whose name is exactly "my-project":

qi projects list --name my-project --exact

Print the full project list:

qi projects list --print

Delete projects

Delete one or more projects by ID, by name, or delete all projects after confirmation.

⚠️ Deleting projects is irreversible. You will always be prompted for confirmation before deletion.

Usage

qi projects delete [PROJECT_IDS...]

Options

  • PROJECT_IDS One or more project IDs to delete.

  • --name <name> Delete projects matching this name or description pattern.

  • --exact When used with --name, only delete projects whose name exactly matches the given value.

Behavior and precedence

  • If project IDs are provided, --name and --exact are ignored.

  • If no IDs are provided:

    • --name filters projects by substring match
    • --name + --exact performs an exact name match
  • If no IDs and no name are provided, all projects will be deleted after confirmation.

Examples

Delete projects by ID:

qi projects delete 1 2 3

Delete projects whose name or description contains "quantum":

qi projects delete --name quantum

Delete the project with the exact name "my-project":

qi projects delete --name my-project --exact

Delete all projects:

qi projects delete

You will be asked to confirm before deletion.

Note: Mostly useful for quantum circuits.

Get final results

A job also always contains a final result. This object can be queried with the following command.

qi final_results get <job_id>

Note: This object will always be generated. In the case of a quantum circuit, the result and final result will be the same. For hybrid algorithms, the final result is a free form datastructure that could for example be used for the aggregation of data. This is generated in the finalize step.

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

quantuminspire-3.5.2.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

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

quantuminspire-3.5.2-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file quantuminspire-3.5.2.tar.gz.

File metadata

  • Download URL: quantuminspire-3.5.2.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for quantuminspire-3.5.2.tar.gz
Algorithm Hash digest
SHA256 2b24c5e43f8cd1928b83c950cb9e5c0b92015d18cd5b1308b5ebb261814ca792
MD5 e4d2a1d0aadaca6c07ebab06056e8a20
BLAKE2b-256 426e392def330e7d447171fa70fa87a23516a8d3fc154c0d5315d6228bac56ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for quantuminspire-3.5.2.tar.gz:

Publisher: release.yaml on QuTech-Delft/quantuminspire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quantuminspire-3.5.2-py3-none-any.whl.

File metadata

  • Download URL: quantuminspire-3.5.2-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for quantuminspire-3.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61cbda338721e25abc0b720e01d19b97a1d767e87e0d13e060f4968cef897ab9
MD5 11ea8e384c8f4fa534987b429cb83425
BLAKE2b-256 e6037d8ba994da0113b6dd09d58390015b8755caaf0715a47e79fcbb485c6990

See more details on using hashes here.

Provenance

The following attestation bundles were made for quantuminspire-3.5.2-py3-none-any.whl:

Publisher: release.yaml on QuTech-Delft/quantuminspire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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