| 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. |
haiqu_circuit.compute_advanced_metrics() | The advanced metrics are computed on demand, to invoke the recomputation, call this method. |
haiqu_circuit.advanced_metrics() | Renders a widget that displays a table with advanced quantum circuit metrics. |
haiqu_circuit.compute_evolution() | The circuit evolution data are computed on demand, to invoke the recomputation, call this method. |
haiqu_circuit.evolution | Provides raw metrics data for the circuit, as the circuit is traversed, represented as Python objects. |
haiqu_circuit.draw_evolution() | Generates a plot showing the evolution of key circuit metrics as the circuit is traversed. The original circuit is divided gate-by-gate or into slices, based on the initial depth. Metrics are calculated for each slice. |
haiqu_circuit.draw_radar() | Renders a widget displaying the radar (wind-rose) plot. |
haiqu_circuit.draw_gate_diversity() | Renders a widget showing the number of different gates in the circuit. It has two modes: original and normalized to basis gates. The basis_gates=True option will display the normalized (transpiled to basis gates set RX, RY, RZ and CX) view for gate diversity. |
haiqu_circuit.draw_liveness_per_qubit() | Renders a widget displaying the liveness per qubit plot. The liveness metric reveal the frequency of qubit activity during execution in relation to the total circuit depth, indicating qubit utilization. |
haiqu_circuit.draw_correlation_matrix() | Renders a normalized interaction matrix (heatmap) that quantifies how frequently each pair of qubits participates together in two-qubit gates within a given quantum circuit. |
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:
Advanced analytics
The advanced metrics are computed on demand; the computation is invoked when you calladvanced_metrics() to display the advanced circuit metrics:

widget=False parameter:
all_metrics function:
Evolution of the circuit
Generate a plot showing the evolution of key circuit metrics during simulated execution of the circuit. The original circuit is divided into slices, and metrics are calculated for each slice, providing insights into changes in connectivity, depth of two-qubit interactions, degree of entanglement, and concurrent operation performance. The evolution of metrics is computed on demand, calldraw_evolution(metric) to render the plot. The optional metric parameter can be one of depth (default), gates_1q, gates_2q, or gates_total.

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.





