Open antalszava opened 2 years ago
Doing
o1 = qml.PauliZ(1)
o2 = qml.prod(*[qml.Identity(0), qml.PauliZ(1)])
print(qml.grouping.utils.are_pauli_words_qwc([o1, o2]))
instead of
o1 = qml.PauliZ(1)
o2 = qml.prod(*[qml.PauliZ(1), qml.Identity(0)])
print(qml.grouping.utils.are_pauli_words_qwc([o1, o2]))
Outputs True
(as expected).
this will be addressed by the Pauli Word rework
Hasn't been addressed by the Pauli word rework, since we haven't gone back and updated the utilities. We will now re-prioritize this issue.
Expected behavior
qml.prod
works withqml.grouping.utils.are_pauli_words_qwc
.Actual behavior
Incorrect behaviour. Swapping the order of two ops passed to
qml.prod
changes to correct behaviour (perhaps due to the wire ordering changing).Additional information
No response
Source code
Tracebacks
No response
System information
Existing GitHub issues