Decomposing RXXX into {RX, RZ, H, CNOT}

Hello,

I am trying to decompose RXXX into gates from {RX, RZ, H, CNOT}, but couldn’t find a lot of resources online.

I am trying to use compute_decomposition, but I don’t know why I have to specify a theta or pauliwords to do the decomposition. Shouldn’t it just give back a decomposition without any additional information?

Any help is appeciated, thanks!

qml.PauliRot(-6.25, 'XXX', wires=[0, 1, 2]).compute_decomposition(-6.25, wires=[0, 1, 2], pauli_word='Y')

Hello @Jacky_Jiang !

Unfortunately, the problem of decomposing gates is not trivial. compute_decomposition provides preset decompositions that are known for certain gates. RXXX does not have a well-known decomposition and as such, it’s not hard coded in the back end.

Sorry we can’t be of more help here,

Alvaro

1 Like

I am trying to use compute_decomposition, but I don’t know why I have to specify a theta or pauliwords to do the decomposition.

@Jacky_Jiang, I’m curious what your use case is here. Would you like to just look at the decomposition of PauliRot to see how it’s done? Or do you have a need for a symbolic representation of the decomposition?