qward.metrics.behavioral_metrics.BehavioralMetrics

class BehavioralMetrics(circuit)[source]

Extract behavioral metrics from QuantumCircuit objects.

This class analyzes quantum circuits to compute behavioral metrics that describe how the circuit behaves as a computational process. Behavioral metrics capture dynamic characteristics such as parallelism potential, liveness of qubits across the circuit timeline, normalized depth measures, communication flow between qubits, and other indicators of execution dynamics derived from the circuit’s DAG representation.

circuit

The quantum circuit to analyze (inherited from MetricCalculator).

Type:

QuantumCircuit

_dag_circuit

DAG representation of the circuit, used to extract execution behavior, dependency structure, and parallelism characteristics.

Type:

DAGCircuit

Initialize the BehavioralMetrics calculator.

Parameters:

circuit (QuantumCircuit) – The quantum circuit to analyze

__init__(circuit)[source]

Initialize the BehavioralMetrics calculator.

Parameters:

circuit (QuantumCircuit) – The quantum circuit to analyze

Methods

__init__(circuit)

Initialize the BehavioralMetrics calculator.

get_metrics()

Calculate and return behavioral metrics.

is_ready()

Check if the metric is ready to be calculated.

Attributes

circuit

Get the quantum circuit.

id

Get the ID of the metric.

metric_type

Get the type of this metric.

name

Get the name of the metric.