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

Update MPS manual in docs #262

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Update MPS manual in docs #262

wants to merge 10 commits into from

Conversation

jofrevalles
Copy link
Member

Summary

This PR updates the MPS manual, accounting with the changes from MPS refactor (PR #232) and thus adding explanation of the different canonical forms we support. I think it makes sense that the manual for the canonical forms is in this MPS manual.

Additionally, I fixed a problem in the Project.toml of the docs.

@starsfordummies Can you take a look at the explanation on each canonical form? Maybe we can explain it better.

An `MPS` representation is not unique: a single `MPS` can be represented in different canonical [`Form`](@ref). The choice of canonical form can affect the efficiency and stability of algorithms used to manipulate the `MPS`. You can check the canonical form of an `MPS` by calling the `form` function:

```@example
mps = MPS([rand(2, 2), rand(2, 2, 2), rand(2, 2)])
Copy link
Contributor

Choose a reason for hiding this comment

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

# default ordering is (physical, virtual left, virtual right)

### Canonical Forms

An `MPS` representation is not unique: a single `MPS` can be represented in different canonical [`Form`](@ref). The choice of canonical form can affect the efficiency and stability of algorithms used to manipulate the `MPS`. You can check the canonical form of an `MPS` by calling the `form` function:

Copy link
Contributor

Choose a reason for hiding this comment

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

Depending on the form, Tenet will dispatch under the hood the appropriate algorithm which makes full use of the canonical form, so be careful when making modifications that might alter the form without changing the trait.


fig # hide
```

### Canonical Forms

An `MPS` representation is not unique: a single `MPS` can be represented in different canonical [`Form`](@ref). The choice of canonical form can affect the efficiency and stability of algorithms used to manipulate the `MPS`. You can check the canonical form of an `MPS` by calling the `form` function:
Copy link
Contributor

Choose a reason for hiding this comment

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

The current form of the MPS is stored as a trait (refs etc) and can be accessed via the form function

docs/src/manual/ansatz/mps.md Show resolved Hide resolved
docs/src/manual/ansatz/mps.md Show resolved Hide resolved
jofrevalles and others added 3 commits December 2, 2024 12:15
… of Yao gates (#258)

* try fix reordering of sites

* try fix layout of multi-qubit gates in Yao to Tenet conversion

* Remove permutedims & add collect for array building

* minor fixes on Reactant pkg extension

* implement `copy` for some structs

* fix column- to row-major layout conversion on `Reactant.promote_to` call

* remove dead code

---------

Co-authored-by: Todorbsc <[email protected]>
* Add evolve! function for an MPS with an MPO

* Add tests for MPS-MPO evolution

* Remove unnecessary @show

* Add comment

* Fix kwarg handling on truncate! function

* Fix normalize! for Canonical form and small fixes on evolve! with MPO

* Extend evolve!(mps, mpo) tests

* Format code

* Remove unnecessary kwarg

* Refactor code so it is easier to extend for other canonical forms

* Fix comment

* Enhance tests

* Add reset_index kwarg

* Update tests

* Format code

* Remove unnecessary Quantum functions, add docstring for truncate_sweep!

* Format code

* Remove stale function
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.

3 participants