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.
The recommended way of installing the CLI is to use pipx. After following the pipx installation instructions, run the following command:
pipx install quantuminspireAfterwards, running qi --help should show a help menu.
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 strongly recommended to install and run pipx on a system Python installation instead, downloaded from the official Python website.
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.
In order to login to the platform, run the following command:
qi loginThis 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).
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 listThe 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 all projects belonging to the current user. You can optionally filter projects by name, either using substring matching (default) or exact matching.
qi projects list-
--print, -pPrint the full project list as a table. -
--name <name>Filter projects by name or description using substring matching. -
--exactWhen used with--name, only return projects whose name exactly matches the given value.
List all projects:
qi projects listList projects whose name or description contains "quantum":
qi projects list --name quantumList projects whose name is exactly "my-project":
qi projects list --name my-project --exactPrint the full project list:
qi projects list --printDelete 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.
qi projects delete [PROJECT_IDS...]-
PROJECT_IDSOne or more project IDs to delete. -
--name <name>Delete projects matching this name or description pattern. -
--exactWhen used with--name, only delete projects whose name exactly matches the given value.
-
If project IDs are provided,
--nameand--exactare ignored. -
If no IDs are provided:
--namefilters projects by substring match--name+--exactperforms an exact name match
-
If no IDs and no name are provided, all projects will be deleted after confirmation.
Delete projects by ID:
qi projects delete 1 2 3Delete projects whose name or description contains "quantum":
qi projects delete --name quantumDelete the project with the exact name "my-project":
qi projects delete --name my-project --exactDelete all projects:
qi projects deleteYou will be asked to confirm before deletion.
Note: Mostly useful for quantum circuits.
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.