alisha-1000 opened a new pull request, #1082:
URL: https://github.com/apache/mahout/pull/1082
### Related Issues
Closes #1058
### Changes
- [x] Test
### Why
The current coverage for `qumat/amazon_braket_backend.py` was around ~90%.
This PR improves coverage to 99% by adding unit tests for previously
uncovered branches.
Improving coverage in backend modules increases reliability and ensures
correct handling of edge cases such as AWS session initialization and
parameter filtering.
### How
Added unit tests covering:
- Backend initialization:
- Local simulator
- Default simulator
- Unsupported simulator type fallback
- Region-based AWS session creation
- Gate helper wrappers (RX/RY/RZ/U and other single-qubit/multi-qubit gates)
- `execute_circuit`:
- With parameters
- Without parameters
- Parameter filtering logic
- `get_final_state_vector`:
- With parameters
- Without parameters
- Ensured state_vector() path is exercised
- `calculate_prob_zero` edge cases
Coverage impact:
- `amazon_braket_backend.py`: ~90% → 99%
## 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]