github
9 of 517 new or added lines in 9 files covered. (1.74%)
450 existing lines in 22 files now uncovered.73466 of 83272 relevant lines covered (88.22%)
358338.04 hits per line
1 |
use crate::xx_decompose::utilities::Square; |
|
2 |
use crate::euler_one_qubit_decomposer::EulerBasis; |
|
3 |
|
|
4 |
|
|
5 |
struct Point {
|
|
6 |
a: f64,
|
|
7 |
b: f64, |
|
8 |
c: f64, |
|
9 |
} |
|
10 |
|
|
11 |
/// Computes the infidelity distance between two points p, q expressed in positive canonical
|
|
12 |
/// coordinates.
|
|
NEW
|
fn _average_infidelity(p: Point, q: Point) -> f64 { |
× |
NEW
|
let Point { |
× |
NEW
|
a: a0,
|
× |
NEW
|
b: b0, |
× |
NEW
|
c: c0, |
× |
NEW
|
} = p; |
× |
NEW
|
let Point { |
× |
NEW
|
a: a1,
|
× |
NEW
|
b: b1, |
× |
NEW
|
c: c1, |
× |
NEW
|
} = q; |
× |
NEW
|
|
× |
NEW
|
1. - 1. / 20. |
× |
NEW
|
* (4.
|
× |
NEW
|
+ 16. |
× |
NEW
|
* ((a0 - a1).cos().sq() * (b0 - b1).cos().sq() * (c0 - c1).cos().sq() |
× |
NEW
|
+ (a0 - a1).sin().sq() * (b0 - b1).sin().sq() * (c0 - c1).sin().sq())) |
× |
NEW
|
} |
× |
31 |
|