summaryrefslogtreecommitdiff
path: root/src/simulation/hamiltonians.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/hamiltonians.rs')
-rw-r--r--src/simulation/hamiltonians.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/simulation/hamiltonians.rs b/src/simulation/hamiltonians.rs
new file mode 100644
index 0000000..03d8d1f
--- /dev/null
+++ b/src/simulation/hamiltonians.rs
@@ -0,0 +1,31 @@
+use super::c64;
+use ndarray::prelude::*;
+
+pub fn X0() -> Array2<c64> {
+ array![
+ [
+ c64::new(1.0, 0.0),
+ c64::new(0.0, 0.0),
+ c64::new(0.0, 0.0),
+ c64::new(0.0, 0.0),
+ ],
+ [
+ c64::new(0.0, 0.0),
+ c64::new(1.0, 0.0),
+ c64::new(0.0, 0.0),
+ c64::new(0.0, 0.0),
+ ],
+ [
+ c64::new(0.0, 0.0),
+ c64::new(0.0, 0.0),
+ c64::new(-1.0, 0.0),
+ c64::new(0.0, 0.0),
+ ],
+ [
+ c64::new(0.0, 0.0),
+ c64::new(0.0, 0.0),
+ c64::new(0.0, 0.0),
+ c64::new(-1.0, 0.0),
+ ]
+ ]
+}