Python CLI¶
The hugr-qir command line tool reads a HUGR package and emits QIR. Run hugr-qir -h/--help for more information.
hugr-qir¶
Convert a HUGR file to QIR.
Provide the name of the HUGR file as the first argument. Per default, QIR is emitted to stdout, but can be written to a file using the -o option.
Usage
hugr-qir [OPTIONS] HUGR_FILE
Options
- --validate-qir, --no-validate-qir¶
Whether to validate the QIR output
- Default:
True
- --validate-hugr, --no-validate-hugr¶
Whether to validate the input hugr before and after each internal pass
- Default:
False
- -t, --target <target>¶
LLVM compile target
- Default:
'quantinuum-hardware'- Options:
quantinuum-hardware | native
- -l, --opt-level <opt_level>¶
LLVM optimization level
- Default:
'aggressive'- Options:
none | less | default | aggressive
- -f, --output-format <output_format>¶
Choice of output format
- Default:
'llvm-ir'- Options:
llvm-ir | bitcode | base64
- -o, --output <outfile>¶
Name of output file (optional)
- -w, --wasm-file <wasm_file>¶
Name of wasm binary file to link against (optional)
- --version¶
Show the version and exit.
Arguments
- HUGR_FILE¶
Required argument