Howardisme opened a new pull request, #1112:
URL: https://github.com/apache/mahout/pull/1112
### Related Issues
Related to #1058
### Changes
- [ ] Bug fix
- [ ] New feature
- [ ] Refactoring
- [ ] Documentation
- [x] Test
- [ ] CI/CD pipeline
- [ ] Other
### Why
This PR improves the test coverage for the `qiskit_backend.py` module by
addressing few previously untested code paths.
and also improves some test coverage for all backends(cirq_backend.py,
amazon_braket_backend.py).
### How
Add unit tests covering:
* Backend Initialization (add test_qiskit_custom_simulator_fallback):
* Triggered the else block of initialize_backend using a mock setup
("simulator_type": "matrix_product_state"). Evaluates the correct propagation
of the configuration parameter through to the underlying AerSimulator.
* Circuit Visualization (add test_draw_circuit_returns_output):
* Validated the rendering function (draw_circuit) in multiple backend
configurations by creating class TestCircuitDrawing. Testing all backends as
well.
* Swap Operation (add test_apply_swap_gate):
* Tested the swap gate function (apply_swap_gate) by initiating state
(|10⟩ by a Pauli-X), executing apply_swap_gate, and then checked the operation
returned successfully in qumat execution contexts. Testing all backends as well.
Coverage Improve:
* qiskit_backend.py: 95% → 99%
* amazon_braket_backend.py: 99% → 100%
* cirq_backend.py: 93% → 97%
* qumat.py: 92% → 97%
## Checklist
- [x] Added or updated unit tests for all changes
- [ ] Added or updated documentation for all changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]