QASM and QIR
OpenQASM is the human-readable 'assembly language' for quantum circuits, and QIR is an LLVM-based intermediate representation carrying quantum and classical logic together — as of 2026 the two converging standards of the quantum software stack.
What it means
Quantum frameworks — Qiskit, Cirq, Pytket, Q#, PennyLane, Braket — all write the same circuits in different dialects, so the ecosystem needs common written languages.QASM (Quantum Assembly Language) is a human-readable text format for circuits, the 'assembly language of quantum'.But the most common version, OpenQASM 2.0, cannot express real-time, measurement-driven branching (dynamic circuits), so every framework bolted on its own extensions and the format fragmented; OpenQASM 3 fixes this by adding classical control flow.QIR (Quantum Intermediate Representation) goes one level deeper: applying the compiler idea of an intermediate representation, it decouples language frontends from hardware backends.Built on LLVM, it can carry classical and quantum logic in one program — exactly the bridge hybrid computing needs.It is developed by the QIR Alliance (founded by Microsoft), with NVIDIA, Quantinuum, Rigetti, IQM, and ORNL adopting it as of 2026.MLIR generalizes further: its 'dialects' let one program hold classical control, quantum circuits, and even pulse-level descriptions, progressively lowered toward hardware.In practice, though, many vendors still accept only simple circuit formats such as JSON — standards adoption lags the papers.Everyday analogy
Common misconceptions
- QASM is a circuit text format, not a programming language for humans to write large programs in — SDKs generate it.
- OpenQASM 2.0 cannot express mid-circuit-measurement-driven control flow — a real limitation that fragmented the ecosystem. As of 2026, OpenQASM 3 and QIR are the converging standards.
- Many vendors still accept only simple circuit formats (such as JSON), not QIR or MLIR — standards adoption lags the papers.
Key takeaways
- QASM is human-readable circuit text — the 'quantum assembly language' that SDKs generate and exchange.
- OpenQASM 3 adds classical control flow, so real-time, measurement-driven branching (dynamic circuits) can finally be expressed in the standard.
- QIR is an LLVM-based intermediate representation carrying hybrid quantum+classical logic; the QIR Alliance (Microsoft, with NVIDIA, Quantinuum, Rigetti, IQM, ORNL adopting as of 2026) develops it.
- MLIR 'dialects' allow classical control, quantum circuits, and pulses to coexist in one program with progressive lowering toward hardware.
Check your understanding
Which limitation of OpenQASM 2.0 caused the quantum software ecosystem to fragment into vendor-specific extensions?
- A.It could not describe two-qubit gates
- B.It could not express real-time, measurement-driven control flow (dynamic circuits)
- C.It only ran on IBM hardware
- D.It required license fees
Show the answer
Answer: B. It could not express real-time, measurement-driven control flow (dynamic circuits)
Why: OpenQASM 2.0 cannot express real-time branching on mid-circuit measurement results, so every framework added its own extensions and the format fragmented. OpenQASM 3 fixes this by adding classical control flow.
What makes QIR particularly suited as a bridge for hybrid quantum-classical computing?
- A.It is written in Python
- B.It renders circuits graphically
- C.Built on LLVM, it carries classical and quantum logic in one program, decoupling frontends from backends
- D.It compresses circuits to the fewest gates
Show the answer
Answer: C. Built on LLVM, it carries classical and quantum logic in one program, decoupling frontends from backends
Why: QIR applies the compiler intermediate-representation idea to quantum: built on LLVM, it expresses classical and quantum logic together and separates languages from hardware — exactly the bridge hybrid computing needs.
Builds on
OpenQASM 3 spec is stable literature, but adoption landscape (QIR Alliance members, vendor format support, MLIR dialects) evolves; text phrases these as-of-2026.
Learn it hands-on
This concept is part of a 46-level curriculum with an interactive simulator and Lumen, a tutor whose answers are verified before you see them. Levels 1–5 are free.
