use get_aer_backend for unit tests
@@ -20,7 +20,7 @@ import unittest
import numpy as np
from parameterized import parameterized
-from qiskit import BasicAer
+from qiskit_aqua import get_aer_backend
from qiskit_aqua.algorithms import AmplitudeEstimation
from qiskit_aqua.components.uncertainty_problems import EuropeanCallExpectedValue, EuropeanCallDelta, FixedIncomeExpectedValue
from qiskit_aqua.components.random_distributions import LogNormalDistribution, MultivariateNormalDistribution
@@ -79,7 +79,7 @@ class TestEuropeanCallOption(QiskitAquaTestCase):
ae = AmplitudeEstimation(m, european_call)
# run simulation
- result = ae.run(quantum_instance=BasicAer.get_backend(simulator))
+ result = ae.run(quantum_instance=get_aer_backend(simulator))
# compare to precomputed solution
self.assertEqual(0.0, np.round(result['estimation'] - 0.045705353233, decimals=4))
@@ -129,7 +129,7 @@ class TestEuropeanCallOption(QiskitAquaTestCase):
ae = AmplitudeEstimation(m, european_call_delta)
# run simulation
- result = ae.run(quantum_instance=BasicAer.get_backend(simulator))
+ result = ae.run(quantum_instance=get_aer_backend(simulator))
# compare to precomputed solution
self.assertEqual(0.0, np.round(result['estimation'] - 0.5000, decimals=4))
@@ -175,7 +175,7 @@ class TestFixedIncomeAssets(QiskitAquaTestCase):
ae = AmplitudeEstimation(m, fixed_income)
# run simulation
- result = ae.run(quantum_instance=BasicAer.get_backend('statevector_simulator'))
+ result = ae.run(quantum_instance=get_aer_backend('statevector_simulator'))
# compare to precomputed solution
self.assertEqual(0.0, np.round(result['estimation'] - 2.4600, decimals=4))
