diff options
| author | hachem <im@hachem.wtf> | 2024-09-20 09:25:19 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2024-09-20 09:25:19 +0200 |
| commit | a84b6394209e37620e45155a25b3755b38ba8515 (patch) | |
| tree | 4839f145111fda4086311d8ff1417f698ca30212 /mu/src/main.rs | |
| parent | affb34897a4761197df78bdccdb2da599ceb537a (diff) | |
basic quantum gate setup and quantum registers
Diffstat (limited to 'mu/src/main.rs')
| -rw-r--r-- | mu/src/main.rs | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/mu/src/main.rs b/mu/src/main.rs index a254401..7bbc3e7 100644 --- a/mu/src/main.rs +++ b/mu/src/main.rs @@ -1,15 +1,8 @@ use libmu::*; fn main() { - #[rustfmt::skip] - let matrix = matrix![[1.0, 2.0, 3.0]; - [4.0, 5.0, 6.0]; - [7.0, 8.0, 9.0]]; - let vector = row_vector![1.0, 2.0, 3.0]; - - let result = vector.mul_matrix(&matrix).unwrap(); - - println!("Matrix: \n{}", matrix); - println!("Vector: \n{}", vector); - println!("Result: \n{}", result); + let bit_1 = qubit![(1.0, 2.0), (1.0, 2.0)]; + let bit_2 = qubit![(1.0, 2.0), (1.0, 2.0)]; + let register: QuantumRegister = quantum_register![bit_1, bit_2]; + println!("{}", register); } |
