def METHOD_NAME(self):
    """Test calculating evolution gradient."""
    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()
    bound_evolution_gradient = var_principle.evolution_gradient(
        observable, ansatz, list(param_dict.values()), parameters
    )
    expected_evolution_gradient = [
        (0.19308934095957098 - 1.4e-17j),
        (0.007027674650099142 - 0j),
        (0.03192524520091862 - 0j),
        (-0.06810314606309673 - 1e-18j),
        (0.07590371669521798 - 7e-18j),
        (0.11891968269385343 + 1.5e-18j),
        (-0.0012030273438232639 + 0j),
        (-0.049885258804562266 + 1.8500000000000002e-17j),
        (-0.20178860797540302 - 5e-19j),
        (-0.0052269232310933195 + 1e-18j),
        (0.022892905637005266 - 3e-18j),
        (-0.022892905637005294 + 3.5e-18j),
    ]
    np.testing.assert_almost_equal(bound_evolution_gradient, expected_evolution_gradient)