qasm-ts - v2.0.0
    Preparing search index...

    Module qasm3/token

    OpenQASM 3.0 Token Definitions and Utilities

    This module defines all the token types used in OpenQASM 3.0 syntax, which significantly extends OpenQASM 2.0 with modern programming language features.

    Major additions in OpenQASM 3.0:

    • Classical types: int, uint, float, bool, bit, complex
    • Control flow: if/else, for/while loops, switch/case
    • Functions: def, return, extern declarations
    • Advanced features: arrays, timing (delay, durationof), calibration
    • Quantum extensions: qubit declarations, gate modifiers, hardware qubits
    import { lookup, Token } from './qasm3/token';

    console.log(lookup('qubit')); // Token.Qubit
    console.log(lookup('if')); // Token.If
    console.log(lookup('def')); // Token.Def
    console.log(lookup('complex')); // Token.Complex

    Enumerations

    Token

    Functions

    inverseLookup
    lookup
    notParam