CLI Reference#
For help with installation and setup, see the Getting Started section, which also contains a brief example of how to use the CLI.
Commands#
version#
Prints the version.
hybridsolver version
api-key#
Prints the API key set through the environment variable QUANTAGONIA_API_KEY
.
hybridsolver api-key
solve#
Solves the optimization problem given by PROBLEM_FILE
. The file must be a .mps
or a .qubo
, either plain or as .gz
. This command continuously prints the solver log.
hybridsolver solve [OPTIONS] PROBLEM_FILE
Options:
--params-file STRING Path to parameter file.
--relative-gap FLOAT Stopping criterion: relative gap.
--absolute-gap FLOAT Stopping criterion: absolute gap.
--objective-limit FLOAT Stopping criterion: objective value.
--timelimit INTEGER Stopping criterion: runtime.
--as-qubo BOOL Try to solve MIP as MIP and QUBO in parallel (MIP only).
--as-qubo-only BOOL Try to solve MIP only as QUBO (MIP only).
--presolve BOOL Enable (default) or disable presolve.
--heuristics-only BOOL Only apply primal heuristics and then terminate (QUBO only)
--quantum-heuristic STRING Add given quantum heuristic to the heuristics pool.
--context STRING Billing context to run the job in.
--tag TEXT Tag to identify the job later.
--quiet Disable interactive output and only show final logs.
submit#
Submits the optimization problem given by PROBLEM_FILE
in a non-blocking way. The file must be a .mps
or a .qubo
, either plain or as .gz
. Use status
, logs
, monitor
, or solution
commands to get information and results.
hybridsolver submit [OPTIONS] PROBLEM_FILE
Options:
--params-file STRING Path to parameter file.
--relative-gap FLOAT Stopping criterion: relative gap.
--absolute-gap FLOAT Stopping criterion: absolute gap.
--objective-limit FLOAT Stopping criterion: objective value.
--timelimit INTEGER Stopping criterion: runtime.
--as-qubo BOOL Try to solve MIP as MIP and QUBO in parallel (MIP only).
--as-qubo-only BOOL Try to solve MIP only as QUBO (MIP only).
--presolve BOOL Enable (default) or disable presolve.
--heuristics-only BOOL Only apply primal heuristics and then terminate (QUBO only)
--quantum-heuristic STRING Add given quantum heuristic to the heuristics pool.
--context STRING Billing context to run the job in.
--tag TEXT Tag to identify the job later.
--quiet Disable interactive output and only show final logs.
status#
Retrieves the status of the job given by JOB_ID
. The returned status is one of CREATED
, RUNNING
, FINISHED
, SUCCESS
, TIMEOUT
, TERMINATED
, or ERROR
. For batched jobs, the optional parameter item
selects the item of the batch.
hybridsolver status JOB_ID [item]
logs#
Prints the current logs of the job given by JOB_ID
. For batched jobs, the optional parameter item
selects the item of the batch. Note that this only prints a non-blocking snapshot of the logs and does not continuously update the logs until the job is finished. For the latter behavior, please see the monitor
command.
hybridsolver logs JOB_ID [item]
monitor#
Resumes monitoring the progress (i.e., logs) of the job given by JOB_ID
. In contrast to the logs
command, this command works in a blocking way and continuously updates the log until the job is finished. For batched jobs, the optional parameter item
selects the item of the batch to monitor. This command is usually used after submitting a job using the submit
command.
hybridsolver monitor JOB_ID [item]
solution#
Retrieves the solution vector of the job given by JOB_ID
if its computation completed with success. For batched jobs, the optional parameter item
selects the item of the batch.
hybridsolver solution JOB_ID [item]
time-billed#
Prints the time billed for the job given by JOB_ID
in minutes.
hybridsolver time_billed JOB_ID
cancel#
Cancels the job given by JOB_ID
.
hybridsolver cancel JOB_ID
list#
Lists the n
latest submitted jobs for the API key given in QUANTAGONIA_API_KEY
.
hybridsolver list [OPTIONS]
Options:
-n, --max-jobs INTEGER Maximum number of jobs to display.