Draft
Conversation
added 2 commits
March 9, 2026 16:22
📊 Coverage Summary
Detailed Coverage ReportsC++ Coverage DetailsPython Coverage DetailsPybind11 Coverage Details |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for representing Q#-generated circuits via “factory data” in the Circuit data model, enabling lazy compilation to QIR / Q# circuit objects and updating several algorithms to return factory-backed Circuit instances instead of eagerly compiling QIR/Q#.
Changes:
- Extend
Circuitwith aqsharp_factoryfield and compile/cache QIR / Q# circuits on-demand from that factory data. - Update controlled time-evolution, sparse isometry state preparation, and iterative phase estimation to return
Circuit(qsharp_factory=..., ...)rather than precompiledqir/qsharp. - Adjust QASM/Qiskit conversion pathways to use the newly compiled QIR when factory data is present.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| python/src/qdk_chemistry/data/circuit.py | Adds qsharp_factory support and lazy compilation/caching to QIR and Q# circuit objects; updates conversion logic. |
| python/src/qdk_chemistry/algorithms/time_evolution/controlled_circuit_mapper/pauli_sequence_mapper.py | Switches controlled evolution circuit creation to return factory-backed Circuit instead of eager QIR/Q# compilation. |
| python/src/qdk_chemistry/algorithms/state_preparation/sparse_isometry.py | Switches state-prep circuit creation to factory-backed Circuit (lazy compilation) and removes eager compilation paths. |
| python/src/qdk_chemistry/algorithms/phase_estimation/iterative_phase_estimation.py | Switches IQPE iteration circuit creation to factory-backed Circuit instead of eager QIR/Q# compilation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.