ryankert01 opened a new pull request, #792:
URL: https://github.com/apache/mahout/pull/792
### Purpose of PR
The validation logic in `QuMat.execute_circuit` only raised an error when
**all** parameters were unbound. If a user bound only some parameters in a
multi-parameter circuit, validation passed and execution failed with
backend-specific errors.
```python
qumat.apply_rx_gate(0, "theta0")
qumat.apply_ry_gate(1, "phi1")
# Before: KeyError/NameError from backend
# After: ValueError("Circuit contains unbound parameters: ['phi1']...")
qumat.execute_circuit(parameter_values={"theta0": math.pi})
```
### Related Issues or PRs
Closes #780
### Changes Made
<!-- Please mark one with an "x" -->
- [x] Bug fix
- [ ] New feature
- [x] Refactoring
- [ ] Documentation
- [x] Test
- [ ] CI/CD pipeline
- [ ] Other
### Breaking Changes
<!-- Does this PR introduce a breaking change? -->
- [ ] Yes
- [x] No
### Checklist
<!-- Please mark each item with an "x" when complete -->
<!-- If not all items are complete, please open this as a **Draft PR**.
Once all requirements are met, mark as ready for review. -->
- [ ] Added or updated unit tests for all changes
- [ ] Added or updated documentation for all changes
- [ ] Successfully built and ran all unit tests or manual tests locally
- [ ] PR title follows "MAHOUT-XXX: Brief Description" format (if related to
an issue)
- [ ] Code follows ASF guidelines
--
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]