For each backend supported in Apache Mahout, the testing suite executes an example circuit using the qumat implementation of the backend, and then executes the same example circuit using the backend's native implementation. The test then checks that the resulting final state vectors are the same.
The testing suite is run using pytest, which is installed by default using poetry. To run the tests, simply run
# Run all tests poetry run pytest # Run with verbose output poetry run pytest -v
Create testing/my-new-backend_helpers.py with:
get_qumat_backend_config() function which returns the qumat backend config needed for the qumat implementation of my-new-backendget_native_example_final_state_vector() function which builds and executes the example circuit using the native implementation of my-new-backendAdd "my-new-backend" to testing_backends fixture in conftest.py