qiboteam / qibojit-benchmarks

Benchmark code for qibojit performance accessment
Apache License 2.0
2 stars 3 forks source link

Add ProjectQ #18

Closed mlazzarin closed 2 years ago

mlazzarin commented 2 years ago

Add ProjectQ to our benchmark suite.

andrea-pasquale commented 2 years ago

Thanks @mlazzarin for fixing the transpose state. Are we supposed to do something else for this PR, maybe implement some missing gates, or we are good to go?

mlazzarin commented 2 years ago

We should double-check that our implementation is the optimal way of using ProjectQ, then enable gate fusion (once PR #17 is merged), finally we should run benchmarks and see if the results make sense somehow.

mlazzarin commented 2 years ago

We should double-check that our implementation is the optimal way of using ProjectQ, then enable gate fusion (once PR #17 is merged), finally we should run benchmarks and see if the results make sense somehow.

I added the LocalOptimizer compiler engine to the ProjectQ execution. Now I think that our implementation is optimal. I can't find a way to use gate fusion, though. I will post some benchmarks ASAP, so that we can merge.

mlazzarin commented 2 years ago

I found a way to add gate fusion. I think that we are ready for review.

mlazzarin commented 2 years ago

Thanks for the implementation, looks good. Do you know if ProjectQ allows defining an arbitrary gate from matrix? If yes, we could give a try defining the U3 and unlock the qv circuit which works for all other libraries. If no, I guess there is no simple solution other than decomposing the U3 to other rotation which is probably not fair in terms of benchmarks.

Yes, I'll give it a try.

mlazzarin commented 2 years ago

Now I merged the latest randomtests branch and I implemented some options for ProjectQ. Let me know if it's ok.