Skip to main content
To provide a more interactive experience for developers, PyQASM offers a command-line interface (CLI) tool. The CLI tool can be installed as an extra dependency by running the following command:
pip install 'pyqasm[cli]'
This feature is still in active development and may not be stable for production use
Users can then verify their installation by running the following command:
pyqasm --help
Validate The validate functionality can be used to check QASM files. You can provide the path to the QASM file or a directory as an argument to the validate command. The tool will then check the semantic validity of the file(s) and return the results.
  • Validate commands
  • Validate QASM files
pyqasm validate --help
Unroll The unroll functionality is used to expand all macros and modular structures in OpenQASM files into flat, low-level instructions that are directly executable by quantum devices or emulators. You can provide either the path to a specific QASM file or a directory containing multiple QASM files as an argument to the unroll command. By default, the unrolled file is saved with the following naming convention: <original_qasm_filename>_unrolled
  • Unroll commands
  • Unrolling QASM files
pyqasm unroll --help
I