Skip to content

CLI reference

The quoptuna command is a Typer application with two subcommands. Invoking quoptuna with no subcommand is equivalent to quoptuna run.

Launch the QuOptuna application. Serves the Web UI, the JSON API, and interactive docs on a single port. API docs are available at /api/docs.

OptionDefaultDescription
--streamlitoffLaunch the legacy Streamlit dashboard instead of the full stack
--host <h>access hostAccess host used in generated URLs and links
--port <n>8000Port for the QuOptuna server (auto-increments if busy)
--no-browseroffDo not auto-open the browser

Run a single optimization headless through the exact UI pipeline and print a JSON summary to stdout.

OptionDefaultDescription
--uci-id <n>UCI dataset id (e.g. 53 for Iris). Mutually exclusive with --csv
--csv <path>Path to a local CSV dataset. Provide exactly one of --uci-id / --csv
--target <col>dataset target / last columnTarget column
--features a,b,call non-targetComma-separated feature columns
--trials <n>3Number of Optuna trials (min 1)
--models <list>SVCComma-separated model types, e.g. SVC,IQPKernelClassifier
--label-neg <v>Binary targets: label mapped to -1
--label-pos <v>Binary targets: label mapped to +1
--favorable-class <v>Multiclass: favorable outcome for fairness auditing (only with fairness)
--sensitive-feature <col>Protected-attribute column for fairness auditing
--fairness-mode <m>offoff | constrained | multi_objective
--fairness-metric <m>equal_opportunity_differenceDisparity metric
--fairness-threshold <f>Constrained-mode disparity threshold
--sampler <s>randomtpe | random | grid
--seed <n>0Sampler seed for reproducible runs
--pruner <p>nonenone | asha | hyperband
--max-steps <n>20Training-step cap for iterative quantum models
--convergence-interval <n>5Flat-loss convergence window
--max-vmap <n>Circuit vectorization width
--categorical-encoding <e>ordinalordinal | onehot
--study-name <s>Optuna study name
--db-name <s>cli_runsOptuna storage database name
--subset-size <n>30Analysis subset size
--no-analyzeoffSkip the post-run analysis summary
Terminal window
quoptuna optimize --uci-id 53 --trials 2 --models SVC,IQPKernelClassifier
Terminal window
quoptuna optimize --csv data.csv --target label --trials 3