Skip to content

Analyzer Web Application

The Classiq analyzer application helps you visualize and analyze quantum circuits. The input to the application is a quantum circuit generated by the synthesis engine of the Classiq platform.

Access the Analyzer

You have a few options for accessing the Classiq analyzer application. First, before accessing the application, you need to authenticate to the Classiq VSCode extension and the Classiq Python SDK. See Getting Started.

Classiq Python SDK

  • Synthesize a circuit using the Classiq Python SDK and then run this code:
from classiq import Analyzer, ModelDesigner

model = ModelDesigner()
circuit = model.synthesize()

analyzer = Analyzer(circuit)
analyzer.analyzer_app()
  • OR run:
circuit.show_interactive()

Classiq VSCode Extension

  • When a Generated Circuit file is active in your VSCode editor, open the extension command window (Cmd+Shift+P in macOS) and type Analyze Quantum Circuit From Generated Circuit.

Direct Access

Visualization Tool

The Classiq analyzer circuit visualization tool provides a hierarchical image of the circuit, as well as a higher level interactive representation of functions, gates, qubits, and operations.

Once you have loaded and analyzed the quantum circuit input, the analyzer displays an interactive chart, like this:

chart

Functions

The bars represent the functions used in the quantum algorithm, and the grid models the qubits employed in the quantum circuit. For a more detailed view, click the "+" button on the top left and see the gates that make up these functions.

Change the labels of functions and gates by double-clicking their captions:

rename_gate

Wire Manipulations

By default, the qubits on which your quantum algorithm operates are named q0, q1, q2, etc. To rename the qubit lines in your circuit schema, double-click a qubit name and change it in the rename dialog.

Merging Wires into Registers

The qubit toolbar provides further insights into your quantum circuit analysis. It becomes visible as a popover whenever you click a qubit segment. To collapse adjacent qubits into a register view, choose two adjacent qubits simultaneously (using Ctrl on Windows and Cmd on a Mac) and click the "Merge" button.

To revert to the original view, click the "Unmerge" button.

merge_qubits

For detailed information about the registers in your circuit, see the JSON representation of your circuit in the left side drawer of the application.

Coloring

To give special labels to your qubit segments or to play around with the colors of the qubits, for example, to highlight particular portions of your quantum algorithm, use the qubit toolbar:

axis_coloring

To analyze multiple circuits in the same session, see the analysis results of each quantum circuit in their separate tabs. To rename the title of each tab, double-click it.

Tabs

rename_tab

To upload a new generated circuit, open a new tab by clicking the "+" button on the top right of the tab panel.

To inspect the structure and properties of your generated circuit, access the circuit inspector on the left. The inspector includes four tabs:

  • The Full tab displays analysis information for the entire circuit. Selected functions/gates are highlighted in this tab as shown below. You can also click on a function name in the inspector to highlight the corresponding gate block in the circuit chart.
  • The Function tab displays information specific to the function, such as the target qubits on which the function operates and the quantum gates it includes.
  • The Information tab supplies general information on the selected function or gate, such as the registers, depth, and width.
  • The search icon 🔍 let you search functions and gates by their names. Click any search result to locate it in the circuit chart view.

json_inspector

Task Bar

On the top right is the analyzer task bar:

taskbar

The taskbar has these button groups described from left to right:

  1. This group controls the hierarchical view of the quantum circuit chart: expand all the functions and/or gates to the lowest level analysis of quantum gates utilized in your algorithm; or collapse all the bars and revert the chart to the original view displayed when the circuit input was first loaded, so that this single bar models your entire quantum algorithm.
  2. This (single) button exports your analysis insights into a JPEG image, JSON text file or an interactive HTML chart.
  3. The map button navigates through different components of your quantum circuit chart so you can shift the screen focus to gates and functions that are outside the view.
  4. This group scales your quantum circuit chart: scale the quantum circuit chart to the default scale value (currently 90%); zoom out of the quantum circuit chart; change the current scale or zoom level of the chart; or zoom in.