iqscli
iqscli is an unofficial CLI for IBM Quantum Systems.
This project has NO connection with IBM. It is my personal project. As of 2024-01-03, I am not employed by IBM and I have no connection with IBM other than having an IBM Quantum and IBM Cloud user account. All information in this repository is acquired from the public documents for example from docs.quantum.ibm.com and cloud.ibm.com/docs.
IBM Quantum Systems
Channels and Plans
There are two channels and four plans (two on each channel) to use IBM Quantum Systems.
The channels are:
- IBM Quantum (
ibm_quantumin qiskit) - IBM Cloud (
ibm_cloudin qiskit)
The credentials (API tokens) on these systems are not the same. Tokens are created separately.
IBM Quantum has:
-
Open Plan: provides a 10 minute monthly access to 127-qubit systems and unlimited access to Simulators. This plan is free.
-
Premium Plan: provides access to both 127-qubit and 27-qubit systems as well as exploratory systems and Simulators and support. This is a paid plan and the price varies.
IBM Cloud has:
-
Lite Plan: provides unlimited access to Simulators only. This plan is free.
-
Standard Plan: provides Pay-As-You-Go access to 127-qubit and 27-qubit systems and unlimited access to Simulators. This is a paid plan and the price at the moment (2024-01-03) is 1.60 USD/second.
At the moment (2024-01-03), the best (free) way to access the simulators is IBM Quantum Open plan or IBM Cloud Lite plan. The best (free) way to access the real IBM Quantum Systems is IBM Quantum Open plan. Thus, IBM Quantum Open plan seems to be the best starting point.
Instances
The services both on IBM Quantum and IBM Cloud are controlled by instances. An instance is identified by:
- hub/group/project in IBM Quantum
- CRN in IBM Cloud
When a user is signed up on IBM Quantum, it is assigned to the Open plan, and the Open plan's instance, which is ibm-q/open/main (i.e. hub is IBM Quantum called ibm, group is open, project is main). When a user is assigned to a premium plan, a particular hub/group/project is given.
When a Qiskit Runtime instance is created on IBM Cloud, the plan, lite or standard, has to be chosen. When a Qiskit Runtime instance is created, its CRN is displayed on the instance details.
Quantum Systems
At the moment, I see the following Eagle based 127-qubit systems in both of my IBM Quantum and IBM Cloud accounts: ibm_brisbane, ibm_kyoto and ibm_osaka. IBM Cloud account also shows a Falcon based 27-qubit system called ibm_algiers.
These are not all the systems. A comprehensive listing can be found in Compute resources @ IBM Cloud and Compute resources @ IBM Quantum Platform.
Installation
pip install iqscli
Usage
The account information and the credentials including the token is saved to an open file, it is not encrypted. Thus, it is readable by anyone. On Linux, the credentials file is $HOME/.qiskit/qiskit-ibm.json.
save-account, saved-accounts, delete-account
Before using any other command, save-account command should be run to save the credentials (API token) for later use. One account can be marked as default with --set-as-default and it is used when no --account-name or --channel is provided with the commands.
With save-account, if no --account-name is provided, account is saved with a default name, default-ibm-quantum or default-ibm-cloud depending on the channel. Thus, each channel can have one default account. This account is selected if --channel is provided. Thus, all commands (except saved-accounts) have --channel and --account-name options. The account selection is (as described in Qiskit Runtime IBM Client):
- when
--account-nameis given, corresponding account is used - when
--account-nameis not given but--channelis given, the default account for the channel is used (default-ibm-quantum or default-ibm-cloud) - when neither
--account-namenor--channelis given, the default account is used
After the credentials are saved once, the subsequent runs to save-account works successfully only with --overwrite, since the credentials file should be overwritten.
For example, save a default IBM Quantum Open instance account:
$ iqscli save-account --channel ibm_quantum --instance ibm-q/open/main --token <token>
List saved accounts:
$ iqscli saved-accounts
default-ibm-quantum @ ibm_quantum = ibm-q/open/main
backends
List all backends:
$ iqscli backends
ibm-q/open/main @ ibm_quantum
ibm_brisbane ONLINE (13 jobs)
ibm_kyoto ONLINE (13 jobs)
ibm_osaka ONLINE (0 jobs)
ibmq_qasm_simulator ONLINE (0 jobs)
simulator_mps ONLINE (0 jobs)
simulator_statevector ONLINE (0 jobs)
Show details of a particular backend:
$ iqscli backends --show-details --name ibm_brisbane
ibm-q/open/main @ ibm_quantum
ibm_brisbane ONLINE (13 jobs)
processor: Eagle r3
num_qubits: 127
max_shots: 100000
basis_gates: ecr, id, rz, sx, x
instructions: ecr, id, delay, measure, reset, rz, sx, x, if_else, for_loop, switch_case
meas_kernels: hw_qmfk
jobs
Show jobs:
$ iqscli jobs
ibm-q/open/main @ ibm_quantum
cma3f8oiidfp3m905ft0 ibmq_qasm_simulator sampler DONE 20240102171947812375
cma3688iidfp3m904dq0 ibmq_qasm_simulator sampler DONE 20240102170033755981
cma32c6879ps6bbv1mb0 ibmq_qasm_simulator sampler DONE 20240102165216597386
Changes
0.4:
- improvements to existing commands
0.3:
- jobs command added
0.2:
- first pypi release
Metadata
Release files for iqscli 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iqscli-0.4.tar.gz | 10.0 kB | Without provenance | Details for iqscli-0.4.tar.gz |
Release files / iqscli-0.4.tar.gz
| Download URL | iqscli-0.4.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96d04d97518ef67b1dd09d77330056c816f7ea2df46110bd5d43988f8d90d346
|
|
BLAKE2b-256 checksum How to use checksums |
e5f725de6abceffbdcde9526cbb67f62cde92a737f3f6e46e4305a3592072f8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for iqscli 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.