Configuration¶
Configuration is split into two public dataclasses:
MultiQPUConfigdescribes topology, capacity, scheduler resource limits, and Qiskit transpiler knobs.LatencyModeldescribes scalar operation/network costs used by cost and schedule estimators.
Both are intentionally lightweight and serializable so experiments can store config files beside benchmark outputs.
MultiQPUConfig¶
MultiQPUConfig describes the physical architecture and Qiskit transpiler options.
Field |
Default |
Meaning |
Validation / interaction |
|---|---|---|---|
|
|
number of QPUs |
architecture builders require positive values |
|
|
local compute qubits per QPU |
non-negative; contributes to capacity and physical qubit count |
|
|
communication qubits per QPU |
non-negative; controls inter-QPU physical links and schedule port limits |
|
|
one of |
invalid topology names are rejected by architecture construction |
|
|
one of |
invalid topology names are rejected by graph/architecture construction |
|
|
degree target for |
clamped/validated by QPU graph helpers depending on context |
|
|
max simultaneous remote ops per inter-QPU link per topology-scheduler round |
topology scheduler uses this as a per-round resource limit |
|
|
max distinct QPU pairs per round on a switched fabric |
use smaller values to model limited switch fanout; read only for |
|
|
additional delay per communication round on a switched fabric |
added by topology-aware scheduling for |
|
|
enables asynchronous classical-latency hiding in topology scheduling |
must be boolean |
|
|
fraction of classical RTT that can be hidden |
finite numeric value in |
|
|
optional rows for |
inferred if omitted; explicit rows/cols must cover local qubits |
|
|
optional columns for |
inferred if omitted; explicit rows/cols must cover local qubits |
|
|
Qiskit basis gates used by translation/transpilation |
non-empty sequence of non-empty strings |
|
|
Qiskit optimization level |
integer |
|
|
Qiskit layout method for global transpilation |
non-empty string |
|
|
Qiskit routing method |
non-empty string |
Loading a config file¶
load_config reads JSON or YAML, picking the parser from the suffix without
regard to case, and drops a leading byte-order mark so a file saved by an editor
that writes one still loads. dump_config creates the directory its path names.
The CLI checks a --config file as it loads it: a path it cannot read, text
neither parser accepts, an unknown field, and a document that parses but cannot
describe an architecture are all reported as errors naming the file, rather than
surfacing later as a traceback from wherever the value was first used.
Derived quantities¶
total_physical_qubits()returnsn_qpus * (compute_qubits_per_qpu + comm_qubits_per_qpu).capacity_per_qpu()returnscompute_qubits_per_qpu + comm_qubits_per_qpu.The physical block size for one QPU is
capacity_per_qpu().
Topology-specific notes¶
grid2duses row-major local-qubit placement. If both dimensions are omitted, dimensions are inferred. If one dimension is provided, the other is inferred.degree_dusesinter_degreeto create a bounded-degree QPU graph.closandfat_treeare abstractions, not detailed switch-level hardware descriptions.switch_parallel_links,link_capacity,async_classical, andasync_overlapmatter most in topology-aware scheduling.
LatencyModel¶
LatencyModel stores cost coefficients for metrics and schedule estimates.
Field |
Default |
Meaning |
Used by |
|---|---|---|---|
|
|
one-qubit operation cost |
cost and schedule estimators |
|
|
local two-qubit operation cost |
cost and schedule estimators |
|
|
SWAP cost |
cost and coarse schedule estimators |
|
|
entanglement generation/network setup cost |
remote operation cost |
|
|
classical round-trip component |
remote operation cost and async overlap model |
|
|
remote gate protocol overhead |
remote operation cost |
|
|
heralded entanglement success probability per attempt, in |
entanglement-aware schedule only |
estimate_latency(n_1q, n_2q, swaps, remote_2q, depth=None) computes a scalar
latency proxy and validates all counts and coefficients before computing. The
optional depth argument adds a soft depth penalty and is not a replacement for a
schedule estimator.
expected_epr_time(hops) returns hops * epr_gen / epr_success_prob, the expected
time to distribute one EPR pair across hops links: entanglement generation is
heralded, so one usable pair needs 1 / epr_success_prob attempts on average. Only
estimate_entanglement_schedule reads epr_success_prob, and its default of 1.0
models a deterministic link, so every other estimator is unchanged.
Config files¶
Use the CLI to create a config file:
quport gen-config
JSON and YAML are supported by load_config/dump_config, selected by the file
extension; the default output is JSON because YAML requires the yaml extra. Config files must contain a mapping/object and unknown fields are
rejected so misspelled settings do not silently take effect.
Example JSON:
{
"n_qpus": 4,
"compute_qubits_per_qpu": 8,
"comm_qubits_per_qpu": 2,
"intra_topology": "ring",
"inter_topology": "degree_d",
"inter_degree": 2,
"basis_gates": ["rz", "sx", "x", "cx"],
"optimization_level": 3,
"layout_method": "sabre",
"routing_method": "sabre"
}
Experiment design guidance¶
Change one family of fields at a time when running sweeps.
Keep
basis_gates,layout_method,routing_method, andoptimization_levelstable when comparing partitioning strategies.Use more than one random trial for benchmark claims; a single random circuit can overstate or understate topology effects.
Store the config file, seed range, strategies, and QuPort version/commit beside benchmark outputs for reproducibility.