The Journal of Open Source Software
Bloch: a strongly typed, hardware-agnostic, hybrid quantum programming language
Akshay Pal
Abstract
Bloch is a modern quantum programming language and interpreter designed to feel familiar to systems developers while remaining hardware-agnostic.The project combines a statically typed surface language, a semantic analyser that guards against classical/quantum misuse before execution, and an interpreter that emits OpenQASM traces and aggregates multi-shot measurement results.Bloch supports classical control flow, deterministic resource management, and first-class annotations such as @quantum (to delineate quantum code) and @tracked (to stream measurements into probability tables).The language is implemented in C++20, ships with a comprehensive test suite, and is licensed under Apache-2.0to encourage adoption in research and industrial workflows.By pairing static semantics with vendor-neutral QASM emission, Bloch targets the gap between dynamically typed Python-first SDKs (e.g., Qiskit and Cirq (Cirq Developers, 2023; Qiskit contributors, 2023)) and vendor-specific languages while keeping a single-binary, non-Python toolchain.