QubiC Example
Connect a QubiC backend to Coda with coda-qubic.
coda-qubic is an example coda-node integration for QubiC systems. Use it as a reference for connecting your own QPU with a device YAML, executor factory, native IR translator, hardware runner, and node startup flow.
About QubiC
QubiC is an open-source FPGA-based control and measurement system for superconducting quantum processors, developed at Lawrence Berkeley National Laboratory’s Advanced Quantum Testbed. It provides a modular hardware and software stack for implementing qubit control, measurement, and characterization protocols.
For more details, see the QubiC documentation and the QubiC paper on arXiv.
Runtime Flow
At runtime, the integration follows this flow:
- Coda sends a compiled
NativeGateIRjob to the node. coda-qubictranslates the IR into QubiC gate programs.- The runner executes the program on QubiC hardware, a QubiC RPC server, or a simulator.
coda-qubic requires Python 3.12 or newer. coda-node itself supports Python 3.11 or newer.
What coda-qubic provides
coda_qubic.executor_factory:create_executorforcoda-nodeQubiCConfigfor validating device YAMLQubiCJobRunner, which implementsexecutor.run(ir, shots)- Translation from Coda
NativeGateIRto QubiC gate-level programs - RPC, local hardware, pulse simulator, and Qiskit noisy simulator modes
- Optional cancellation support through
cancel_current_job()
Install
Clone the integration and install dependencies:
For QubiC hardware, install the QubiC stack as well:
For the Qiskit simulator path, install the optional Qiskit dependency group:
Configure a QubiC lab
For a real QubiC setup, collect these files from the lab:
qubitcfg.json: qubit calibration and gate definitionschannel_config.json: FPGA channel mappingclassifier.pklor classifier JSON: readout discrimination
Create site/device.yaml next to those files:
All file paths are resolved relative to the YAML file. The num_qubits value must match the device derived from the calibration file.
Simulator configuration
For end-to-end testing without hardware or QubiC vendor dependencies, use Qiskit noisy simulation:
This mode reports a synthetic device and executes jobs with Qiskit AerSimulator.
Validate locally
Validate the YAML:
Run a small circuit through the QubiC executor:
Run through coda-node
If coda-qubic is the only backend package installed and ./site/device.yaml exists, coda-node can discover the executor factory automatically:
To be explicit:
If your node token requires VPN mode, OpenVPN may need elevated permissions to create the tunnel interface:
After first connect, credentials are persisted. Restart without a token:
How the example maps to the Node model
coda-qubic is a reference for the main integration points:
- Device config:
QubiCConfig.from_yaml("site/device.yaml") - Factory:
coda_qubic.executor_factory:create_executor - Executor:
QubiCJobRunner.run(ir, shots) - Translation: Coda native gate IR to QubiC gate programs
- Results: QubiC counts normalized into
ExecutionResult - Cancellation:
cancel_current_job()sets a cancel flag checked by the runner
Use the same shape for your own backend package, replacing QubiC-specific config, translation, and hardware calls with your device stack.