eclipse / xacc

XACC - eXtreme-scale Accelerator programming framework
https://xacc.readthedocs.io
BSD 3-Clause "New" or "Revised" License
163 stars 84 forks source link

Some improvements to C-U expansion #546

Closed 1tnguyen closed 2 years ago

1tnguyen commented 2 years ago

Adding the ability to recognize C-U on top of control-like native gates, such as CZ and CNOT, as well as another C-U composite.

For example, when seeing C-U on a CNOT, this is equivalent to C-U on X, whereby the control bit of CNOT is combined into the list of control bits in C-U.

Also, adding the option to skip the decomposition: e.g., when we use a simulator that can run C-U efficiently for many control bits.