Created
January 6, 2020 13:11
-
-
Save yoongun/f1857d62e28b1f6159e8aa7ddbf902c7 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_neasure_default_qubit() { | |
let mut qubit: Qubit = Default::default(); | |
let want = 0; | |
let got = Qubit::measure(&mut qubit); | |
assert_eq!(got, want); | |
} | |
#[test] | |
fn test_measure_configured_as_one_qubit() { | |
let mut qubit = Qubit{ theta: f64::consts::PI, phi: 0.0 }; | |
let want = 1; | |
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