def METHOD_NAME(self):
    """Test ODE function generator."""
    observable = SparsePauliOp.from_list(
        [
            ("II", 0.2252),
            ("ZZ", 0.5716),
            ("IZ", 0.3435),
            ("ZI", -0.4347),
            ("YY", 0.091),
            ("XX", 0.091),
        ]
    )
    d = 2
    ansatz = EfficientSU2(observable.num_qubits, reps=d)
    # Define a set of initial parameters
    parameters = list(ansatz.parameters)
    param_dict = {param: np.pi / 4 for param in parameters}
    var_principle = ImaginaryMcLachlanPrinciple()
    t_param = None
    linear_solver = None
    linear_solver = VarQTELinearSolver(
        var_principle,
        observable,
        ansatz,
        parameters,
        t_param,
        linear_solver,
    )
    time = 2
    ode_function_generator = OdeFunction(linear_solver, t_param=None, param_dict=param_dict)
    qte_ode_function = ode_function_generator.var_qte_ode_function(time, param_dict.values())
    expected_qte_ode_function = [
        0.442145,
        -0.022081,
        0.106223,
        -0.117468,
        0.251233,
        0.321256,
        -0.062728,
        -0.036209,
        -0.509219,
        -0.183459,
        -0.050739,
        -0.093163,
    ]
    np.testing.assert_array_almost_equal(expected_qte_ode_function, qte_ode_function)