QVNT
Advanced quantum computation simulator, written in Rust
Features
- Ability to simulate up to 64 qubits. Common machine with 4-16 Gb of RAM is able to simulate 26-28 qubits, which is enough for several study cases;
- Required set of 1- or 2-qubits operations to build your own quantum circuits;
- Quantum operations are tested and debugged to be safe in use;
- Circuit execution is accelerated using multithreading Rayon library;
- Complex quantum registers manipulations: tensor product of two registers and aliases for qubit to simplify interaction with register.
Usage
use *;
// create quantum register, called 'x', with 10 qubits
let mut q_reg = new.alias_char;
// or with initial state, where 3 qubits are already in state |1>
// let q_reg = QReg::new(10).alias_char('x').init_state(0b0011100000);
// get virtual register 'x', to interact with specified qubits
let x = q_reg.get_vreg_by_char.unwrap;
// create qft operation, acting on first 5 qubits in q_reg
let op = qft;
// apply operation
q_reg.apply;
// measure and write first 3 qubit, which leads to collapse of q_reg wave function
println!;
Implemented operations
- 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 and Hadamard Transform;
- Universal U1, U2 and U3 operators;
ALL operators have inverse versions, accessing by .dgr() method:
let usual_op = s;
// Inverse S operator
let inverse_op = s.dgr;
Also, ALL these operators could be turned into controlled ones, using .c(...) method:
let usual_op = x;
// NOT gate, controlled by 2 qubits, aka CCNOT gate, aka Toffoli gate
let controlled_op = x.c;
In work
- Optimizing and vectorizing operations.
- Writing documentation for all modules.