qbraid_qir.qasm3.validate_qasm
- validate_qasm(program)[source]
Validates a given OpenQASM 3 program for semantic correctness.
- Parameters:
program (openqasm3.ast.Program or str) – The OpenQASM 3 program to validate.
- Raises:
TypeError – If the input is not a string or an openqasm3.ast.Program instance.
QasmValidationError – If the program fails parsing or semantic validation.
- Return type:
None