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

Continuation Charge Sector Projection #363 #398

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jhauschild
Copy link
Member

@jhauschild jhauschild commented Mar 27, 2024

This is a continuation of #363 (due to renaming of the repo/branch)

Closes #363

p-thoma and others added 5 commits March 8, 2024 15:13
…MPS into MPS class

In the classmethod from_infiniteT_canonical of PurificationMPS the first step corresponds
to finding a tree of possible charges at each site which corresponds to the desired charge sector.
This logic is moved into the MPS class as it will be used to project a product state onto a
desired charge sector. The classmethod from_infiniteT_canonical is adapted.
… MPS

This is similar to the method from_infiniteT_canonical of the PurificationMPS class.
In the canonical ensemble each local basis state has the same probability in a charge sector.
For the new classmethod project_onto_charge_sector it is possible to pass a list of coefficients
for each local basis state for each site in the desired charge sector. This effectively projects
a product state onto a desired charge sector.
and remove unnecessary sorting in `get_charge_tree_for_given_charge_sector`
Simplify initialization of sites and add comments to the test.
Furthermore include a test for conservation of ``'N'`` for `FermionSite`
@jhauschild
Copy link
Member Author

I think Ludwig and Philipp are already addressing this, but just as a reminder here: PurificationMPS.from_infiniteT_canonical doesn't work with two independent charges, as also pointed out in this forum thread

p-thoma and others added 2 commits April 23, 2024 16:02
This fixes the method `project_onto_charge_sector` in mps.py. A charge tree can now
be generated for more than 1 type of charge. Update test_cs_projection.py accordingly
and include a test for `PurificationMPS.from_infiniteT_canonical`.
Add some comments to better understand how the "tree" is constructed.
Add cs-projection to changelog
@p-thoma
Copy link
Contributor

p-thoma commented Apr 23, 2024

I just updated the method get_charge_tree_for_given_charge_sector which seems to have caused this bug, the way the tensors were "build" from a given charge tree was already ok for two types of charges. I also included the example given in the Forum Thread in a test, just to be sure this works :)
@jhauschild I think this can be merged now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants