The qiskit test suite should be integrated into the qiskit module. This would ease the integration of qiskit into more exotic hardware (see the qiskit-on-raspberry project for an example).
This should preferably be implemented without changing the current testing functionality or without having to rewrite any of the tests.
This can be done by moving the testes from the "external" (external to the qiskit module) test folder and move them into the module itself. To be consistent the best solution would probably be to let every module and submodule handle their tests. That is split up the existing test directory and distribute it over the modules. To make the tests runnable from python without having to implement the functionality in every module/submodule a top-level tester class can be utilized to let modules register that they are testable and let it handle it. This also allows for easy and consistent migration and behavior for all other qiskit elements. I have made a minimal example of how this would look, which can be found here.
Furthermore, I have completed the test migration on a local copy of qiskit-terra (with surprising ease) and plan to implement the top-level tester class shortly, as proof of concept. This repo can be made available on request.
What is the expected enhancement?
The qiskit test suite should be integrated into the qiskit module. This would ease the integration of qiskit into more exotic hardware (see the qiskit-on-raspberry project for an example).
Examples of functionality would be
to run the full test suite, or
to test only the circuits submodule.
This should preferably be implemented without changing the current testing functionality or without having to rewrite any of the tests.
This can be done by moving the testes from the "external" (external to the qiskit module) test folder and move them into the module itself. To be consistent the best solution would probably be to let every module and submodule handle their tests. That is split up the existing test directory and distribute it over the modules. To make the tests runnable from python without having to implement the functionality in every module/submodule a top-level tester class can be utilized to let modules register that they are testable and let it handle it. This also allows for easy and consistent migration and behavior for all other qiskit elements. I have made a minimal example of how this would look, which can be found here.
Furthermore, I have completed the test migration on a local copy of qiskit-terra (with surprising ease) and plan to implement the top-level tester class shortly, as proof of concept. This repo can be made available on request.