qbraid_qir.dumps

dumps(module, output_dir=None)[source]

Saves the Quantum Intermediate Representation (QIR) of a given module to bitcode (.bc) and LLVM IR (.ll) files.

Parameters:
  • module (Module) – The module containing the QIR.

  • output_dir (Optional[str]) – The directory where the files will be saved. If not provided, defaults to the current working directory.

Raises:

QbraidQirError – If there’s an error in writing the files.

Return type:

None