def METHOD_NAME(self):
    """Test the VQE on QASM simulator."""
    optimizer = SPSA(maxiter=300, last_avg=5)
    wavefunction = TwoLocal(rotation_blocks="ry", entanglement_blocks="cz")
    with self.assertWarns(DeprecationWarning):
        h2_op = (
            -1.052373245772859 * (I ^ I)
            + 0.39793742484318045 * (I ^ Z)
            - 0.39793742484318045 * (Z ^ I)
            - 0.01128010425623538 * (Z ^ Z)
            + 0.18093119978423156 * (X ^ X)
        )
        qasm_simulator = QuantumInstance(
            self._qasm, shots=1024, seed_simulator=self.seed, seed_transpiler=self.seed
        )
    with self.assertWarns(DeprecationWarning):
        vqe = VQE(
            ansatz=wavefunction,
            optimizer=optimizer,
            max_evals_grouped=1,
            quantum_instance=qasm_simulator,
        )
        result = vqe.compute_minimum_eigenvalue(operator=h2_op)
    self.assertAlmostEqual(result.eigenvalue.real, -1.86, delta=0.05)