Analytics are computed cloud-side, which makes them the only way to measure circuits
containing opaque Haiqu-generated gates — data-loading results and
compression
CircuitModel outputs — where local circuit.depth()
and gate counts are misleading. See
Working with Haiqu Circuits.
Each analytics widget includes built-in help for the displayed metrics, turned on with
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.



