summaryrefslogtreecommitdiff
path: root/src/simulation/s_5_fibration.rs
diff options
context:
space:
mode:
authorDennis Kobert <dennis@kobert.dev>2019-12-13 04:00:31 +0100
committerDennis Kobert <dennis@kobert.dev>2019-12-13 04:00:31 +0100
commitde571765f161a49129fd9e34150f6a892f388bdc (patch)
treed3f49cb6bbfdeff9378fda2fe901a6796269330c /src/simulation/s_5_fibration.rs
parent1daf4f35a5dd2f500d95541797661c518f4e2713 (diff)
Add fibartion matrices
Diffstat (limited to 'src/simulation/s_5_fibration.rs')
-rw-r--r--src/simulation/s_5_fibration.rs118
1 files changed, 118 insertions, 0 deletions
diff --git a/src/simulation/s_5_fibration.rs b/src/simulation/s_5_fibration.rs
new file mode 100644
index 0000000..76a0350
--- /dev/null
+++ b/src/simulation/s_5_fibration.rs
@@ -0,0 +1,118 @@
+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),
+ ]
+ ]
+}
+
+pub fn X1() -> Array2<c64> {
+ array![
+ [
+ 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(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),
+ ]
+ ]
+}
+
+pub fn X2() -> Array2<c64> {
+ array![
+ [
+ c64::new(0.0, 0.0),
+ c64::new(0.0, 0.0),
+ c64::new(0.0, -1.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(0.0, -1.0),
+ ],
+ [
+ c64::new(0.0, 1.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(0.0, 1.0),
+ c64::new(0.0, 0.0),
+ c64::new(0.0, 0.0),
+ ]
+ ]
+}
+
+pub fn X3() -> Array2<c64> {
+ array![
+ [
+ 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(-1.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(1.0, 0.0),
+ c64::new(0.0, 0.0),
+ c64::new(0.0, 0.0),
+ c64::new(0.0, 0.0),
+ ]
+ ]
+}