Open kevinsung opened 6 years ago
Yeah, ControlledGate is not particularly "smart". It can make a matrix for you, and that's about it.
This issue can genuinely be resolved once Cirq's simulator is upgraded and can simulate any KnownMatrixGate.
Ooh there might still be an advantage to keeping the classes though if we eventually want to define decompositions that respect nearest-neighbor interactions.
Also they can be simulated twice as fast, since you only need to affect half of the state vector, though this probably works best for qubits that represent areas of memory that are far apart (and of course we would have to implement the optimization in the first place).
They can inherit from ControlledGate and still override default_decompose() later.
Never mind, this wouldn't let me simulate the gates.