What is QuBitLang?
QuBitLang is a proprietary quantum programming language developed by Interlink Digital Group. It provides a human-readable abstraction over quantum circuit definition, compiling to Qiskit for execution on IBM Quantum hardware.
Why QuBitLang?
Traditional quantum programming requires deep knowledge of Qiskit, circuit construction, and quantum computing theory. QuBitLang abstracts this complexity into a clean, readable syntax that any developer can understand - while producing optimised quantum circuits under the hood.
How TrueEntropy Uses QuBitLang
Every random number you receive from TrueEntropy originates from a QuBitLang circuit. The core QRNG circuit applies Hadamard gates to put qubits into equal superposition, then measures them - collapsing each qubit to a truly random 0 or 1.
Compiler Pipeline
QuBitLang compiles through a seven-stage pipeline to produce optimised Qiskit code for IBM Quantum hardware:
Lexer
Tokenises .ql source into a stream of typed tokens (keywords, identifiers, operators, literals)
Parser
Builds a concrete syntax tree from the token stream using recursive descent parsing
AST
Constructs an abstract syntax tree using frozen dataclasses with the Visitor pattern
Semantic Analyzer
Type checking, symbol resolution, scope validation, and quantum-specific constraint verification
IR Builder
Converts the validated AST into a quantum intermediate representation (quantum_ir.py)
Optimizer
Gate fusion, redundant gate elimination, circuit depth minimisation, and qubit routing
Qiskit Code Generator
Emits optimised Qiskit Python code for execution on IBM Quantum Runtime
QuBitLang in API Responses
Every TrueEntropy API response includes QuBitLang metadata, providing full provenance transparency:
| Field | Location | Example | Meaning |
|---|---|---|---|
| qubitlang_circuit | JSON body + header | qrng_hadamard_v2.3 | Circuit used for generation |
| qubitlang_version | JSON body + header | 1.4.0 | Compiler version |
| powered_by | JSON body | QuBitLang | Technology attribution |
| X-QuBitLang-Circuit | Response header | qrng_hadamard_v2.3 | Header-level circuit ID |
| X-QuBitLang-Version | Response header | 1.4.0 | Header-level version |
Hardware Portability
QuBitLang compiles to hardware-specific backends. Currently supporting IBM Quantum via Qiskit, with future targets planned:
IBM Quantum (Qiskit)
156-qubit Heron processors via Qiskit Runtime