Run configuration
When a quantum task is submitted with run (or
execute), any extra keyword arguments are forwarded as run parameters
that configure the simulation:
qjobs = run(circuits, qpus, shots=2000, method="statevector", seed=42)
These are assembled into the run configuration carried to the C++ side, whose canonical definition is
the RunConfig struct (src/sim/run_config.hpp). Parameters fall into two groups: the
common ones recognized by every simulator, and simulator-specific ones, which are passed
through untouched to the selected backend.
Common parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Number of measurement repetitions. |
|
|
|
Simulation method. Valid values are simulator-specific (e.g. |
|
|
(unset) |
Seed for the random number generator. If omitted, a non-deterministic seed is used. |
|
|
|
Disable internal parallelization of the simulation. |
Note
Some entries of RunConfig (qpu_id, num_clbits, is_dynamic, sending_to,
device) are set automatically by CUNQA from the circuit and deployment, and are not meant
to be supplied as run parameters.
Simulator-specific parameters
Any keyword argument that is not one of the common parameters above is collected into
simulator_specifics and handed to the chosen simulator as-is. The accepted keys therefore depend
on the backend selected with --simulator; refer to Simulators and to the upstream
documentation of each simulator for the options it understands.
Quantum-communications constraint
In the quantum communications scheme the participating vQPUs share a single simulation, so
their run configurations must be mutually consistent. CUNQA enforces that all circuits in a QC
execution use the same method, the same shots, the same avoid_parallelization setting,
and the same device type; otherwise an error is raised. If their seed values differ, the seed is
left unset for the combined run.