Encapsulate qsharp.estimate into Circuit#428
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the Python Circuit API by encapsulating Q# logical resource estimation behind a Circuit.estimate() method, avoiding direct access to internal _qsharp_factory fields (per #427).
Changes:
- Add
Circuit.estimate(params=None)to estimate resources from either Q# factory data or a QASM representation. - Add unit tests covering estimation from Q# factory, from QASM, and the error case when only QIR is available.
- Update the
state_prep_energyexample notebook to useCircuit.estimate()instead of callingqsharp.estimate(...)/qdk.openqasm.estimate(...)directly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| python/src/qdk_chemistry/data/circuit.py | Introduces Circuit.estimate() and routes estimation through Q# factory data or QASM. |
| python/tests/test_circuit.py | Adds tests validating the new Circuit.estimate() behavior and error handling. |
| examples/state_prep_energy.ipynb | Updates example usage to call Circuit.estimate() for improved UX. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Coverage Summary
Detailed Coverage ReportsC++ Coverage DetailsPython Coverage DetailsPybind11 Coverage Details |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #427