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

Circuit evaluation of SWAP and controlled operations with multiple controls and/or multiple targets. #18

Open
stewdio opened this issue Apr 30, 2020 · 0 comments
Labels
Enhancement New feature or request Help wanted Extra attention is needed Q.Circuit

Comments

@stewdio
Copy link
Owner

stewdio commented Apr 30, 2020

Currently Q.Circuit.evaluate does not correctly handle SWAP operations. (Thankfully, a SWAP gate can be emulated by three zippered CNOT gates instead.) And we’re also not correctly handling controlled operations that have more than one control or more than one target.

Both issues are tied together. Currently we assume component #0 of a multi-register gate is the control and subsequent components are the targets. This means a SWAP operation is interpreted as being a controlled operation of type SWAP. This is unintended.

We’re going to have to rethink how we designate what is a control and what is a target.

@stewdio stewdio added Enhancement New feature or request Help wanted Extra attention is needed Q.Circuit labels Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Help wanted Extra attention is needed Q.Circuit
Projects
None yet
Development

No branches or pull requests

1 participant