DevelopersHiQ
HiQ documentation
HiQ is the SoftQuantus programming language for quantum computers. You write at the level the work needs, from classes down to pulses, and the checker returns every mistake at its line before anything compiles.
These pages are the reference for the four layers, the codes the checker returns, the API and CLI, and every example program.
What works today
Each step of the path from a program to a machine, and what production answers for it today.
- CheckLive todayEvery error with a stable code, a line and a column, plus qubits, operations and depth. Nothing compiles.softqcos lang check
- SynthesizeLive todayTurn one C function into a reversible oracle in HiQ Assembly, or get a refusal that says why.softqcos lang synthesize
- CompileLive todayLower to one IR with control flow, optimise at level 0 to 3 and compile for hardware profiles. A target that cannot take the program is refused by name.softqcos lang compile
- PublishLive todayPublish a checked program in your workspace, so any key of the workspace can find it by id. Nothing runs.softqcos lang publish
- RunNot open yetRun on a Softquantus Cloud simulator, with evidence for each run. Not open in production yet, and no HiQ program reaches quantum hardware.softqcos lang run
Quickstart
Check a first program in four steps. You need Python and an API key from your workspace.
Install the client
Terminal pip install softqcosSet your API key
Create a key in your workspace on the Softquantus Research Platform. The CLI reads it from
QCOS_API_KEY; a direct HTTP request sends it in theX-API-Keyheader.Terminal export QCOS_API_KEY=<your key from platform.softquantus.com>Write a program
Save this as
bell.qcos. It entangles two qubits and measures both; the two bits always agree.bell.qcosqcos/0 // Bell pair: the two measurements always agree.program bellqubits a, bbits m0, m1h acx a, bmeasure a -> m0measure b -> m1Check it
Terminal softqcos lang check bell.qcosThe command exits with 1 when the program has errors, and each error names its code, line and column. For this file the check answers:
- ok
- true
- declared_qubits
- 2
- peak_qubits
- 2
- expanded_ops
- 4
- depth
- 3
- gate_counts
- { "h": 1, "cx": 1 }
- diagnostics
- []
From here, compile the program for a hardware profile with softqcos lang compile, or publish it in your workspace with softqcos lang publish. Neither one runs it. See API and CLI for every route and command.
The four layers
Each source layer lowers to the one below it, and all of them end as a qcos-ir/2 program. The pulse layer describes the schedule below the gates.
- HiQ Objects.qcos3 · qcos-l3/0For algorithm libraries and reusable building blocks.
- HiQ Script.qcos2 · qcos-l2/0For experiments that measure, decide and try again.
- HiQ Assembly.qcos · qcos/0For exact control of every gate, measurement and branch.
- HiQ Pulse.qcosp · qcos-pulse/0For control engineers who shape the signal itself.
Open source
The language itself is being opened under the Apache-2.0 licence: this reference, a grammar in EBNF for each layer, the tutorials, the example programs, editor grammars for syntax highlighting, and an RFC process for changes to the language.
The checker, the synthesiser, the compiler and the runtime are not part of that release. They stay in QCOS and are reached through the API with a key from your workspace.