Skip to main content

CLI Usage

qBraid Algorithms includes a command-line interface (CLI) for generating quantum algorithm subroutines. These subroutines can either be saved in .qasm files or displayed directly in the terminal, providing users with a convenient way to access and utilize quantum algorithms.

Installation

To use the CLI, install with CLI dependencies:
Or install from source:

Generate Subroutines

Generate quantum algorithm subroutines that can be included in other circuits:
  • Generate QFT subroutine for 4 qubits
  • Generate IQFT subroutine for 3 qubits with custom name and show the circuit
  • Generate only the oracle for Bernstein-Vazirani
  • Generate a QPE subroutine for phase estimation:

Help

Get help for any command:

Examples

Complete Workflow

  1. Generate a QFT subroutine:
  2. Generate a Bernstein-Vazirani oracle and view it:
  3. Generate an IQFT circuit with custom output: