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 ofPauliX
,PauliY
,PauliZ
, orIdentity
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'])]
code/api/pennylane.pauli.qwc_rotation
Download Python script
Download Notebook
View on GitHub