Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ProjectQ #18

Merged
merged 19 commits into from
Dec 22, 2021
Merged

Add ProjectQ #18

merged 19 commits into from
Dec 22, 2021

Conversation

mlazzarin
Copy link
Contributor

Add ProjectQ to our benchmark suite.

@mlazzarin mlazzarin added the enhancement New feature or request label Nov 23, 2021
@andrea-pasquale
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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 mlazzarin changed the base branch from libraries to randomtests December 21, 2021 10:51
@mlazzarin mlazzarin marked this pull request as ready for review December 21, 2021 11:01
@mlazzarin
Copy link
Contributor Author

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

Copy link
Member

@stavros11 stavros11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Otherwise, if you agree, I will merge #17 to libraries and implement the options mechanism to switch the fusion flag here.

@mlazzarin
Copy link
Contributor Author

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.

Copy link
Contributor

@andrea-pasquale andrea-pasquale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me.
I can also have a look at the U3 matrix.

@mlazzarin
Copy link
Contributor Author

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

@scarrazza scarrazza merged commit 1821de2 into randomtests Dec 22, 2021
@andrea-pasquale andrea-pasquale deleted the projectq branch April 10, 2023 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants