HQStage CLI commands API
HQStage cli provides a set of commands to download and isntall HQStage modules and other python packages.
Checkout
Checkout the license file from HQS licensing server.
This checksout the license file from HQS licensing server and saves it into the config directory. The license file will be used by HQStage modules to validate entitlements. The file is valid for 30 days and should be checked-out again before expiration.
hqstage checkout [OPTIONS]
Args
No positional arguments.
Options
The following options are only required in very specific setups / situations. For standard use you will not need those options! Only set these options if you know what you are doing!
--fingerprint TEXT
: Checkout license file for a specific fingerprint. Can be used multiple times and combined with--fingerprints-file
.--fingerprints-file FILENAME
: Read fingerprints from a file. Each line will be interpreted as a fingerprint. Can be used multiple times and combined with--fingerprint
.--license-id TEXT
: Specify the license ID.--out-dir PATH
: Output directory for the license file. Default is the config directory:$HOME/.config/HQStage
.- –help: Show the help message and exit.
Example
hqstage checkout
Download examples
Download HQStage examples for your modules.
Provide module names with the command line argument -m or –modules. The command tries to find matching examples for incomplete names. If no module name is provided, all available examples will be downloaded.
hqstage download-exampels [OPTIONS]
Args
No positional arguments.
Options
- –download-dir (path) The path to the directory to download the examples to.
- -m, –modules (str) Download examples for a specific module. Can be used multiple times.
- –list-available List available examples instead of downloading.
- –help Show this message and exit.
Example
hqstage download-examples
hqstage download-examples -m noise-app -m hqs-qorrelator-app
mkdir exampels && hqstage download-examples --download-dir ./exampels
Init
Initialize HQStage user and license.
The hqstage init
command performs the following steps to set everything up you need to start using HQStage:
- Create a config file with your HQS Cloud token used to authenticate with our software distribution and licensing services
- add your license ID to the config file
- activate your machine for your license
- checkout a license file for offline usage. The license file is valid for 30 days and will automatically be renewed when executing HQStage commands.
All information can be provided via options (see below) or can be entered interactively during initialization process. It is not necessary to provide all parameters as options or set all parameters interactivly. Any combination works, too.
hqstage init [OPTIONS]
Args
No positional arguments.
Options
- –token-id (str): Provide token id.
- –token (str): Provide token secret.
- –cloud-environment (str): For developers only.
- –license-id (str): Provide your license id.
- –advanced-mode: Activate advanced mode (devs only).
- –help: Show this message and exit.
Example
hqstage init
hqstage init --token-id TokenIDFromCloud --token SecretToken
Install
Install python packages and HQStage Modules into (the currently active) Python environment. Under the hood, HQStage uses uv as a drop-in replacement for standard pip. Look at uv documentation for detailed usage information. Compared to standard pip uv provides better dependency resolution while beeing faster.
hqstage install [OPTIONS] [NAMES]
Args
names (list[str])
: Names of the modules and packages to install.
Options
- -y, –yes: Confirm installation without prompting.
- -a, –all: Install all available modules.
- –help: Show the help message and exit.
Example
hqstage install hqs_noise_app_py --yes
hqstage install "HQS Qorrelator App" hqs-noise-app
hqstage install "hqs_noise_app_py matplotlib qutip
hqstage install "HQS Quantum Solver" mkl -y
Modules
Show your available and installed HQStage Modules and packages.
hqstage modules [OPTIONS]
The output will be of the form
Output
Output
_________________________ _________________________ _________________________
Module Name Module Key Packages
_________________________ _________________________ _________________________
HQStage Base HQSTAGE_BASE hqstage
HQS Qorrelator App HQS_QORRELATOR_APP hqs-qorrelator-app-py
HQS Noise App HQS_NOISE_APP hqs-noise-app-py
_________________________ _________________________ _________________________
Args
No positional arguments.
Options
- –help: Show the help message and exit.
Example
hqstage modules