The HAL Contract

"Don't be sorry HAL, I am sure you can do that"

— Dave

A vendor-neutral interface specification that decouples quantum algorithms from hardware. Write once, run on any backend.

🦀
Rust Implementation

Full HAL Contract compliance, 33k+ lines of code

⚛️
4 Backends

IQM, IBM Quantum, QDMI, and Simulator

🖥️
HPC Integration

First-class SLURM and PBS scheduler support

The Fragmentation Problem

Quantum computing today is fragmented. Each vendor has their own SDK, API, and execution model.

Without HAL Contract

  • Rewrite code for each quantum provider
  • Learn different SDKs (Qiskit, Cirq, IQM Client, ...)
  • Vendor lock-in limits hardware choices
  • HPC integration is an afterthought
  • Testing requires actual hardware access

With HAL Contract

  • Single interface for all backends
  • Swap providers with one line of code
  • True hardware portability
  • First-class HPC scheduler support
  • Test locally, deploy anywhere

The Contract

Five core interfaces that every quantum backend must implement.

B

Backend

Core trait for submitting circuits, checking status, and retrieving results. The heart of the abstraction.

C

Capabilities

Describes what a backend can do: qubit count, gate set, topology, max shots, and special features.

J

Job

Represents a submitted quantum circuit with its ID, status, metadata, and lifecycle management.

R

Result

Execution output including measurement counts, probabilities, timing, and backend-specific metadata.

T

Topology

Qubit connectivity graph: linear, star, grid, or custom. Essential for routing and compilation.

G

GateSet

Native gates supported by the hardware. Defines what compilation targets are available.

See It In Action

The same code runs on any HAL-compliant backend.

example.rs
use hiq_hal::{Backend, Capabilities};
use hiq_ir::Circuit;

#[tokio::main]
async fn main() -> Result<()> {
    // Create a Bell state circuit
    let circuit = Circuit::bell();

    // Run on simulator locally
    let sim = SimulatorBackend::new();
    let result = run(&sim, &circuit).await?;

    // Same code, different backend - IQM hardware
    let iqm = IqmBackend::from_env()?;
    let result = run(&iqm, &circuit).await?;

    // Or IBM Quantum
    let ibm = IbmBackend::from_env()?;
    let result = run(&ibm, &circuit).await?;

    Ok(())
}

// Generic function works with ANY backend
async fn run(backend: &impl Backend, circuit: &Circuit) -> Result<Counts> {
    let caps = backend.capabilities().await?;
    println!("Running on {} ({} qubits)", caps.name, caps.num_qubits);

    let job_id = backend.submit(circuit, 1000).await?;
    let result = backend.wait(&job_id).await?;

    Ok(result.counts)
}
from hiq import Circuit, compile_circuit
from hiq.backends import Simulator, IqmBackend, IbmBackend

# Create a Bell state circuit
circuit = Circuit(2)
circuit.h(0)
circuit.cx(0, 1)
circuit.measure_all()

# Run on simulator
sim = Simulator()
result = run(sim, circuit)

# Same code, IQM hardware
iqm = IqmBackend.from_env()
result = run(iqm, circuit)

# Or IBM Quantum
ibm = IbmBackend.from_env()
result = run(ibm, circuit)

def run(backend, circuit):
    """Generic function works with ANY backend"""
    caps = backend.capabilities()
    print(f"Running on {caps.name} ({caps.num_qubits} qubits)")

    job_id = backend.submit(circuit, shots=1000)
    result = backend.wait(job_id)

    return result.counts
/// The core Backend trait - implement this for any quantum hardware
#[async_trait]
pub trait Backend: Send + Sync {
    /// Get the name of this backend
    fn name(&self) -> &str;

    /// Get the capabilities of this backend
    async fn capabilities(&self) -> HalResult<Capabilities>;

    /// Check if the backend is available
    async fn is_available(&self) -> HalResult<bool>;

    /// Submit a circuit for execution
    async fn submit(&self, circuit: &Circuit, shots: u32) -> HalResult<JobId>;

    /// Get the status of a job
    async fn status(&self, job_id: &JobId) -> HalResult<JobStatus>;

    /// Get the result of a completed job
    async fn result(&self, job_id: &JobId) -> HalResult<ExecutionResult>;

    /// Cancel a running job
    async fn cancel(&self, job_id: &JobId) -> HalResult<()>;

    /// Wait for a job to complete (provided default implementation)
    async fn wait(&self, job_id: &JobId) -> HalResult<ExecutionResult>;
}

