Open
Description
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.
Activity