Skip to content

Commit

Permalink
Ran cargo fmt and removed unnecessary imports
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Barlow <a.barlow.dev@gmail.com>
  • Loading branch information
a-barlow committed Oct 4, 2023
1 parent f96cbf1 commit 436bcc7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/grovers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@
* Author: Andrew Rowan Barlow <a.barlow.dev@gmail.com>
*/

use quantr::circuit::states::{ProductState, Qubit, SuperPosition};
use quantr::circuit::{Circuit, Measurement::{NonObservable, Observable}, StandardGate};
use quantr::circuit::{
states::SuperPosition,
Circuit,
Measurement::{NonObservable, Observable},
StandardGate,
};
use quantr::{complex::Complex, complex_Re};
use std::f64::consts::FRAC_1_SQRT_2;
const ERROR_MARGIN: f64 = 0.00000001f64;
Expand Down Expand Up @@ -67,8 +71,7 @@ fn grovers_3qubit() {
if let Observable(bin_count) = circuit.repeat_measurement(500).unwrap() {
for (state, count) in bin_count {
match state.as_string().as_str() {
"011"
| "111" => assert!(count > 200usize),
"011" | "111" => assert!(count > 200usize),
_ => assert_eq!(count, 0usize),
}
}
Expand Down

0 comments on commit 436bcc7

Please sign in to comment.