Check
POST /api/v1/runtime/lang/check
Command
softqcos lang check ghz.qcos --json
Response
- ok
- true
- declared_qubits
- 4
- peak_qubits
- 4
- expanded_ops
- 8
- depth
- 5
- gate_counts
- { h: 1, cx: 3 }
- diagnostics
- []
Quantum programming language
HiQ is the SoftQuantus quantum programming language. Four layers, from classes and interfaces down to pulses, with control flow and typed classical data inside the program, checked before it reaches a machine.
// GHZ state on four qubits: all bits read 0000 or 1111.
program ghz
qubits q[4]
bits m[4]
h q[0]
cx q[0], q[1]
cx q[1], q[2]
cx q[2], q[3]
repeat i in 0..4 {
measure q[i] -> m[i]
}ok true · 4 qubits · depth 5 · diagnostics []
In practice
Five programs from the examples, as you would write them. Each one passes the checker today. None of them runs on quantum hardware yet.
HiQ Script
Encode one bit in three qubits, measure two parities with an ancilla that is used twice, and correct from the syndrome. The correction is decided by the measurement, in the same program, not by a second language wrapped around a circuit.


Three-qubit bit-flip code: encode, inject one error, measure the two parities with a reused ancilla, and correct from the syndrome.
for i = 0 to 1 alloc anc cx d[i], anc cx d[i + 1], anc measure anc into s[i] free anc resetnextif s[0] then let syndrome = syndrome + 1endif s[1] then let syndrome = syndrome + 2endselect syndromeWhy HiQ
Most quantum code is a fixed list of gates, with the decisions around it written in a second language and joined by hand. Error correction, adaptive measurement and repeat-until-success need a program that reacts while it runs.
HiQ puts those decisions in the program. The checker reads all of it, names every mistake with a code, a line and a column, and says what a machine needs before anything is compiled.
Four layers
4
layers, from classes and interfaces down to pulses
Objects for libraries, Script for experiments, Assembly for exact control and Pulse for the signal itself.

51
gate names in one table
Shared by every layer, from h and cx to controlled rotations.

77
named diagnostic codes
Each refusal comes back with a code, a line and a column.

24
worked examples
Each passes the checker and states its expected result.

A budget on every loop that waits
A loop that waits on a measurement says how many times it may run, so the checker can bound the program.
while !m budget 16 { measure anc -> m}From source to hardware
Every step is a route on the QCOS API and a command in the softqcos CLI, with a key from the Softquantus Research Platform. Check, synthesize, compile and publish answer in production today. Running is the step that is not open yet.
QCOS API · softqcos CLI
Each card is one call to QCOS with an API key from the Softquantus Research Platform. Choose a step, or let the deck play.
Check
POST /api/v1/runtime/lang/check
Command
softqcos lang check ghz.qcos --json
Response
The check response is the checker's real output for examples/l1/ghz.qcos. The other cards describe what each route returns. Nothing on this page calls the API.
Four layers
Objects for libraries, Script for experiments, Assembly for exact control and Pulse for the signal itself. Assembly, Script and Objects all end as the same IR, and a refusal from a lower layer comes back at the line of your source.
One statement per line, braces · .qcos · qcos/0
For exact control of every gate, measurement and branch.
One statement per line: named qubits, routines, real-time branches and switches, and loops that wait on a measurement only with a declared budget.
Lowered to qcos-ir/2
HiQ AssemblyFrom source to a machine
teleport.qcos// Teleportation: the state ry(pi / 3)|0> moves from msg to bob,// using two measurements and real-time corrections.program teleportqubits msg, alice, bobbits m0, m1, outry(pi / 3) msg// Shared Bell pair between alice and bob.h alicecx alice, bob// Bell measurement on msg and alice.cx msg, aliceh msgmeasure msg -> m0measure alice -> m1// Corrections decided at run time.if m1 { x bob}if m0 { z bob}measure bob -> outIn the language
What a HiQ program talks about, and what the checker watches for in each.






cx q[0], q[1]crz(pi / 4) q[1], q[2]One gate table for every layer, from h and cx to controlled rotations, cu and c4x. A gate with the wrong number of qubits or angles is stopped by name.
Renders by SoftQuantus. They illustrate the ideas, not a machine.
Checked before it runs
The checker returns every error with one of 77 stable codes, a line and a column, and nothing is compiled until the program is clean. Switch between the two versions of this program.
program retryqubits ancbits mh ancmeasure anc -> mwhile !m { reset anc h anc measure anc -> m}Refused by the checker
loop.unbounded
line 6, column 10
a while loop needs a budget: while <condition> budget <n> { ... }
The loop waits on a measurement. Without a budget, a machine could wait on it forever, so the program never reaches one.
Every code, with what it means: diagnostics reference.
Examples
Each one passes the checker and states its expected result in its first comment.
In your editor
QCOS Studio is the SoftQuantus extension for Visual Studio Code. It opens the four HiQ file types and helps as you type, with no account and no network. Checking and compiling go through the QCOS API with your key.
On your machine · no key
Through the QCOS API · with a key
Limits today
Open language
Everything you need to read and write HiQ is being prepared for release under the Apache License 2.0. The checker, the compiler and the runtime stay in QCOS, and you reach them with an API key.
Open · Apache-2.0
The public repository is being prepared. Until it opens, the reference, the grammars and the examples are published in the developer docs.
In QCOS · through the API
QCOS is reached with the softqcos CLI or the API and a key from the Softquantus Research Platform. Nothing is installed on your machine but the client.
How we will measure it
HiQ makes no claim of speed against other languages. Before its programs run in production, these are the results it has to show.
01
02
03
04
05
Take part
We are looking for people who write quantum programs, build compilers or run control systems, to test the checker and compiler now and the first program runs when they open.
Read the reference, open an example and check it with the softqcos CLI. Until HiQ programs can run, circuits reach a simulator through the QCOS API, SDK, CLI and MCP server.
32 states, equal amplitude
Grover search over 32 states, computed in your browser as it plays. An illustration, not a run on a quantum computer.