Skip to content

New version

The Quantum Program visualization bridges the high-level algorithm descriptions (as it is captured in Qmod) with their quantum implementations (as synthesized by the Classiq engine). The tool offers two key innovations: functional block hierarchies and quantum data flow representations.

The quantum data flow view lets users track quantum variables, including higher-level types like numbers, arrays, and structs, along with their qubit allocations. This aids in understanding data flow and memory allocation within quantum algorithms.

Functional block hierarchies enable navigation between different levels of abstraction, from high-level functional blocks to individual quantum gates, offering a more thorough exploration of the algorithm's structure.

The QP visualization tool provides an interactive way to analyze quantum programs by focusing on the quantum data-flow between functional blocks. Here’s a breakdown of its key features and functionality:

Purpose

  • Analyze the implementation of the quantum model (Qmod) as synthesized by the Classiq engine.
  • Verify the data flow within the quantum program, enabling debugging and deeper analysis

Hierarchical Structure

  • Allows users to traverse different levels of the quantum model implementation, from high-level Qmod functions down to atomic functions.

Double clicking a function block opens and collapses the internal hierarchies:

hierarchies

Color Coding

The visualization uses colors to help distinguish different block categories:

  • Yellow: Represents Qmod function blocks (either written by the user or taken from the Classiq library).
  • Turquoise: Represents Qmod statement blocks (such as: control, invert, power, within-apply, assignment).
  • Grey: Represents built-in functional blocks (generated by the Classiq engine during synthesis).

Data Flow Analysis

Data flow between functional blocks is presented in terms of the Qmod variables:

  • Purple lines represent the flow of quantum variables throughout the program.
  • The purple dot marks where a variable is initialized.
  • When variables split or merge (via slicing or the bind operation), the purple lines update to show the changes.
  • The variable’s name and size are also displayed along the purple lines, making it easier to track their initialization, usage and transformations.

This structured approach allows for a clear understanding of the program’s execution, providing users with a tool to validate the accuracy and efficiency of their quantum programs.