quriust

Crates.ioquriust
lib.rsquriust
version0.2.0
sourcesrc
created_at2023-12-20 22:19:07.46945
updated_at2024-02-01 10:09:02.779082
descriptionA Rust library to simulate a quantum computer. Only for quriust ones.
homepage
repositoryhttps://github.com/ScipioneParmigiano/quriust
max_upload_size
id1075938
size31,086
pietro_zanotta (ScipioneParmigiano)

documentation

README

Quriust

Just a quantum computing simulator in Rust for courious ones, built to run and learn some simple algorithms.

Installation

Add this library as a dependency in your Cargo.toml:

[dependencies]
quriust = "0.2.0"

Usage

Here's a basic example demonstrating how to use this library:

use quriust::registers::{ClassicalRegister, QuantumRegister};

// Create a new quantum register 
let classical_register: ClassicalRegister = ClassicalRegister::from_value(4, 1);
let mut register = QuantumRegister::new(&classical_register);
 
// Apply a Hadamard gate to the first qubit
register.h(1);
 
// Measure the register
let measurement = register.measure();
 
// Print the measurement outcome
println!("Measurement outcome: {:?}", measurement);

Documentation

For detailed usage instructions and API documentation, see the documentation.

Contributing

Quriust welcomes contributions from the community to enhance its features, improve performance, and fix bugs. If you're interested in contributing, feel free to submit pull requests with your improvements.

License

This library is licensed under the MIT License. See the LICENSE file for details.

Commit count: 21

cargo fmt