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.
Step 1. Define and submit a quantum circuit
Haiqu SDK supports the Qiskit circuit and QASM formats.1.1. Load a quantum circuit as a QASM file:
1.2. Define a standard Qiskit circuit:
1.3. Submit a circuit for analysis
To utilize the analytics functions invoke thehaiqu.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 a circuit for analysis with Haiqu quantum backend:
wait_for_analytics() polls for a completed job and then loads the metrics into the local Haiqu circuit object.
Step 2. Run 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 using:- The
number of qubitsin the original circuit. - The
depthof the original circuit and the depth of the circuit normalized (transpiled) to basis gates. - The
count of 1-qubitand2-qubit gatesfor the normalized circuit. - The
total number of gates.
Step 3. Run advanced analysis
Understanding the additional properties of a quantum circuit may be essential for predicting performance and optimizing execution. This step evaluates entanglement, circuit density, and qubit connectivity, which impact simulability, execution time, and hardware performance. By analyzing long-range interactions, gate expressivity, and parameterized structures, users can assess whether their circuit is well-structured for efficient computation and whether alternative implementations could improve performance. To display the advanced circuit metrics call:Program communication: Evaluates qubit connectivity by computing the sum of interaction degrees in the circuit’s interaction graph.Critical depth: Determines the depth of two-qubit interactions relative to their total count, assessing the circuit’s parallel execution potential.Entangling Gates Ratio: Calculates the fraction of two-qubit gates in the circuit, which may impact the present entanglement.Parallelism: Measures the circuit’s ability to execute operations simultaneously by comparing total gate count to circuit depth.Liveness: Computes how often qubits are active during execution relative to total circuit depth, indicating qubit utilization.
Step 4. Other metric visualizations
4.1. Radar Plot
TheRadar Plot aids visualizing and comparing circuit properties such as Program Communication, Critical Depth, Entangling Gates Ratio, Parallelism, and Liveness, providing an intuitive way to assess and contrast the performance trade-offs of different circuits.
4.2. Gate Diversity
TheGate Diversity chart visualizes the number and type of gates used in a quantum circuit. This metric is widely used in benchmarking, hardware-specific tuning, and noise-aware optimization. Haiqu SDK allows you to display either the original gate diversity or the normalized diversity (converted to a specified set of basis gates).
When the option basis_gates is omitted it displays the gate diversity in the original instructions submitted by the user, when the option basis_gates is set to True it displays it transpiled to the RX, RY, RZ, CX basis.
4.3. Liveness per Qubit
TheLiveness per Qubit plot indicates how frequently each qubit is active during the circuit execution, relative to the total circuit depth. This reflects qubit utilization and is particularly important because idle qubits are more susceptible to decoherence unless techniques like Dynamical Decoupling are applied.