Skip to content

Basic Quantum Simulator for Classical Developers 💻

Notifications You must be signed in to change notification settings

ismaelfaro/rust-quantum-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Basic Quantum Simulator for Classical Developers 💻

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages