qward.metrics.element_metrics.ElementMetrics

class ElementMetrics(circuit)[source]

Quantum Element Metrics calculator for QWARD.

This class implements element-based metrics for quantum circuits focusing on gate distribution, oracle usage patterns, and measurement analysis.

Initialize the ElementMetrics calculator.

Parameters:

circuit (QuantumCircuit) – The quantum circuit to analyze

__init__(circuit)[source]

Initialize the ElementMetrics calculator.

Parameters:

circuit (QuantumCircuit) – The quantum circuit to analyze

Methods

__init__(circuit)

Initialize the ElementMetrics calculator.

get_metrics()

Calculate and return quantum element 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.