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

Allow to pass keyword arguments to itensor mps estimator for fast computation. #203

Merged
merged 31 commits into from
Sep 27, 2023

Conversation

terasakisatoshi
Copy link
Contributor

Description

This PR allows users to pass keyword arguments to jl.apply in the auxiliary function _estimate. Note that jl.apply Julia function ITensors.apply. By passing maxdim, it enables us to calculate the expectation value at high speed by obtaining the Truncated SVD in ITensors.factorize and svd. These functions are called from the ITensors.apply.

  • I have added tests that verify the behavior of the changes I made.

@github-actions
Copy link

github-actions bot commented Aug 23, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@terasakisatoshi
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

@toru4838 toru4838 left a comment

Choose a reason for hiding this comment

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

Thank you!
Please check my comments. I think the updates here can also be applied to Sampler. Can you do the same for it?

packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
Co-authored-by: Toru Shibamiya <49753430+toru4838@users.noreply.github.com>
@terasakisatoshi
Copy link
Contributor Author

I think the updates here can also be applied to Sampler. Can you do the same for it?

Sure, leave it to me!

@terasakisatoshi
Copy link
Contributor Author

Sure, leave it to me!

Done. Ready for review 🙏

Copy link
Contributor

@toru4838 toru4838 left a comment

Choose a reason for hiding this comment

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

Thank you!
I have made a few minor comments. Please take care of it 🙏

packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
add `.`

Co-authored-by: Toru Shibamiya <49753430+toru4838@users.noreply.github.com>
terasakisatoshi and others added 4 commits September 20, 2023 12:34
Co-authored-by: Toru Shibamiya <49753430+toru4838@users.noreply.github.com>
Co-authored-by: Toru Shibamiya <49753430+toru4838@users.noreply.github.com>
Copy link
Contributor

@toru4838 toru4838 left a comment

Choose a reason for hiding this comment

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

Almost!

packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
terasakisatoshi and others added 2 commits September 25, 2023 12:14
Co-authored-by: Toru Shibamiya <49753430+toru4838@users.noreply.github.com>
Co-authored-by: Toru Shibamiya <49753430+toru4838@users.noreply.github.com>
Copy link
Contributor

@toru4838 toru4838 left a comment

Choose a reason for hiding this comment

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

Sorry the documentation is still broken.

packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
packages/itensor/quri_parts/itensor/estimator.py Outdated Show resolved Hide resolved
terasakisatoshi and others added 2 commits September 26, 2023 10:54
Co-authored-by: Toru Shibamiya <49753430+toru4838@users.noreply.github.com>
Co-authored-by: Toru Shibamiya <49753430+toru4838@users.noreply.github.com>
Co-authored-by: Toru Shibamiya <49753430+toru4838@users.noreply.github.com>
Co-authored-by: Toru Shibamiya <49753430+toru4838@users.noreply.github.com>
Copy link
Contributor

@toru4838 toru4838 left a comment

Choose a reason for hiding this comment

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

Great work!

@toru4838 toru4838 merged commit 184f16a into QunaSys:main Sep 27, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2023
@terasakisatoshi terasakisatoshi deleted the kwargs-to-itensor-mps-estimator branch September 28, 2023 07:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants