Search found 407 matches

by Johannes
09 Jun 2020, 21:15
Forum: HowTos and FAQ for TeNPy
Topic: overlap of ground states at different parameters
Replies: 7
Views: 6455

Re: overlap of ground states at different parameters

It's simply psi_1.overlap(psi_2) , or for the normalization as in your formula, psi_1.overlap(psi_2)/psi_1.norm / psi_2.norm . See overlap for more details. For infinite MPS, it's the largest eigenvalue of the transfermatrix, which is not just the overlap <psi_1|psi_2> - the latter is zero for any t...
by Johannes
08 Jun 2020, 23:24
Forum: HowTos and FAQ for TeNPy
Topic: Adding a site to a chain perpendicularly
Replies: 6
Views: 6017

Re: Adding a site to a chain perpendicularly

Sorry if that wasn't clear. It's not included in version 0.6.1 on pip yet, but it's on the github master branch. So you need to install the latest version from github. With pip: pip uninstall physics-tenpy # if you installed it before pip install git+git://github.com/tenpy/tenpy.git or download the ...
by Johannes
08 Jun 2020, 16:48
Forum: HowTos and FAQ for TeNPy
Topic: Adding a site to a chain perpendicularly
Replies: 6
Views: 6017

Re: Adding a site to a chain perpendicularly

Just for your information, this is now possible in the latest version of TeNPy with the help of the tenpy.models.lattice.IrregularLattice, see example in it's docstring and https://tenpy.readthedocs.io/en/latest/ ... tices.html
by Johannes
03 Jun 2020, 02:03
Forum: HowTos and FAQ for TeNPy
Topic: tebd on 2d lattice/ MPS with dangling legs
Replies: 2
Views: 3979

Re: tebd on 2d lattice/ MPS with dangling legs

Let me understand what you want to do. Do you want to write down a fully-2D PEPS where each tensor has 5 legs, left, right,up, down, physical? And then you somehow extract a single row/column of the PEPS as an MPS, with "dangling" legs (for a row, dangling up and down indices) to apply TEB...
by Johannes
03 Jun 2020, 01:24
Forum: HowTos and FAQ for TeNPy
Topic: Irregular lattice site removing doubt
Replies: 4
Views: 4309

Re: Irregular lattice site removing doubt

First of all: I've updated the documentation on Monday and added a completely new user-guide page describing many details on lattices , including a small section on irregular hattices on the end. Moreover, I've added some examples in the doc-string of the tenpy.models.lattice.IrregularLattice itself...
by Johannes
26 May 2020, 06:28
Forum: HowTos and FAQ for TeNPy
Topic: entanglement_entropy_segment doubt
Replies: 13
Views: 13679

Re: entanglement_entropy_segment doubt

1.) The toric code model acutally didn't allow for that, you would have had to override the init_lattice method. I've just updated it in 4cc12c0ab9f38cc970da7e5338a1ee3210964997 to allow torus-boundary conditions with bc_MPS="finite", bc_x="periodic", bc_y="periodic" . ...
by Johannes
26 May 2020, 03:43
Forum: HowTos and FAQ for TeNPy
Topic: Initializing RenyiDisentangler
Replies: 2
Views: 3086

Re: Initializing RenyiDisentangler

Wow, someone interested in the methods of that paper :) Sorry for the bad programming style making it hard to use it without TEBD :? The BackwardsDisentangler needed full access to TEBD, and I wanted to have a uniform interface for the different disentangler classes. Copy/paste works, of course. Alt...
by Johannes
26 May 2020, 03:27
Forum: HowTos and FAQ for TeNPy
Topic: Non-hermitian Matrices
Replies: 1
Views: 3024

Re: Non-hermitian Matrices

TEBD does work for non-hermitian hamiltonians since the commit closing the issue. DMRG does right now not work in this case, since it uses Lanczos which crucially assumes that the hamiltonian is hermitian. You would need to use a different eigensolver for non-hermitian H, and I have now idea how wel...
by Johannes
26 May 2020, 02:48
Forum: HowTos and FAQ for TeNPy
Topic: Bipartitioning infinite MPS into 2 semi-infinite chains
Replies: 11
Views: 9128

Re: Bipartitioning infinite MPS into 2 semi-infinite chains

You want to cut the system into two halves, but get_rho_segment extracts the density matrix for the *few* sites you give as argument, so that's the wrong function. The equations from the cited paper is really what's calculated by average_charge of the MPS (up to the prefactor constants, I believe), ...
by Johannes
26 May 2020, 02:23
Forum: HowTos and FAQ for TeNPy
Topic: Initial product states
Replies: 1
Views: 3099

Re: Initial product states

Having one more up than down electron can only work if you have an odd number of sites. Then you can do, e.g, initial_state = ["up", "down"] * (M.lat.N_sites // 2) initial_state.append("up") If you have an even number of sites and want two more up than down electrons, ...
by Johannes
18 May 2020, 05:15
Forum: HowTos and FAQ for TeNPy
Topic: Error at example code c_tebd.py
Replies: 1
Views: 2662

Re: Error at example code c_tebd.py

Thanks for pointing it out, I've updated it on the master branch.
Unfortunately, it didn't make it into the release of v0.6.0 any more, which I packed last Friday :?
by Johannes
18 May 2020, 05:08
Forum: HowTos and FAQ for TeNPy
Topic: entanglement_entropy_segment doubt
Replies: 13
Views: 13679

Re: entanglement_entropy_segment doubt

1) It depends on the physical system, not just the lattice! E.g. in the dimer lattice of my previous post, you should define the ordering such that each dimer is nearest-neighbor in the MPS. 3.) The order you plotted here is different from the default one of the tenpy.models.lattice.Honeycomb lattic...
by Johannes
15 May 2020, 18:55
Forum: HowTos and FAQ for TeNPy
Topic: npc.zeros and labels
Replies: 2
Views: 3526

