pub fn gate_error( channel: &QuantumChannel, target: Option<&QuantumChannel>, ) -> Result<f64, QuantumInfoError>
Calculate the gate error (infidelity) of a quantum channel.
r = 1 - F_avg
channel
target
The gate error r ∈ [0, 1]