-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update BaseEstimator import to support qiskit 2.0 #2327
Merged
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
e3d9383
Use versioned base class for BaseEstimatorV1 instead of deprecated un…
ElePT cf942c3
Vendor removed V1 utils
ElePT d51aee6
Fix black
ElePT e877fc0
Replace bit with qubit
ElePT e2d93d5
Remove assemble test, as assemble was deprecated in 1.4 and removed i…
ElePT 1695710
Merge branch 'main' of https://github.com/Qiskit/qiskit-aer into upda…
ElePT 9fc42d1
Treat header as dict
ElePT 6da91ff
Handle header conditionally
ElePT 2f4d880
c_if is removed in 2.0, keep functionality for compatibility with 1.4…
ElePT 69c8825
Fix access to header in tests
ElePT e36e160
Remove use of instruction_durations in transpile
ElePT 18344cb
Attempt at fixing custom gate mapping. Not sure if gate = None is acc…
ElePT f6546e8
IfElseOp is not supported by statevector simulator. Reverted uni test…
ElePT 2d0b1bb
Remove wrong import
ElePT 983bafb
Fix failed target construction
ElePT c5865df
Only run tests with c_if with qiskit<2
ElePT 17f9c34
Address leftover custom basis gates in transpiler
ElePT fabca5e
Attempt at addressing .duration removal
ElePT f7617b8
Add unittest import missing in previous commit
ElePT 9cf7191
Use new target arg in tests for relaxation noise pass
ElePT 07b652f
Fix lint
ElePT edc89aa
Don't use target with backend props
ElePT bb1869a
Attempt at fixing relaxation pass
ElePT a643439
use hashable type
ElePT 0d57cfd
Fix issue with pickle/dill (temporary skip of fractional gates)
ElePT 4d9cdd8
Add missing c_if skip
ElePT e38f0d0
Skip transpilation to avoid qiskit bug in test
ElePT 41ac5a2
Skipping transpilation affects results
ElePT db5a011
Update truncation test. This test was relying on the transpiler blowi…
ElePT 8f78f29
Apply suggestion to use shots None
ElePT 5375346
Get rid of shot noise
ElePT 7d554c3
Improve truncation test
ElePT 4fe916c
Assert number of active qubits
ElePT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try
run_options = {'shots': None}
to get exact values for the circuits that result in 0.Alternative: change qc2 to give -1 instead of 0, then you won't have shot noise either. This can be done by changing
np.pi / 2
tonp.pi
in the circuit, or[1]
to[2]
in the parameter.(Estimator has no shot noise when the expectation value is exactly -1 or 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I haven't used the aer estimator in a while and forgot how to set these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option is documented at
qiskit-aer/qiskit_aer/primitives/estimator.py
Lines 68 to 75 in 076fe00
skip_transpilation=True
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's likely. Something to look at in a follow-up.