def METHOD_NAME(self):
    """Tests that an error is raised if the generator of an Evolution operator is requested
    with a non-zero complex term in the operator parameter."""
    param = 1 + 2.5j
    op = Evolution(qml.PauliZ(0), param)
    with pytest.raises(
        qml.operation.GeneratorUndefinedError,
        match="is not imaginary; the expected format is exp",
    ):
        _ = op.generator()