Re: npc.zeros and labels

In the latest version of the master branch, the function definitely has the labels arguments, introduced in 8dd1f93b719074770a9d6cef16f0d89d9fd6229d on Jan. 27th. This change was introduced after the last official release of v0.5.0 on Dez.18 last year, however, so if you used the pip install physics...
by Johannes
14 May 2020, 21:17
Forum: HowTos and FAQ for TeNPy
Topic: entanglement_entropy_segment doubt
Replies: 13
Views: 13679

Re: entanglement_entropy_segment doubt

The square lattice of Leon Balents' paper is a 45-degree rotation compared to the DualSquareLattice we are using. This implies a different geometry for the cylinder axis (going in the [1, 1] direction of our DualSquareLattice), and a different "cut" when you split the MPS between unit cell...
by Johannes
14 May 2020, 04:31
Forum: HowTos and FAQ for TeNPy
Topic: Apply MPO to MPS
Replies: 2
Views: 4166

Re: Apply MPO to MPS

Yes, that's almost right. We're working on something like this in the exp_MPO branch on github. It's not quite ready for use, and we will adjust the interface to better match the other evolution algorithms, but it basically works as a preliminary version, and you can look at it to see how it works. ...
by Johannes
13 May 2020, 20:29
Forum: HowTos and FAQ for TeNPy
Topic: entanglement_entropy_segment doubt
Replies: 13
Views: 13679

Re: entanglement_entropy_segment doubt

1) TeNPy only supports "open" MPS, since peridoic MPS don't have a canonical form. You can make your Model have periodic/toric boundary conditions and still have an open MPS, and TeNPy supports that. The price you pay is that you need the squared bond dimension due to the (expected) entang...
by Johannes
13 May 2020, 20:08
Forum: HowTos and FAQ for TeNPy
Topic: Square of MPO
Replies: 3
Views: 4346

Re: Square of MPO

I'm not sure if the error estimate of arXiv:1711.01104 could be generalized to infinite systems, that would actually be quite usefull.
by Johannes
13 May 2020, 06:53
Forum: HowTos and FAQ for TeNPy
Topic: Square of MPO
Replies: 3
Views: 4346

Re: Square of MPO

I finally took the time to implement at least the "naive" approach of contracting the network with the squared MPO for <psi| H H |psi> in the new variance . Right now it works only for finite systems - for infinite MPS, this is a whole new story, since there is no direct notion of overlaps...
by Johannes
07 May 2020, 19:41
Forum: HowTos and FAQ for TeNPy
Topic: Translationally Invariant MPS from Single Site DMRG
Replies: 4
Views: 5505

Re: Translationally Invariant MPS from Single Site DMRG

Nice workaround! I'd formulate it slightly differnt, though. If we know that there is a translationally invariant, canonical MPS, let's call it C^i_{ab} , then it is related to the MPS tensors found by DMRG via a unitary matrix U : B_0^i = U C^i \quad\text{and}\quad B_1^i = C^i U^{\dagger}. In gener...
by Johannes
07 May 2020, 06:26
Forum: HowTos and FAQ for TeNPy
Topic: entanglement_entropy_segment doubt
Replies: 13
Views: 13679

Re: entanglement_entropy_segment doubt

First of all: the segment [0, 1, 2, 3, 4, 5] is only equivalent to psi.entanglement_entropy()[6] on a finite system. In an infinite system, psi.entanglement_entropy()[6] takes region A to be [..., -4, -3, -2, -1, 0, 1, 2, 3, 4, 5], which is a single cut dividing the system into left and right halfs,...
by Johannes
06 May 2020, 02:08
Forum: HowTos and FAQ for TeNPy
Topic: Translationally Invariant MPS from Single Site DMRG
Replies: 4
Views: 5505

Re: Translationally Invariant MPS from Single Site DMRG

As long as you have more than one tensor in you MPS, they will be different, even with single site DMRG. DMRG optimizes the tensors one after another (in the "sweep"), which immediately breaks the translation invariance in the beginning. If you model is translation invariant and the ground...
by Johannes
05 May 2020, 23:26
Forum: HowTos and FAQ for TeNPy
Topic: code issue TFI2D model implementation
Replies: 1
Views: 5033

Re: code issue TFI2D model implementation

Please include at least the error message for requests like this. It seems to be just a python issue, line 31 of the code above, lattice is not defined. When adding the line from tenpy.models import lattice in the beginning, it runs fine. I presume you want to extend the TFI model and add further te...
by Johannes
05 May 2020, 22:51
Forum: HowTos and FAQ for TeNPy
Topic: Preparing state with specified particle filling
Replies: 4
Views: 7626

Re: Preparing state with specified particle filling

We allow a fractional filling n/L where n \in \mathbb{Z} is the number of particles, and L the number of sites in the MPS (or for infinite MPS: in the MPS unit cell). So a filling of 3/10 particles is "commensurate" in that sense. Incommensurate would be and average filling of an irration ...
by Johannes
05 May 2020, 22:27
Forum: HowTos and FAQ for TeNPy
Topic: entanglement_entropy_segment doubt
Replies: 13
Views: 13679

Re: entanglement_entropy_segment doubt

Read the documentation at entanglement_entropy_segment . There is another parameter first_site , where this segment starts. If you use segment=[0, 1, 2] and don't specify first_site , it will default to the segments on sites [0, 1, 2] [1, 2, 3] [2, 3, 4] ... Each of them gives you one number, result...