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

Multi qubit gate support for unitary #263

Closed
MichaelBroughton opened this issue Jan 12, 2021 · 2 comments · Fixed by #266
Closed

Multi qubit gate support for unitary #263

MichaelBroughton opened this issue Jan 12, 2021 · 2 comments · Fixed by #266
Assignees

Comments

@MichaelBroughton
Copy link
Collaborator

MichaelBroughton commented Jan 12, 2021

In order to have full support for multi qubit control gates in tensorflow quantum, we need to be able to use multi qubit control gates in the unitary calculator: https://github.com/quantumlib/qsim/blob/master/lib/unitary_calculator_basic.h#L112 . Which is blocking us on: tensorflow/quantum#422 . It looks like now all of the gate application logic in simulator_***.cc is generated by code that writes these C++ functions now so it would be pretty hard for a human being to implement this in a consistent fashion without the scripts mentioned here #227 . @sergeisakov would you be able to implement the logic for multi qubit controlled gate application for the unitary calculator ?

@sergeisakov
Copy link
Collaborator

Yes, all of the gate application logic in simulator_***.cc is generated by a script. However, it doesn't have to be generated by a script. A generic version can be provided (with some performance loss for AVX* and perhaps for SSE) or function templates can be used (without performance loss). Code generation really makes sense only for AVX and AVX512 versions of the simulator. The unitary calculator has only a basic implementation and a generic multi-qubit gate application logic can be written by a human being without a script. I think I'm not the right person to do that.

@MichaelBroughton
Copy link
Collaborator Author

I think I'm not the right person to do that.

So as somebody who helps maintain this repo and is responsible for most of the major contributions by far, you think you aren't the person to do it :P ?

Either way, I can probably struggle my way through implementing this, if you really don't want to at any point. Would we prefer to do that instead ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants