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

Examples PR 3: Grovers example #43

Open kris524 opened 2 years ago

kris524 commented 2 years ago

Old example is here

kris524 commented 2 years ago

I only don't know what to replace run_local with

Renmusxd commented 2 years ago

run_local is a function that just runs the circuit through a specific backend, in this case the "local" one. Now that functionality is in the CircuitBuilder with the calculate_state function, or calculate_state_with_init if you want to provide an initial state. See the examples in the README for details.

kris524 commented 2 years ago

I wanted to ask, could you give me an additional perspective/info on the project. Is there something similar from IBM or Google code-wise that you can compare it to? Maybe point me to the simplest example we have? (is it simple.rs?) Or maybe a paper that's relevant?

Renmusxd commented 2 years ago

Sorry about the delay, I've been heavily invested into a work project this month so open source projects are going slowly.

Code wise I don't know how to compare this to qiskit or cirq, I haven't contributed to either project. This aims to be a circuit manipulation and simulation library, and maybe down the line add some transpiling code. I'd say the README has the simplest code examples of the overarching api goals and thought process. The idea is to leverage the borrow checker to provide some safety that python and c++ libraries cannot. Does this help?