make simulator native target respect noise_model for gate selection#240
Open
dlyongemallo wants to merge 1 commit intoqiskit-community:mainfrom
Open
make simulator native target respect noise_model for gate selection#240dlyongemallo wants to merge 1 commit intoqiskit-community:mainfrom
dlyongemallo wants to merge 1 commit intoqiskit-community:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #210 by making the simulator's native target respect the noise_model option for gate selection. When a native simulator is configured with noise_model='forte-1', transpilation will now use Forte's native ZZ gates instead of Aria's MS gates.
Changes:
- Modified the
targetproperty to dynamically rebuild the target for native simulators based on the current noise_model - Updated
_make_target()to check both backend name and noise_model option when selecting between ZZ and MS gates - Added comprehensive tests to verify the dynamic target behavior and end-to-end transpilation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| qiskit_ionq/ionq_backend.py | Made target property dynamic for native simulators and added noise_model check to gate selection logic |
| test/ionq_backend/test_base_backend.py | Added tests for dynamic target updates and regression test for issue #210 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9984ebe to
795181f
Compare
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.
Summary
When a simulator is used with
noise_model='forte-1', transpilation will use Forte's native entangling gates ZZ instead of the default/Aria's native MS gates. Fixes #210.Details and comments
Partial support was added in #231 but that change only checked the backend name to choose between ZZ and MS, which only works for QPU backends but not the simulators (the name
ionq_simulatordoesn't containforte).This PR checks
noise_modelin addition to the backend name. It also rebuilds the target dynamically for native simulators. This is necessary becausenoise_modelis a runtime option (which can change after backend creation).