Configuration and files
CUNQA keeps a small amount of state on disk to track deployed vQPUs and their communication setup. This page describes where that state lives and what it contains.
The .cunqa directory
All runtime state is stored under $STORE/.cunqa/. The location is derived at build time from the
STORE environment variable (see Installation):
Path |
Contents |
|---|---|
|
Root directory for CUNQA runtime state. |
|
Registry of currently deployed vQPUs, one file per vQPU grouped by
family. Read by |
|
Communication endpoints used between vQPUs, one file per endpoint grouped by SLURM job. |
In addition, each qraise deployment writes a SLURM log file named qraise_<jobid> in the
directory from which the command was launched. These can be removed together with the job using
qdrop ... --rm.
The vQPU registry
Each vQPU registers itself in its own file, $STORE/.cunqa/qpus/<family>/<vqpu_id>.json,
where the identifier is of the form <slurm_job_id>_<index>. Every file is written only once, and
atomically, by the vQPU it describes, so no file locks are needed. This keeps the registry
consistent on shared filesystems such as NFS even when vQPUs on several nodes start
at the same time. The files are removed when the SLURM job ends, and so is the directory of the
family once it is empty.
The content of each file describes the vQPU. The most relevant fields, as consumed by the tooling, are:
Field |
Meaning |
|---|---|
|
|
|
SLURM job that deployed the vQPU. |
|
Backend description: |
|
Compute node the vQPU runs on. |
|
Access mode: |
|
Address the Python client connects to. |
|
Device info; |
Illustrative content of qpus/507805/507805_1071427.json (fields trimmed for brevity):
{
"backend": {
"basis_gates": [],
"coupling_map": [],
"description": "Backend with quantum communications.",
"name": "QCBackend",
"num_qubits": [
2,
1
],
"simulator": "Aer",
"version": "0.0.1"
},
"family": "507805",
"name": "507805_1071427",
"net": {
"device": {
"device_name": "CPU",
"target_devices": []
},
"endpoint": "tcp://10.5.7.3:45653",
"mode": "co_located",
"nodename": "c7-3"
},
"slurm_job_id": "507805"
}
Recovering from stale state
If a deployment ends abnormally, the registry may keep files for vQPUs that are no
longer running. Running qdrop --all cancels any remaining jobs and removes the
$STORE/.cunqa/qpus and $STORE/.cunqa/communications directories. After that, qinfo will report that there are no deployed vQPUs until you qraise
again.