Key Features: Load algorithms as PyQASM modules and QASM files
qBraid Algorithms provides a collection of quantum algorithms that can be loaded as PyQASM modules, or you can generate .qasm files to use them as subroutines in your own circuits.Loading Algorithms as PyQASM Modules
To load an algorithm as a PyQASM module, use theload_algorithm function from the qbraid_algorithms package, passing algorithm-specific parameters. For example, to load the Quantum Fourier Transform (QFT) algorithm:
Loading Algorithms as .qasm Files
In order to utilize algorithms as subroutines in your own circuits, use the
generate_subroutine function for your desired algorithm. By passing algorithm-specific parameters, and optionally a desired output path, you can
generate a .qasm file containing a subroutine for the parameterized circuit. For
example, to generate a QFT subroutine for 4 qubits:
include "qft.qasm"; to your OpenQASM file, and call the
subroutine. For example:
