qml.ops.qubit.attributes.has_unitary_generator¶
- has_unitary_generator = {'DoubleExcitationMinus', 'DoubleExcitationPlus', 'GlobalPhase', 'IsingXX', 'IsingYY', 'IsingZZ', 'MultiRZ', 'PCPhase', 'PauliRot', 'RX', 'RY', 'RZ', 'SingleExcitationMinus', 'SingleExcitationPlus'}¶
Operations that are generated by a unitary operator.
For example, the generator of
qml.RZ
is Pauli \(Z\) with a prefactor of \(-1/2\), and Pauli \(Z\) is unitary. Contrary, the generator ofqml.PhaseShift
isnp.array([[0, 0], [0, 1]])
with a prefactor of 1, which is not unitary. This attribute is used for decompositions in algorithms using the Hadamard test likeqml.metric_tensor
when used without approximation.- Type
code/api/pennylane.ops.qubit.attributes.has_unitary_generator
Download Python script
Download Notebook
View on GitHub