Separate QPE circuit builder with simulator#471
Open
YingrongChen wants to merge 15 commits into
Open
Conversation
📊 Coverage Summary
Detailed Coverage ReportsC++ Coverage DetailsPython Coverage DetailsPybind11 Coverage Details |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR separates QPE circuit construction from phase-estimation execution by adding reusable QPE circuit builder abstractions and wiring them into iterative and Qiskit standard phase estimation.
Changes:
- Added a
qpe_circuit_builderalgorithm type with base settings/factory support. - Moved IQPE circuit construction into
IterativeQpeCircuitBuilder. - Added and registered
QiskitStandardQpeCircuitBuilder, with phase-estimation algorithms delegating circuit generation to builders.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
python/tests/test_phase_estimation_iterative.py |
Updates IQPE tests for the new iterative circuit builder. |
python/tests/test_interop_qiskit_phase_estimation_standard.py |
Adds Qiskit standard builder coverage and updates mocking. |
python/src/qdk_chemistry/plugins/qiskit/standard_phase_estimation.py |
Splits standard QPE circuit building from execution. |
python/src/qdk_chemistry/plugins/qiskit/__init__.py |
Registers the Qiskit standard QPE builder plugin. |
python/src/qdk_chemistry/algorithms/registry.py |
Registers the QPE circuit builder factory and iterative builder. |
python/src/qdk_chemistry/algorithms/phase_estimation/iterative_phase_estimation.py |
Delegates IQPE circuit generation to the new builder. |
python/src/qdk_chemistry/algorithms/phase_estimation/circuit_builder/iterative_builder.py |
Adds the iterative QPE circuit builder implementation. |
python/src/qdk_chemistry/algorithms/phase_estimation/circuit_builder/base.py |
Adds QPE circuit builder base classes, settings, and factory. |
python/src/qdk_chemistry/algorithms/phase_estimation/circuit_builder/__init__.py |
Adds the circuit builder package export. |
python/src/qdk_chemistry/algorithms/phase_estimation/base.py |
Removes controlled-circuit construction from the phase-estimation base. |
python/src/qdk_chemistry/algorithms/__init__.py |
Exposes the new QpeCircuitBuilder base class. |
Comments suppressed due to low confidence (1)
python/tests/test_phase_estimation_iterative.py:691
- This variable is an
IterativeQpeCircuitBuilder, not an IQPE algorithm instance. A builder-specific name would avoid confusion in a test that is explicitly validating the new separated builder.
iqpe = IterativeQpeCircuitBuilder(num_bits=5, num_iteration=0)
iqpe.settings().set(
💡 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 |
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.