Renmusxd / RustQIP

Quantum computing using rust. Efficient and a borrow-checked no cloning theorem!
https://docs.rs/qip/
MIT License
223 stars 18 forks source link

Allow the `program!` macro to pass arguments to the gates. #33

Closed Renmusxd closed 2 years ago

Renmusxd commented 2 years ago

Would allow for calls which pass arguments on to the gate creating functions:

program!(&mut b, r,
    rz(pi/2.0) r;
    control(0) rz(pi) r[0] r[1]
)

POC in branch program_args which only allows a single argument to be passed. Argument lists would increase complexity significantly.

For use case see #31

Renmusxd commented 2 years ago

First iteration done in 02db6cc3738f0723483953c13d2b90ac734ef940 and 32044a5c73fba36e01f0103c8d775398b0b1049c. Only single arg currently allowed.

Renmusxd commented 2 years ago

Invalidated with #39