Skip to content

Commit

Permalink
Replace test.python.algorithms with test
Browse files Browse the repository at this point in the history
  • Loading branch information
ElePT committed Jul 17, 2023
1 parent 40e3fb3 commit d535317
Show file tree
Hide file tree
Showing 51 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion test/eigensolvers/test_numpy_eigensolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test NumPyEigensolver"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

import numpy as np
from ddt import data, ddt
Expand Down
2 changes: 1 addition & 1 deletion test/eigensolvers/test_vqd.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test VQD"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

import numpy as np
from ddt import data, ddt
Expand Down
2 changes: 1 addition & 1 deletion test/evolvers/test_evolution_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""Test evolver problem class."""
import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from ddt import data, ddt, unpack
from numpy.testing import assert_raises

Expand Down
2 changes: 1 addition & 1 deletion test/evolvers/test_evolution_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"""Class for testing evolution result."""
import unittest

from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from qiskit_algorithms.evolvers.evolution_result import EvolutionResult
from qiskit.opflow import Zero

Expand Down
2 changes: 1 addition & 1 deletion test/minimum_eigensolvers/test_adapt_vqe.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test of the AdaptVQE minimum eigensolver"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

from ddt import ddt, data, unpack

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test NumPy minimum eigensolver"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

import numpy as np
from ddt import ddt, data
Expand Down
2 changes: 1 addition & 1 deletion test/minimum_eigensolvers/test_qaoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import unittest
from functools import partial
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

import numpy as np
import rustworkx as rx
Expand Down
2 changes: 1 addition & 1 deletion test/minimum_eigensolvers/test_qaoa_opflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test the QAOA algorithm with opflow."""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

from functools import partial
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion test/minimum_eigensolvers/test_sampling_vqe.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import unittest
from functools import partial
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

import numpy as np
from ddt import data, ddt
Expand Down
2 changes: 1 addition & 1 deletion test/minimum_eigensolvers/test_vqe.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test the variational quantum eigensolver algorithm."""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

from functools import partial
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion test/optimizers/test_gradient_descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""Tests for the Gradient Descent optimizer."""

from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
import numpy as np
from qiskit_algorithms.optimizers import GradientDescent, GradientDescentState
from qiskit_algorithms.optimizers.steppable_optimizer import TellData, AskData
Expand Down
2 changes: 1 addition & 1 deletion test/optimizers/test_optimizer_aqgd.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test of AQGD optimizer"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from qiskit.circuit.library import RealAmplitudes
from qiskit.utils import QuantumInstance, algorithm_globals, optionals
from qiskit.opflow import PauliSumOp
Expand Down
2 changes: 1 addition & 1 deletion test/optimizers/test_optimizer_nft.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test of NFT optimizer"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from qiskit import BasicAer
from qiskit.circuit.library import RealAmplitudes
from qiskit.utils import QuantumInstance, algorithm_globals
Expand Down
2 changes: 1 addition & 1 deletion test/optimizers/test_optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test Optimizers"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

from typing import Optional, List, Tuple
from ddt import ddt, data, unpack
Expand Down
2 changes: 1 addition & 1 deletion test/optimizers/test_optimizers_scikitquant.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test of scikit-quant optimizers."""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

from ddt import ddt, data, unpack

Expand Down
2 changes: 1 addition & 1 deletion test/optimizers/test_spsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""Tests for the SPSA optimizer."""

from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from ddt import ddt, data

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion test/optimizers/test_umda.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""Tests for the UMDA optimizer."""

from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

import numpy as np
from scipy.optimize import rosen
Expand Down
2 changes: 1 addition & 1 deletion test/optimizers/utils/test_learning_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""Tests for LearningRate."""

from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
import numpy as np
from qiskit_algorithms.optimizers.optimizer_utils import LearningRate

