pennylane_calculquebec.utility.debug.compute_expval

Contents

pennylane_calculquebec.utility.debug.compute_expval#

pennylane_calculquebec.utility.debug.compute_expval(probabilities: list[float]) float#

Compute the expectation value using the parity of each outcome

Parameters:

probabilities (list[float]) – the results of a circuit execution represented as probabilities

Returns:

the expectation value of a probability distribution

Return type:

float