Skip to content

yoongun/qubit-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐰 qubit-rust

A single qubit simulation in Rust

How to use

Build it

First, build the project

cargo build

then run the program with the command below.

./target/debug/qubit-rust

Or more simply, run it directly

cargo run

The simulation of a qubit which is initialized with the Hadamarad gate will be measured 1000 times and show you a result on the screen.

Run the test

There are tests for

  • Initialize a qubit with |0> state
  • Measuring the qubit and get a proper result
  • Check whether a measurement induces collapse of state to the qubit

You can test these with the command below.

cargo test

Releases

No releases published

Packages

No packages published

Languages