Expand Down
2 changes: 1 addition & 1 deletion test/test_amplitude_estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test the quantum amplitude estimation algorithm."""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
import numpy as np
from ddt import ddt, idata, data, unpack
from qiskit import QuantumRegister, QuantumCircuit, BasicAer
Expand Down
2 changes: 1 addition & 1 deletion test/test_aux_ops_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import unittest
from typing import Tuple, Union

from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
import numpy as np
from ddt import ddt, data

Expand Down
2 changes: 1 addition & 1 deletion test/test_backendv1.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test Providers that support BackendV1 interface"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from qiskit import QuantumCircuit
from qiskit.providers.fake_provider import FakeProvider
from qiskit.utils import QuantumInstance, algorithm_globals
Expand Down
2 changes: 1 addition & 1 deletion test/test_backendv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test Providers that support BackendV2 interface"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from qiskit import QuantumCircuit
from qiskit.providers.fake_provider import FakeProvider
from qiskit.providers.fake_provider.fake_backend_v2 import FakeBackendSimple
Expand Down
2 changes: 1 addition & 1 deletion test/test_entangler_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import unittest

from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from qiskit.utils import get_entangler_map, validate_entangler_map


Expand Down
2 changes: 1 addition & 1 deletion test/test_grover.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import itertools
import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

import numpy as np
from ddt import data, ddt, idata, unpack
Expand Down
2 changes: 1 addition & 1 deletion test/test_measure_error_mitigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test Measurement Error Mitigation"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from ddt import ddt, data, unpack
import numpy as np
import rustworkx as rx
Expand Down
2 changes: 1 addition & 1 deletion test/test_numpy_eigen_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test NumPy Eigen solver"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

import numpy as np
from ddt import data, ddt
Expand Down
2 changes: 1 addition & 1 deletion test/test_numpy_minimum_eigen_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test NumPy Minimum Eigensolver"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

import numpy as np
from ddt import ddt, data
Expand Down
2 changes: 1 addition & 1 deletion test/test_observables_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import unittest
from typing import Tuple

from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
import numpy as np
from ddt import ddt, data

Expand Down
2 changes: 1 addition & 1 deletion test/test_phase_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test phase estimation"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from ddt import ddt, data, unpack
import numpy as np
from qiskit.circuit.library import ZGate, XGate, HGate, IGate
Expand Down
2 changes: 1 addition & 1 deletion test/test_qaoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test QAOA"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

from functools import partial
import math
Expand Down
2 changes: 1 addition & 1 deletion test/test_skip_qobj_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test Skip Qobj Validation"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer
from qiskit.utils import QuantumInstance
Expand Down
2 changes: 1 addition & 1 deletion test/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import unittest

from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from qiskit.utils.validation import (
validate_in_set,
validate_min,
Expand Down
2 changes: 1 addition & 1 deletion test/test_vqd.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test VQD"""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

import numpy as np
from ddt import data, ddt, unpack
Expand Down
2 changes: 1 addition & 1 deletion test/test_vqe.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import logging
import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from test.python.transpiler._dummy_passes import DummyAP

from functools import partial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""Test Classical Imaginary Evolver."""
import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from ddt import data, ddt, unpack
import numpy as np
from qiskit_algorithms.time_evolvers.time_evolution_problem import TimeEvolutionProblem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""Test Classical Real Evolver."""
import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from ddt import data, ddt, unpack
import numpy as np
from qiskit import QuantumCircuit, QuantumRegister
Expand Down
2 changes: 1 addition & 1 deletion test/time_evolvers/test_pvqd.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""Tests for PVQD."""
import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from functools import partial

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion test/time_evolvers/test_time_evolution_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""Test evolver problem class."""
import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from ddt import data, ddt
from numpy.testing import assert_raises
from qiskit import QuantumCircuit
Expand Down
2 changes: 1 addition & 1 deletion test/time_evolvers/test_time_evolution_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# that they have been altered from the originals.
"""Class for testing evolution result."""
import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from qiskit_algorithms import TimeEvolutionResult
from qiskit.opflow import Zero

Expand Down
2 changes: 1 addition & 1 deletion test/time_evolvers/test_trotter_qrte.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test TrotterQRTE."""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from ddt import ddt, data, unpack
import numpy as np
from scipy.linalg import expm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test Forward Euler solver."""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
import numpy as np
from ddt import ddt, data, unpack
from scipy.integrate import solve_ivp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import unittest

from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
import numpy as np
from qiskit.quantum_info import SparsePauliOp
from qiskit.circuit import Parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Test solver of ODEs."""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase
from ddt import ddt, data, unpack
import numpy as np

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"""Test solver of linear equations."""

import unittest
from test.python.algorithms import QiskitAlgorithmsTestCase
from test import QiskitAlgorithmsTestCase

# fmt: off
from test.python.algorithms.time_evolvers.variational.solvers.expected_results.\
from test.time_evolvers.variational.solvers.expected_results.\
test_varqte_linear_solver_expected_1 import expected_metric_res_1
# fmt: on

Expand Down
Loading

0 comments on commit d535317

Please sign in to comment.