qml.ops.qubit.attributes.has_unitary_generator

has_unitary_generator = {'DoubleExcitationMinus', 'DoubleExcitationPlus', 'IsingXX', 'IsingYY', 'IsingZZ', 'MultiRZ', '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 of qml.PhaseShift is np.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 like qml.metric_tensor when used without approximation.

Type

Attribute