Where the configuration system is

QCOS is configured entirely through environment variables. There is no central config file and no Settings class — each subsystem reads the variables it needs with os.getenv(...) at import time. Practical consequences:
  • To change a setting, set the env var and restart the server. Values are read once at process start.
  • Precedence is per-variable, in code, not global.
  • The registry of quantum suppliers is enabled/disabled in source (ENABLED_SUPPLIERS in src/adapters/providers/registry.py), while each provider’s availability is gated by env vars (below).
Where to set variables per install channel:
Accuracy note: older environment-variable lists that circulated before this page existed are out of date. QCOS does not read IONQ_API_KEY, QUANTINUUM_API_KEY, RIGETTI_API_KEY, QCOS_SECRET_KEY or PORTAL_API_URL. This page reflects what the code actually reads.

1. Profile & mode (start here)


2. Provider credentials — what makes a QPU “available”

Setting these flips a backend to available: true in the catalog. See Add a Quantum Computer. IBM Quantum (Fallback aliases the IBM adapter also accepts: QCOS_IBM_TOKEN, QCOS_IBM_QUANTUM_TOKEN.) Azure Quantum (QPU routing — distinct from Azure Storage). Providers show available regardless; these are needed to actually execute: AWS Braket Direct-API stub providers (each reads its own var when you implement it): IONQ_API_KEY, QUANTINUUM_USERNAME+QUANTINUUM_PASSWORD, PASQAL_API_KEY, QCS_ACCESS_KEY (Rigetti), IQM_SERVER_URL+IQM_API_TOKEN, AQT_ACCESS_TOKEN, DWAVE_API_TOKEN, OQC_API_KEY, QUANDELA_API_KEY, QUERA_API_KEY, ATOM_COMPUTING_API_KEY. (These back the src/backends/stubs/ adapters; the IQM one is a full driver at src/hal/adapters/iqm.py.)

3. GPU / HPC simulation

Local GPU simulation needs no env var — the engine auto-detects CuPy / cuQuantum by import. See Add a GPU / Simulator.

4. Storage, database, secrets


5. Scheduler (HAL device scheduling)


6. Licensing (QuantumLock)

Per-device entitlement is a license feature string, not an env var: hal_max_devices:<N>, hal:*, hal:<glob>, hal_<vendor> in the active license. Operator-facing switches:

7. Auth, billing, rate limiting

(Stripe checkout — STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_<PLAN>_PRICE_ID, payment-link vars — are only needed if you run the platform’s paid checkout; see src/entrypoints/rest/routes/enterprise/platform_routes.py.)

8. The supplier registry (enable/disable providers)

src/adapters/providers/registry.py holds SUPPLIERS and a source-level list ENABLED_SUPPLIERS. Two independent layers:
  1. Enabled — is the supplier’s router mounted? Edit ENABLED_SUPPLIERS (source, not an env var). Currently enabled: statevector_sim, lumi, azure_quantum, ibm_quantum, braket, aws_gpu, and the native QCOS engines (qcos_neutral_atom, qcos_calibration, qcos_chemistry, qcos_algorithms, qcos_pulse, qcos_quantum_ml, qcos_advanced_physics, qcos_hybrid). Commented out: azure_gpu, google_quantum, baidu_qcompute.
  2. Configured / available — are its requires_config env vars set? A supplier can be enabled but report NOT_CONFIGURED until credentials are present.
requires_config per supplier: ibm_quantumIBM_QUANTUM_TOKEN; braketAWS_ACCESS_KEY_ID+AWS_SECRET_ACCESS_KEY; aws_gpu → those + AZURE_STORAGE_CONNECTION_STRING; lumiAZURE_STORAGE_CONNECTION_STRING; azure_quantum and the native engines → none. To add a brand-new supplier: define it in SUPPLIERS, create its router module and backend class, add its env vars to .env.example, and add its id to ENABLED_SUPPLIERS (documented in the file). For a QPU vendor, prefer a HAL driver — no core edits.

9. Worker (LUMI / HPC) — src/worker/config.py

The GPU/HPC worker is a separate process with its own env (.from_env()). Notable: QCOS_GPU_DEVICE_IDS (0), CUDA_VISIBLE_DEVICES (0), QCOS_MAX_QUBITS (100), QCOS_MAX_JOB_TIMEOUT (3600), QCOS_MAX_MEMORY_GB (64), QCOS_COMPUTE_BACKEND (nvidia_cudaq), QCOS_SLURM_ENABLED (false), SLURM_PARTITION (gpu), LUMI_PROJECT (project_465002463), AWS_JOB_QUEUE_URL, AWS_RESULT_QUEUE_URL.

Minimal configurations

Local dev (simulators only):
On-prem appliance with a real QPU enabled: