diff options
| author | hachem <im@hachem.wtf> | 2024-10-12 17:10:12 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2024-10-12 17:10:12 +0200 |
| commit | 64d6a8c70b8d61a22136fd10f0c61ec349315694 (patch) | |
| tree | 7eace7d8b31ea4c44617cf7f599f385aa69dc26a /examples | |
| parent | 483e9e6ce9fbb1440992e916ec743ce0eff0ab5a (diff) | |
Refactor 1: Numeric Traits
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/README.md | 12 | ||||
| -rw-r--r-- | examples/simple_gates/Cargo.toml | 8 | ||||
| -rw-r--r-- | examples/simple_gates/src/main.rs | 10 | ||||
| -rw-r--r-- | examples/visualizers/Cargo.toml | 8 | ||||
| -rw-r--r-- | examples/visualizers/src/main.rs | 14 |
5 files changed, 0 insertions, 52 deletions
diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 47cbfd5..0000000 --- a/examples/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Examples -In this directory, you will find a series of directories providing examples on how to use all the $\psi$ libraries. Since this entire project is based on workspaces, all you have to do use the following command: -```sh -$ cargo run -p [example name] -``` - -For instance: -```sh -$ cargo run -p simple_gates -$ cargo run -p visualizers -... -```
\ No newline at end of file diff --git a/examples/simple_gates/Cargo.toml b/examples/simple_gates/Cargo.toml deleted file mode 100644 index 503d31c..0000000 --- a/examples/simple_gates/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "simple_gates" -version = "0.1.0" -edition = "2021" - -[dependencies] -libpsi-core = { path = "../../libpsi-core" } -libpsi-visualizer = { path = "../../libpsi-visualizer" }
\ No newline at end of file diff --git a/examples/simple_gates/src/main.rs b/examples/simple_gates/src/main.rs deleted file mode 100644 index f48c935..0000000 --- a/examples/simple_gates/src/main.rs +++ /dev/null @@ -1,10 +0,0 @@ -use libpsi_core::*; - -fn main() { - let mut circuit = QuantumCircuit::new(2, 2); - circuit.apply(&gates::HADAMARD, &[], 0); - circuit.apply(&gates::CNOT, &[0], 1); - - let runtime = BasicRT::new(&circuit); - runtime.execute(1); -} diff --git a/examples/visualizers/Cargo.toml b/examples/visualizers/Cargo.toml deleted file mode 100644 index ab34ffe..0000000 --- a/examples/visualizers/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "visualizers" -version = "0.1.0" -edition = "2021" - -[dependencies] -libpsi-core = { path = "../../libpsi-core" } -libpsi-visualizer = { path = "../../libpsi-visualizer" }
\ No newline at end of file diff --git a/examples/visualizers/src/main.rs b/examples/visualizers/src/main.rs deleted file mode 100644 index d1fdb6e..0000000 --- a/examples/visualizers/src/main.rs +++ /dev/null @@ -1,14 +0,0 @@ -use libpsi_core::*; -use libpsi_visualizer::*; - -fn main() { - let mut circuit = QuantumCircuit::new(2, 2); - circuit.apply(&gates::HADAMARD, &[], 0); - circuit.apply(&gates::CNOT, &[0], 1); - - let mut visualizer = HorizontalCLIVisualizer::new(&circuit); - visualizer.render(); - - let runtime = BasicRT::new(&circuit); - runtime.execute(1024); -} |
