summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorDennis Kobert <dennis@kobert.dev>2019-12-13 14:42:28 +0100
committerDennis Kobert <dennis@kobert.dev>2019-12-13 14:42:28 +0100
commit5c311266e3bf28790fe1c41306913c272260a8f4 (patch)
treea47d100994e14a3ee07dfb68647ee3551d158961 /src/simulation
parent53f66593bd91cd54a3cc59124ef8db3f27c6b802 (diff)
parent05f85f625eadb2688c69af89d533eeb69ba76da0 (diff)
Merge branch 'rust' of ssh://kobert:/var/repos/dequantify into rustHEADrust
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/two_level.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/simulation/two_level.rs b/src/simulation/two_level.rs
index 99336a5..2d9d459 100644
--- a/src/simulation/two_level.rs
+++ b/src/simulation/two_level.rs
@@ -16,10 +16,8 @@ impl TwoLevel {
impl State for TwoLevel {
fn fibrate(&self) -> Vec<f64> {
- self.state
- .iter()
- .flat_map(|c| [c.re, c.im])
- .map(|v| *v)
+ self.state.iter()
+ .flat_map(|c| std::iter::once(c.re).chain(std::iter::once(c.im)))
.collect()
}