Quantum circuit analysis is important for understanding the structure, complexity, and feasibility of executing a circuit on quantum hardware or simulators. It helps to identify key properties such as gate composition, depth, connectivity, and noise susceptibility, which impact performance and accuracy. Haiqu SDK provides a number of analytics functions, properties and widgets:Documentation Index
Fetch the complete documentation index at: https://docs.haiqu.ai/llms.txt
Use this file to discover all available pages before exploring further.
| Property or Function | Description |
|---|---|
haiqu_circuit.analytics | Provides ALL raw metrics data, represented as Python objects. |
haiqu_circuit.core_metrics() | Renders a widget that displays a table of core analytics metrics. |
haiqu_circuit.compare_metrics() | Renders a widget with a comparison table of core analytics for provided circuits. |
help=True option. Whenever possible, the widget displays a column to provide assistance for each metric. Data can be exported in formats including JSON, CSV, or used in Pandas for further analysis.
Let’s start by defining an example quantum circuit, then display it:

haiqu.log() method. This computes the complete set of quantum metrics using the Haiqu API and returns them in a single metadata object.
Let’s submit our circuit to the Haiqu quantum backend for analysis:
Basic analysis
Before executing a quantum circuit, it is crucial to assess its fundamental properties to ensure feasibility and compatibility with available simulators or hardware. This step helps determine circuit size, gate composition, and whether it contains custom or unsupported operations. By analyzing these factors, users can make informed decisions about device selection, potential optimizations, and whether additional modifications are needed before execution. The circuit’s basic metrics are displayed usingcore_metrics:

widget=False parameter:
Accessing metrics directly
Let’s submit the example quantum circuit for analysis:Display a breakdown of the different gate types present in the circuit
To access the number of operations with the details for each of the gate type, use:Comparing circuits
The functionhaiqu.compare_metrics shows a table with the core metrics of several circuits. This can be useful to understand the difference between the circuits or how a circuit changes with respect to a parameter.



