catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Contextual decomposition strategy to improve differentiability

Open erick-xanadu opened this issue 1 year ago • 0 comments

Issue description

  • Expected behavior: QubitUnitary for gates with more than 2 qubits is not differentiable using Enzyme. This means that programs that transform gates to QubitUnitary cannot be differentiated. However, it is possible to differentiate these programs if instead of transforming gates to QubitUnitary they are decomposed to other gates.

  • Actual behavior: The decomposition strategy right now is indeed to decompose as much as possible without changing them to QubitUnitary, but once matrix gates are used, some gates will be changed to QubitUnitary.

erick-xanadu avatar Dec 06 '23 23:12 erick-xanadu