rqism 0.4.1

A multi-backend quantum circuit simulator
Documentation
# rqism
The manifestation of a dream where you do not have to install multiple scientific libraries
and deal with python dependency hell to implement a quantum algorithm.

## statuses of simulators
|                    | statevector | stabilizer  | MPS  |
|:-------------------|:------------:|:-----------:|:-----------:|
| single qubit gates ||||
| multi qubti gates  ||||
| measurement        ||||
| conditional instructions||||
| optimization       |     ✅*        |   ✅*          ||
|T1 amplitude damping||||
|noisey measurement  ||||
|depolarizing noise  ||||
| testing            |||       ❌*      |

✅: implemented

❌: not implemented

❓: as far as i know, this type of simulator is not supposed to do that

- MPS limitations are due to a lack of resources

- the only single-threaded stabilizer operation is random measurement (which is O(n^2)), single-threaded due to usage of unsafe raw pointers
to work around the borrow checker. multi-threading is possible, but will require finding a more proper solution to mutation limitations

- the statevector is sparse, parallelized, and implements some common gates as direct statevector modification, but it 
is still more suited for the gpu. however, i am not in the mood for compute shaders :) also, 
note that lazily evalutated kronecker products are a horrible idea (9 qubit QFT in 67 seconds instead of half a second)

## usage
[bell state using both stabilizer and statevector](./examples/bell.rs):
```rust
use rqism::prelude::*;

fn main() {
    let circuit = Circuit {
        ins: vec![
            Instruction::hadamard(0),
            Instruction::cnot([0, 1]),
            Instruction::MeasureState,
        ],
        n: 2,
    };

    let machine = QuantumStateVector::new(2);

    let counts = machine.get_counts(&circuit, 1000);

    println!("State vecotr:");
    counts.print_psi();

    let machine = Stabilizer::new(2);

    println!();

    let counts = machine.get_counts(&circuit, 1000);

    println!("Stabilizer:");
    counts.print_psi();
}
```

output: 

![output](https://dl.imgdrop.io/file/aed8b140-8472-4813-922b-7ce35ef93c9e/2025/04/01/Screenshot-from-2025-04-01-19-48-147a15d649db73e695.png)

## performance
tested on my i7-7700HQ

2. [20 qubit linear-depth GHZ state on the statevector simulator]benches/qft.rs takes an average of 44 nanoseconds to run.
1. [1000 qubit linear-depth GHZ state on the stabilizer simulator]benches/ghz.rs takes an average of 30 ms to run.