FunctionalPauliRotations.snapshot_expectation_value

FunctionalPauliRotations.snapshot_expectation_value(label, op, qubits, single_shot=False, variance=False)

Take a snapshot of expectation value <O> of an Operator.

Parameters
  • label (str) – a snapshot label to report the result

  • op (Operator) – operator to snapshot

  • qubits (list) – the qubits to snapshot.

  • single_shot (bool) – return list for each shot rather than average [Default: False]

  • variance (bool) – compute variance of probabilities [Default: False]

Returns

with attached instruction.

Return type

QuantumCircuit

Raises

ExtensionError – if snapshot is invalid.