expval#

diffqc.expval(probs: Array, wire: int)#

Expectation of |1>

Parameters
  • probs (jnp.ndarray) – Probabilities of n-qubit state

  • wire (int) – Expectation measurement wire

Returns

Expectation of |1>

Return type

float like