quaru 0.2.0

A quantum computer simulator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::path::Path;
use quaru::openqasm;

fn main() {
    let example_dir = Path::new(file!()).parent().unwrap();
    let qasm_path = example_dir.join(Path::new("openqasm_example.qasm"));

    let registers = openqasm::run_openqasm(&qasm_path).ok().unwrap();

    for (name, qreg) in registers.qregs {
        println!("\nQuatnum register: {}", name);
        qreg.print_probabilities();
        println!();
    }
}