uniqc.task.adapters.quafu_adapter module#
Quafu backend adapter.
Translates OriginIR circuits to Quafu QuantumCircuit objects and submits
via the quafu package (User / Task API). No raw REST calls.
- Installation:
pip install unified-quantum[quafu]
- class uniqc.task.adapters.quafu_adapter.QuafuAdapter[source]#
Bases:
QuantumAdapterAdapter for the BAQIS Quafu (ScQ) quantum cloud platform.
- Raises:
MissingDependencyError – If quafu package is not installed.
- VALID_CHIP_IDS = frozenset({'Dongling', 'ScQ-P10', 'ScQ-P10C', 'ScQ-P136', 'ScQ-P18'})#
- property api_token: str#
Return the API token used for Quafu authentication.
- Returns:
The Quafu API token.
- Return type:
- is_available()[source]#
Check if the Quafu adapter is available (quafu package installed).
- Returns:
True if the quafu package was successfully imported.
- Return type:
- list_backends()[source]#
Return raw Quafu backend metadata.
For hardware backends, fetches chip_info() to populate fidelity and coherence data.
- Returns:
name,num_qubits,status,task_in_queue,qv,valid_gates, plus fidelity/coherence fields (avg_1q_fidelity, avg_2q_fidelity, avg_readout_fidelity, coherence_t1, coherence_t2).- Return type:
List of dicts with keys
- query(taskid)[source]#
Query a single Quafu task’s status via SDK
Task.retrieve().Uses the internally maintained history dict so the caller does not need to pass any additional context.