uniqc.backend_adapter.task.adapters.quark_adapter module

QuarkStudio / Quafu-SQC backend adapter.

QuarkStudio replaces the deprecated pyquafu client for the BAQIS Quafu-SQC platform. Its public SDK accepts OpenQASM 2.0 text inside a task dictionary:

{“chip”: “Baihua”, “name”: “…”, “circuit”: qasm2, “shots”: 1024, …}

This adapter keeps that SDK boundary intact and exposes the same QuantumAdapter interface used by the rest of UnifiedQuantum.

class uniqc.backend_adapter.task.adapters.quark_adapter.QuarkAdapter(token=None, task_client=None)[source]

Bases: QuantumAdapter

Adapter for QuarkStudio’s Quafu-SQC Task API.

Parameters:
  • token (str | None)

  • task_client (Any | None)

dry_run(originir, *, shots=1024, **kwargs)[source]

Validate OriginIR -> OpenQASM 2.0 locally without network calls.

Parameters:
Return type:

DryRunResult

get_backend_info(chip='Baihua')[source]

Fetch detailed backend information when quarkcircuit is installed.

Parameters:

chip (str)

Return type:

dict[str, Any]

is_available()[source]

Return True when the SDK is importable and a token is configured.

Return type:

bool

list_backends()[source]

Return backend status entries from Task.status().

Return type:

list[dict[str, Any]]

name: str = 'quark'
query(taskid)[source]

Query task status and return normalised status/result fields.

Parameters:

taskid (str)

Return type:

dict[str, Any]

query_batch(taskids)[source]

Query multiple task IDs and merge their statuses.

Parameters:

taskids (list[str])

Return type:

dict[str, Any]

submit(circuit, *, shots=1024, **kwargs)[source]

Submit a single OpenQASM 2.0 circuit to QuarkStudio.

Parameters:
Return type:

str

submit_batch(circuits, *, shots=1024, **kwargs)[source]

Submit circuits one-by-one because the public SDK exposes single-task run().

Parameters:
Return type:

list[str]

translate_circuit(originir)[source]

Translate OriginIR text to OpenQASM 2.0.

Parameters:

originir (str)

Return type:

str