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

Introducing approximation into the MPS simulation method #475

Merged
merged 70 commits into from
Jun 17, 2020

Conversation

merav-aharoni
Copy link
Contributor

@merav-aharoni merav-aharoni commented Dec 4, 2019

Summary

We allow using approximation when using the MPS simulation method.

Details and comments

The idea of approximation is to limit the number of Schmidt coefficients in the lambda matrices of the MPS. This can be done either by a size threshold or by the number of coefficients.
The approximation is controlled by two parameters at the beginning of svd.cpp:
APPROX_THRES - we discard values in lambda whose norm is smaller than
APPROX_THRES * norm(S[0]), where S[0] is the largest Schmidt coefficient.
APPROX_LIMIT - we discard values only if the size of lambda is greater than this value
These parameters are currently hard-coded, and for now can be changed only in the code.
We need to add a user interface for these parameters, and to experiment with this option.

@chriseclectic chriseclectic added this to the Qiskit Aer 0.4 milestone Jan 9, 2020
@chriseclectic chriseclectic mentioned this pull request Jan 9, 2020
13 tasks
@merav-aharoni
Copy link
Contributor Author

@chriseclectic , I implemented the changes in MPS approximation as we discussed.
Regarding the metadata, I couldn't find any place where it is natural to add the specific metadata for a State. So I added a new method State::add_metadata in the base class. Every State can implement this method and add its own metadata.
This PR is ready for review.

atilag
atilag previously approved these changes Jun 8, 2020
Copy link
Member

@atilag atilag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
I just added some style related comments.

src/simulators/matrix_product_state/svd.cpp Outdated Show resolved Hide resolved
src/simulators/matrix_product_state/svd.cpp Outdated Show resolved Hide resolved
src/simulators/matrix_product_state/svd.cpp Outdated Show resolved Hide resolved
src/simulators/state.hpp Outdated Show resolved Hide resolved
src/simulators/state.hpp Outdated Show resolved Hide resolved
src/simulators/matrix_product_state/svd.cpp Outdated Show resolved Hide resolved
chriseclectic
chriseclectic previously approved these changes Jun 16, 2020
@chriseclectic
Copy link
Member

@merav-aharoni Could you add a release note for this new feature?

@chriseclectic chriseclectic added the Changelog: New Feature Include in the Added section of the changelog label Jun 16, 2020
@merav-aharoni
Copy link
Contributor Author

Added documentation for release notes.

@chriseclectic chriseclectic merged commit c95bc6b into Qiskit:master Jun 17, 2020
@merav-aharoni merav-aharoni deleted the approx branch June 28, 2020 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the Added section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants