A proprietary, human-readable abstraction over quantum circuit definition. Write once - execute on any quantum backend. The technology no competitor can replicate.
What is QuBitLang?
QuBitLang is a high-level quantum programming language designed to make quantum circuit definition as natural as writing Python. It abstracts away the complexity of hardware-specific quantum SDKs while preserving full expressive power.
Unlike raw Qiskit or Cirq, QuBitLang code is human-readable, type-safe, and hardware-portable.
The same .ql file that runs on IBM Quantum today will run on Quantinuum or Rigetti
tomorrow - with zero code changes.
Compiler Pipeline
QuBitLang's full compiler pipeline transforms human-readable circuit definitions into optimised Qiskit code executing on IBM's quantum processors.
The Lexer (lexer.py) performs single-pass tokenisation of .ql source files.
Handles 27 keyword tokens, Unicode support (π), operator precedence markers, and precise source
location tracking for error reporting.
The Parser (parser.py) uses recursive descent with precedence climbing
to build an Abstract Syntax Tree. Handles all control flow constructs
(IF/THEN/ENDIF, FOR/ENDFOR, WHILE/ENDWHILE, REPEAT/TIMES/ENDREPEAT, FOR EACH/IN/ENDFOR),
function definitions, gate applications, and measurement operations.
Immutable, frozen-dataclass AST nodes (ast_nodes.py) with full Visitor pattern support.
Every node carries source location metadata for precise error reporting. The AST is the canonical
representation used by all subsequent compiler phases.
The Semantic Analyser (semantic_analyzer.py) performs type checking across
7 type categories (Qubit, QubitRegister, ClassicalBit, Integer, Float, Boolean, String),
scope resolution via a hierarchical symbol table, qubit lifecycle validation (preventing double-measurement),
and function signature verification.
The IR Builder (ir_builder.py) transforms the validated AST into
Quantum Intermediate Representation - a hardware-agnostic QuantumCircuit object
containing qubit/classical registers and instruction sequences. Performs constant evaluation,
loop unrolling, and function inlining during lowering.
The Optimiser applies gate cancellation passes, circuit depth reduction, and ML-based optimisation trained on hardware-specific noise profiles. Reduces gate count while preserving circuit semantics.
The Qiskit Code Generator emits optimised Qiskit circuits targeting IBM Quantum's
156-qubit Heron processors via Qiskit Runtime. The StateVector Simulator
(simulator.py) provides local simulation for up to 25 qubits during development.
Syntax
Compare QuBitLang's human-readable syntax with raw Qiskit. Same circuit, radically different developer experience.
Circuit Library
Three battle-tested circuit designs for different entropy generation strategies.
The workhorse. Applies H gate to every qubit for perfect superposition, then measures. Maximum throughput, maximum simplicity. Production default.
qrng_hadamard_v2.3.ql
Creates entangled qubit pairs using H+CNOT. Measures correlated random bits. Useful for protocols requiring provably correlated randomness.
qrng_bell_pair_v1.0.ql
Greenberger-Horne-Zeilinger maximally entangled states. All qubits correlated. Experimental - enables future multi-party random beacon protocols.
qrng_ghz_state_v1.0.ql
Portability
QuBitLang's hardware-agnostic IR means your circuits aren't locked to a single vendor. Today it's IBM Quantum. Tomorrow, any quantum backend.
156-qubit Heron processors. Production-ready via Qiskit Runtime.
H-Series trapped-ion processors. Industry-leading quantum volume.
Superconducting processors. Multi-chip architecture. Hybrid classical-quantum.
Visibility
Every API response, every SDK object, every certificate carries QuBitLang provenance metadata. You always know exactly which circuit generated your entropy.
Start generating quantum random numbers with the world's most elegant quantum programming language behind every response.
Get Started Free →Powered by QuBitLang & IBM Quantum