QuantumLib.Measurement

Require Import VectorStates.

This file contains predicates for describing the outcomes of measurement.

Probability of outcome ϕ given input ψ

Definition probability_of_outcome {n} (ϕ ψ : Vector n) : R :=
  Cmod (inner_product ϕ ψ) ^2.

Probability of measuring ϕ on the first m qubits given (m + n) qubit input ψ