QCOS Studio
A quantum programming language and its editor, inside VS Code.
QCOS Studio is the VS Code extension for the QCOS language. You write a quantum program as readable text, with named qubits and real control flow, and the editor helps you as you type. Through the QCOS API it checks the program, compiles it for a target and runs it on a simulator.
program prepare_one
qubits q
bits m
h q
measure q -> m
// Try again until the qubit reads 1, at most 16 times.
while !m budget 16 {
reset q
h q
measure q -> m
}
Why install it
- Read your circuit as a program. Qubits have names, loops and branches are part of the language, and routines let you reuse a piece of a circuit instead of copying it.
- Learn the language as you write. Completion offers every gate and keyword. Hover shows how a keyword is used, and how many qubits and angles a gate takes. No account or API key is needed for this.
- Limits are written in the source. A real-time loop must state its budget, so a program can't loop without bound.
- See what the compiler did. Compile shows the circuit drawn for the target you chose, with its metrics, next to your source.
- Clear refusals. When a target can't take your program, the extension says which target and why. It never shows a fake result or an invented price.
- Evidence you can check. A run leaves a receipt, and you can verify it from the editor, including its signature with the local QuantumLock verifier.
What works today
This is a preview. The QCOS language service is not enabled on the production API yet.
| Feature |
Today |
Needs |
| Highlighting, outline, completion, hover |
Works |
Nothing: no account, no key, no network |
| Problems, gate counts, control-flow view |
Not yet in production |
QCOS API with the language service enabled |
| Compile, Estimate Resources |
Not yet in production |
The same, and an API key with qcos:execute |
| Run on a simulator |
Not yet in production |
The same, and an available simulator |
| Run on a real quantum computer |
Off |
Real QPU execution is disabled |
Until the service is enabled, those commands answer that the API does not offer them yet. If your organization has been given another QCOS API address, set it in qcos.apiUrl.
Who it is for
- Researchers and developers who want quantum programs that a colleague can read and review.
- Teams writing programs with measurement-driven control, such as repeat-until-success or error-correction routines.
- Anyone learning the language: the editor features work from the first minute, with nothing to set up.
Getting started
- Install the extension and create a file ending in
.qcos. The imperative L2 form uses .qcos2.
- Type a program. Use completion for gates and keywords, hover for their meaning, and the Outline view to move around.
- When you have QCOS API access, run QCOS: Set API Key. The key is kept in VS Code's secret storage.
- Save the file to check it. Problems appear in the editor.
- Use Compile, Estimate Resources and Run above the
program line, and choose where they go with Target.
Commands
| Command |
What it does |
| QCOS: Compile |
Compiles for the chosen target and draws the result. Nothing runs on hardware |
| QCOS: Estimate Resources |
Shows logical resources and the compiled metrics |
| QCOS: Run Program |
Runs the program with the shots from qcos.shots, and shows the distribution and the receipt |
| QCOS: Select Target / Inspect Target |
Chooses a target and shows what it offers |
| QCOS: Show Control Flow |
Draws the branches and loops of the program |
| QCOS: Verify QuantumLock Receipt |
Checks the evidence of a run |
| QCOS: Set API Key / Clear API Key |
Stores or removes your key |
Your code and your key
- Your source leaves your machine only through the QCOS API. Each save sends it for checking, unless you turn off
qcos.checkOnSave. Compile and Run happen only when you ask.
- A repository can't redirect your key.
qcos.apiUrl is a user setting that a workspace can't change, and it must be https, except on localhost.
- A repository can't choose what runs on your machine. The verifier command is a user setting too.
- Untrusted workspaces are not supported, because the extension sends source to the API with your key.
What it refuses, and why
- Programs with real-time control (
while, or if/match on a measurement) are checked, shown and compiled for a target that offers what they need; a target that does not is refused by name. No run route takes them yet, so Run refuses.
- Cost. QCOS does not price. Quotes come from the Softquantus Research Platform.
- Signature verification. QCOS confirms a receipt's hashes, at most "sealed, unsigned".
Verified (ML-DSA-65) comes only from the local QuantumLock verifier (pip install "quantumlock[pqc]") against the trust root in qcos.quantumlock.trustRootPin. Without either, a claimed signature is shown as claimed, not confirmed.
- Classical synthesis and the QUARTZ_6003 inspector have no backend yet.
Settings
qcos.apiUrl: API base URL; https only, except localhost. User setting only.
qcos.checkOnSave: check on save (default on). Each save sends the source to the API.
qcos.shots: shots for Run.
qcos.quantumlock.command: the local verifier command.
qcos.quantumlock.trustRootPin: the trust root you accept, as sha256:<hex>.
Copyright SoftQuantus innovative OÜ.
| |