Reference Implementation

HIQ is the first complete implementation of the HAL Contract.

HIQ

Rust-Native Quantum Compilation Stack

A high-performance quantum computing framework designed for HPC environments. Fast compilation, first-class scheduler integration, and unified backend access.

IQM Support IBM Quantum QDMI (MQSS) Simulator SLURM/PBS Python Bindings QASM3 Quantum Types Auto-Uncompute
View on GitHub
4
Backends
v1.0
Released
100%
HAL Compliant

Built for Rustaceans

HIQ is written in pure Rust, leveraging the language's strengths for safe, fast quantum computing.

#[async_trait]

Async-first design with Tokio. All backend operations are non-blocking, perfect for concurrent job management.

Zero-Copy Parsing

QASM3 parser uses zero-copy techniques for blazing fast circuit loading. Parse megabyte files in milliseconds.

Type-Safe Circuits

QubitId, GateOp, and Circuit types catch errors at compile time. No runtime surprises.

Send + Sync

All core types are thread-safe. Run compilations in parallel, share backends across threads.

Serde Everywhere

Every type implements Serialize/Deserialize. Save circuits, cache results, build APIs trivially.

PyO3 Bindings

First-class Python support via PyO3. Use from Jupyter notebooks or integrate with existing Qiskit code.

4
unsafe (FFI only)
14
crates
33k+
lines of Rust
100%
stable Rust
hiq-ir hiq-qasm3 hiq-compile hiq-hal hiq-sched hiq-cli hiq-dashboard hiq-python hiq-types hiq-auto hiq-adapter-sim hiq-adapter-iqm hiq-adapter-ibm hiq-adapter-qdmi

See HIQ in Action

Real outputs from the HIQ Dashboard showing circuit visualization, VQE optimization, and backend monitoring.

Circuit Visualization

q[0] q[1] H M M → c[0] → c[1]
2
Qubits
3
Gates
1
Depth

VQE H₂ Ground State

Iteration Energy (Ha) -1.07 -1.19 -1.31
VQE Energy Exact: -1.3114 Ha

Measurement Results

|00⟩ |01⟩ |10⟩ |11⟩ 498 1 2 499
1000
Shots
99.7%
Entangled

Backend Status

Simulator

20 qubits • Full connectivity
H CX RZ RX

IQM Garnet

20 qubits • Star topology
PRX CZ

IBM Brisbane

127 qubits • Heavy-hex
SX RZ CX

QDMI (MQSS)

Vendor-neutral interface
Dynamic

Read the Whitepaper

A 14-page technical whitepaper covering the fragmentation problem, the HAL Contract specification, implementation guidelines, and the HIQ case study.

Download PDF

Implement the HAL Contract

Join the movement towards quantum computing interoperability. Here's how you can get involved.

Hardware Vendors

Make your quantum hardware accessible to the entire ecosystem without locking users into proprietary SDKs.

  • Implement the Backend trait for your API
  • Expose capabilities through standard interfaces
  • Get listed as a HAL-compliant provider
View Specification

SDK Developers

Build your quantum framework on top of HAL and give users freedom to choose their hardware.

  • Target the HAL Contract instead of vendor APIs
  • Support multiple backends out of the box
  • Focus on algorithms, not integration
Explore HIQ

Researchers

Run your experiments on any hardware without rewriting code. Compare backends fairly.

  • Write portable quantum algorithms
  • Benchmark across multiple backends
  • Future-proof your research code
Read Whitepaper

Let's Build This Together

The HAL Contract is an open specification. We welcome feedback, contributions, and collaboration from the quantum computing community.

Daniel Hinderink

About

Hi, my name is Daniel and I am from Munich. I started my digital life with the Commodore64 and consequently ended up at the Leibniz-Rechenzentrum (LRZ, University data center/computing center) with mainframe/supercomputing facilities doing research in Econometrics. Eventually I joined the TYPO3 Open Source project and helped to make it the predominant Open Source Enterprise CMS in central Europe. As it's representative I served on the Standard Comittee Board of OASIS and later on worked at Magnolia CMS, a European, Java-based (Open Source) CMS. Today I am Director of Strategy & Growth at TechDivision, the leader in b2b commerce solutions for industry players (using Open Source a lot).

I came up with the The HAL Contract hoping to make Quantum Computing at least a little bit more accessible.

Would love to hear your feedback! Yours truly, D