Skip to content

Commit

Permalink
Extend documentation
Browse files Browse the repository at this point in the history
Signed-off-by: MucTepDayH16 <[email protected]>
  • Loading branch information
MucTepDayH16 committed May 31, 2021
1 parent 64d62ba commit c4abd9d
Show file tree
Hide file tree
Showing 5 changed files with 295 additions and 52 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qvnt"
version = "0.1.2"
version = "0.2.0"
authors = ["Denis Drozhzhin <[email protected]>"]
edition = "2018"
repository = "https://github.com/MucTepDayH16/qvnt/"
Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ Advansed quantum computation simulator, written in *Rust*
___
## Features
1. Ability to simulate up to 64 qubits, which is a limit for 64-bits machines.
But usual machine (with 4Gb RAM) only allowed to run 26 qubits, which is enough for study cases.
2. A set of necessary 1- or 2-qubits operations, including general 1x1 and 2x2 unitary matrix, to build your own quantum circuits.
3. Existed quantum operations are tested and debugged to be safe in use.
4. Accelerated circuit execution using multithreaded *Rayon* library.
5. Complex quantum registers manipulations: tensor product of two registers and aliases for qubit to *humanify* interaction with register
But usual machine (with 4Gb RAM) only allowed to run 26 qubits, which is enough for study cases;
2. A set of necessary 1- or 2-qubits operations, including general 1x1 and 2x2 unitary matrix, to build your own quantum circuits;
3. Existed quantum operations are tested and debugged to be safe in use;
4. Accelerated circuit execution using multithreaded *Rayon* library;
5. Complex quantum registers manipulations: tensor product of two registers and aliases for qubit to *humanify* interaction with register.

___
## Usage
Expand All @@ -34,13 +34,14 @@ println!("{}", q_reg.measure_mask(x[0] | x[1] | x[2]));

___
## Implemented operations
* Pauli's *X*, *Y* & *Z* operators;
* Phase shift operator;
* 1-qubit rotation operators;
* 2-qubits rotation operators, *aka* Ising gates;
* *SWAP*, *iSWAP* operators and square rooted ones;
* *QFT* with and without swapping qubits after applying;
* General unitary operators, constructed from 2x2 or 4x4 complex matrices;
* Pauli's *X*, *Y* & *Z* operators;
* *S* & *T* operators;
* Phase shift operator;
* 1-qubit rotation operators;
* 2-qubits rotation operators, *aka* Ising coupling gates;
* *SWAP*, *iSWAP* operators and square rooted ones;
* Quantum Fourier Transform;
* Universal *U3* operator.

Also, __ALL__ these operators could be turned into controlled ones, using ```.c(...)``` syntax:
```rust
Expand All @@ -53,3 +54,4 @@ ___
## In work
1. Optimizing and vectorizing operations.
2. Adding inverse operators for implemented ones.
3. Writing documentation for all functions.
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ pub mod prelude {
pub use super::operator::Op;
pub use super::register::{VReg, QReg};
pub use super::threads::qvnt_num_threads;

pub mod consts {
pub const _1: crate::types::C = crate::types::C{ re: 1.0, im: 0.0 };
pub const _0: crate::types::C = crate::types::C{ re: 0.0, im: 0.0 };
pub const _i: crate::types::C = crate::types::C{ re: 0.0, im: 1.0 };

pub const SQRT_1_2: crate::types::R = crate::types::SQRT_2 * 0.5;
}
}

pub mod operator;
Expand Down
Loading

0 comments on commit c4abd9d

Please sign in to comment.