Skip to content
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

Truncate save_expval #2216

Merged
merged 21 commits into from
Sep 12, 2024
Merged

Truncate save_expval #2216

merged 21 commits into from
Sep 12, 2024

Conversation

doichanj
Copy link
Collaborator

@doichanj doichanj commented Sep 6, 2024

Summary

This PR truncates save_expval instruction when using EstimatorV2.from_backend() for small circuits.

Details and comments

Ancilla qubits are added when transpiling small circuits with non-simulator backends that increases number of qubits to backends' qubits, and causes max memory error.
This PR truncates qubits of circuits with save_expval and restore Pauli string when saving expval to the results.

@doichanj doichanj requested a review from hhorii September 6, 2024 09:45
@doichanj doichanj added the stable-backport-potential The issue or PR might be minimal and/or import enough to backport to stable label Sep 11, 2024
@doichanj doichanj mentioned this pull request Sep 12, 2024
revert to 0.15.0
@doichanj doichanj merged commit dd7a261 into Qiskit:main Sep 12, 2024
34 checks passed
doichanj added a commit to doichanj/qiskit-aer that referenced this pull request Sep 12, 2024
* truncate save_expval

* fix truncation

* fix truncation

* add num_original_qubits to aer_circuit to get num_qubits without ancilla qubits

* Fix adding qubitset

* add test case, release note and fix docs

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* change truncation strategy

* format

* remove print

* no truncation when circuit is empty

* Update VERSION.txt

revert to 0.15.0

---------

Co-authored-by: Hiroshi Horii <[email protected]>
doichanj added a commit that referenced this pull request Sep 13, 2024
* Add `open_pulse` entry to `AerBackendConfiguration` (#2214)

* add open_pulse entry to AerBackendConfiguration

* add test

* Fix tests Aer 0.15 in the latest environments (#2223)

* qiskit 1.0.0rc1 -> 1.3.0b1

* test

* test

* fix tutorial

* add release note

* change version number

* Revert NoiseModel.from_dict (#2222)

* Truncate save_expval (#2216)

* truncate save_expval

* fix truncation

* fix truncation

* add num_original_qubits to aer_circuit to get num_qubits without ancilla qubits

* Fix adding qubitset

* add test case, release note and fix docs

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* change truncation strategy

* format

* remove print

* no truncation when circuit is empty

* Update VERSION.txt

revert to 0.15.0

---------

Co-authored-by: Hiroshi Horii <[email protected]>

---------

Co-authored-by: Takashi Imamichi <[email protected]>
Co-authored-by: Hiroshi Horii <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stable-backport-potential The issue or PR might be minimal and/or import enough to backport to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants