CLI reference¶
The package installs the quport command. The CLI is intended for quick
experiments, reproducible benchmark generation, and artifact export. For complex
custom workflows, use the Python API documented in API reference.
General conventions¶
Command names use hyphens, for example
gen-configandcompile-dist.Strategy values use the Python strategy names, for example
tpccap_sa.Config paths may be JSON or YAML; YAML requires the
yamlextra.Output directories are created when possible by artifact-writing commands.
quport gen-config¶
quport gen-config --out quport_config.yaml
Writes an example JSON/YAML config and prints the resolved MultiQPUConfig.
Use this as the safest starting point for editing architecture fields because it
contains all current config keys.
quport map¶
quport map --n-logical 6 --depth 5 --seed 1 --strategy balanced --config quport_config.yaml --out mapped.qasm
Generates a random circuit, maps/transpiles it on the global architecture, prints SWAP/remote/depth/cost/timing metrics, and optionally writes OpenQASM 3.
Options:
--n-logical: logical qubit count;--depth: random circuit depth;--seed: random circuit and transpiler seed;--strategy:balanced,cluster,tpccap, ortpccap_sa;--config: optional JSON/YAML config path;--out: optional mapped OpenQASM 3 output.
Use this command when you want to see the globally routed circuit that Qiskit produces for one architecture and one partitioning strategy.
quport bench¶
quport bench --n-logical 8 --depth 20 --trials 10 --strategies baseline,balanced,tpccap --out results.csv
Runs random-circuit benchmarks and writes one CSV row per trial/strategy. The CSV is suitable for pandas, spreadsheets, and plotting tools.
Important columns include:
trialandseedfor reproducibility;methodandstrategyfor grouping;swaps,remote_2q,depth, andsizefor mapped circuit metrics;cost_total,cost_local, andcost_remotefor latency-model costs;mapping_time_sandtranspile_time_sfor runtime comparisons.
quport sweep¶
quport sweep --n-logical 8 --depth 20 --trials 5 --out sweep.csv --plot sweep.png
Sweeps built-in topology and port settings. --plot requires quport[viz]. The
CSV contains aggregate means rather than one row per random circuit. Use bench
when you need raw per-trial rows.
quport schedule¶
quport schedule --n-logical 6 --depth 5 --seed 1 --strategy tpccap
Maps a random circuit and prints a layered makespan estimate. This is a fast way to compare whether a mapped circuit’s remote operations are likely to serialize under communication-port limits.
quport split¶
quport split --n-logical 6 --depth 5 --seed 1 --strategy tpccap --out-dir distributed_out
Maps a random circuit globally, splits the mapped circuit into per-QPU local QASM
files, and writes remote_ops.json.
This command is useful for inspecting how a globally routed circuit is decomposed,
but it is not the preferred distributed-compilation workflow. Prefer compile-dist
when you want to avoid cross-QPU global routing and keep remote operations explicit
from the compilation flow.
quport compile-dist¶
quport compile-dist --n-logical 6 --depth 5 --seed 1 --strategy tpccap_sa --temporal-decay 0.98 --out-dir compile_out
Runs distributed compilation without cross-QPU SWAP routing. Output artifacts:
qpu_<id>_routed.qasm: locally routed per-QPU programs;remote_ops.json: ordered remote operation manifest;schedule.json: topology-aware schedule summary;schedule_trace.json: detailed per-layer/per-round communication plan.
Recommended checks after running:
python -m json.tool compile_out/remote_ops.json >/dev/null
python -m json.tool compile_out/schedule.json >/dev/null
python -m json.tool compile_out/schedule_trace.json >/dev/null
Choosing between CLI commands¶
If you need… |
Use… |
|---|---|
one globally routed Qiskit circuit |
|
repeated global-routing comparisons |
|
topology/port aggregate summaries |
|
quick makespan estimate |
|
per-QPU split of a globally mapped circuit |
|
explicit distributed compile artifacts |
|