diff options
| author | hachem <im@hachem.wtf> | 2024-09-17 17:03:26 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2024-09-17 17:03:26 +0200 |
| commit | affb34897a4761197df78bdccdb2da599ceb537a (patch) | |
| tree | e44419a880bed71a85bd1620916b629667e8e9ee /libmu/src/core | |
| parent | a3e3971bcf5cc938db1fcae1e24e1c72f5a10038 (diff) | |
Prepare for quantum stuff
Diffstat (limited to 'libmu/src/core')
| -rw-r--r-- | libmu/src/core/bit.rs | 10 | ||||
| -rw-r--r-- | libmu/src/core/gate.rs | 3 | ||||
| -rw-r--r-- | libmu/src/core/mod.rs | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/libmu/src/core/bit.rs b/libmu/src/core/bit.rs new file mode 100644 index 0000000..a5bce51 --- /dev/null +++ b/libmu/src/core/bit.rs @@ -0,0 +1,10 @@ +use crate::{ColumnVector, Complex, QuantumGate}; + +pub type QuantumBit = ColumnVector<Complex<f64>>; +pub type ClassicalBit = bool; + +impl QuantumBit { + pub fn apply_gate(&mut self, _gate: &QuantumGate) { + todo!(); + } +} diff --git a/libmu/src/core/gate.rs b/libmu/src/core/gate.rs new file mode 100644 index 0000000..b2e18c0 --- /dev/null +++ b/libmu/src/core/gate.rs @@ -0,0 +1,3 @@ +use crate::{Complex, Matrix}; + +pub type QuantumGate = Matrix<Complex<f64>>; diff --git a/libmu/src/core/mod.rs b/libmu/src/core/mod.rs new file mode 100644 index 0000000..63ee71b --- /dev/null +++ b/libmu/src/core/mod.rs @@ -0,0 +1,2 @@ +pub mod bit; +pub mod gate; |
