Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.18 KB

readme.md

File metadata and controls

38 lines (30 loc) · 1.18 KB

your Rust Quantum Simulator in less of 200 lines of code

This is a very basic implementation of a Quantum Simulator in Rust to learn the basic components. Allow to create your Quantum circuits with the basic Quantum Gates, and you can execute it using plain rust

Components

  • Quantum Circuit Class:
    • Quantum Gates: x, rx, ry, rz, z, y, h, cx, m
  • Quanrtum Simulator Class:
    • imput: Qcircuit
    • outputs:
      • statevector
      • counts
      • memory

Example:

println!("crating a quantum circuit");
let mut qc =  QuantumCircuit::new(4);
qc.h(0);
qc.cx(0,1);
qc.x(1);
qc.rx(2,PI);
qc.z(0);

println!("executiing a quantum circuit");
let mut quantum_simulator =  QuantumSimulator::new(qc);
quantum_simulator.run();

TODO:

references

Inspired in MicroQiskit python implementation https://github.com/qiskit-community/MicroQiskit by James Wootton