Last active
January 6, 2020 13:13
-
-
Save yoongun/59e6501fcb7c28f4fe21d487d7cc1d93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
#[test] | |
fn test_collapes_of_state() { | |
let mut qubit = Qubit{ theta: f64::consts::PI / 2.0, phi: 0.0 }; | |
let want = Qubit::measure(&mut qubit); | |
for _n in 0..100 { | |
let got = Qubit::measure(&mut qubit); | |
assert_eq!(got, want); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment