sankshi opened a new pull request, #635: URL: https://github.com/apache/mahout/pull/635
### Purpose of PR <!-- Describe what this PR does. --> This PR fixes a measurement-handling bug in execute_circuit() where the backend incorrectly checks circuit.cregs to determine whether measurements already exist. This caused duplicate measurement operations to be added when execute_circuit() was called multiple times on the same circuit, producing invalid results. The fix ensures that the code checks for actual measurement operations in the circuit data before adding new measurements. ### Related Issues or PRs <!-- Add links to related issues or PRs. --> <!-- - Closes #123 --> <!-- - Related to #123 --> #632 – [Bug] get_final_state_vector fails with measurements ### Changes Made <!-- Please mark one with an "x" --> - [ x] Bug fix - [ ] New feature - [ ] Refactoring - [ ] Documentation - [ ] 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 - [x ] 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) - [ x] 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]
