qml.pauli.qwc_rotation

qwc_rotation(pauli_operators)[source]

Performs circuit implementation of diagonalizing unitary for a Pauli word.

Parameters

pauli_operators (list[Union[PauliX, PauliY, PauliZ, Identity]]) – Single-qubit Pauli operations. No Pauli operations in this list may be acting on the same wire.

Raises

TypeError – if any elements of pauli_operators are not instances of PauliX, PauliY, PauliZ, or Identity

Example

>>> pauli_operators = [qml.X('a'), qml.Y('b'), qml.Z('c')]
>>> qwc_rotation(pauli_operators)
[RY(-1.5707963267948966, wires=['a']), RX(1.5707963267948966, wires=['b'])]