qbraid.programs.get_qasm_type_alias
- get_qasm_type_alias(qasm)[source]
Determines the type alias for an OpenQASM program based on its version.
- Parameters:
qasm (str) – The OpenQASM program string.
- Returns:
The QASM version alias (‘qasm2’ or ‘qasm3’).
- Return type:
str
- Raises:
QbraidQasmError – If the string does not represent a valid OpenQASM program.
Note
QbraidQasmError is an alias for
QasmError
.