Search found 465 matches

by Johannes
12 Jun 2020, 06:19
Forum: HowTos and FAQ for TeNPy
Topic: Bipartitioning infinite MPS into 2 semi-infinite chains
Replies: 11
Views: 36036

Re: Bipartitioning infinite MPS into 2 semi-infinite chains

Hang on - you're running DMRG to obtain ground states, right? What do you mean with the "evolution" steps? Why do you need the GroupedSite at all, if you're only running DMRG? Can you specify the hamiltonian? And the transfer matrix between which states? You might need to explicitly set ch...
by Johannes
11 Jun 2020, 07:24
Forum: Releases
Topic: Release v0.6.0 and v0.6.1
Replies: 0
Views: 35829

Release v0.6.0 and v0.6.1

Version 0.6.0 and 0.6.1 have been released. Before updating , please read at least the section incompatible changes of the changelog. Most important changes The release of v0.6.0 contains a major update of the documentation, which is now hosted by "Read the Docs" at https://tenpy.readthedo...
by Johannes
10 Jun 2020, 01:13
Forum: HowTos and FAQ for TeNPy
Topic: overlap of ground states at different parameters
Replies: 7
Views: 25553

Re: overlap of ground states at different parameters

You're right of course. Okay, let me just say that I never tried it... You should probably still make sure that you follow the evolution with \theta adiabatically. In other words, use the result from the DMRG run with \theta as an initial guess for the \theta + \delta \theta DMRG, similarly as is do...
by Johannes
10 Jun 2020, 01:05
Forum: HowTos and FAQ for TeNPy
Topic: entanglement_entropy_segment doubt
Replies: 13
Views: 46348

Re: entanglement_entropy_segment doubt

So you try to use torus boundary conditions now? Just to make sure, the correct way to do this is (whith the standard toric code model as in the Repo): from tenpy.networks.mps import MPS from tenpy.algorithms import dmrg from tenpy.models.toric_code import ToricCode def example_run_TC(): model_param...
by Johannes
10 Jun 2020, 00:37
Forum: HowTos and FAQ for TeNPy
Topic: overlap of ground states at different parameters
Replies: 7
Views: 25553

Re: overlap of ground states at different parameters

I don't think this works, even for finite MPS or with exact diagonalization. The issue is that you need to pin the phase of the ground state, which is not well defined from the perspective of a variational algorithm: if |\Psi\rangle is a ground state, so is e^{i \phi} |\Psi\rangle , so any variation...
by Johannes
10 Jun 2020, 00:10
Forum: HowTos and FAQ for TeNPy
Topic: Irregular lattice site removing doubt
Replies: 4
Views: 11488

Re: Irregular lattice site removing doubt

By the way, you don't have to modify the model inside the tenpy repo for that, you can do something like this: from tenpy.models import toric_code from tenpy.models.lattice import IrregularLattice class MyToricCode(toric_code.ToricCode): def init_lattice(self, model_params): reg_lat = super().init_l...
by Johannes
10 Jun 2020, 00:00
Forum: HowTos and FAQ for TeNPy
Topic: Irregular lattice site removing doubt
Replies: 4
Views: 11488

Re: Irregular lattice site removing doubt

Sorry, that was a small bug. I've fixed it in 037ad76272825bf6f4de1a72fb4e5529a1fcdec9.
by Johannes
09 Jun 2020, 23:50
Forum: HowTos and FAQ for TeNPy
Topic: Bipartitioning infinite MPS into 2 semi-infinite chains
Replies: 11
Views: 36036

Re: Bipartitioning infinite MPS into 2 semi-infinite chains

I'm not sure what's the problem here? The chiral_pi_flux.py example does work directly in the thermodynamic limit with infinite MPS. Running it generates chiral_pi_flux_charge_pump.pdf , the equivalent of Fig. 4 in the paper you quote, and chiral_pi_flux_ent_spec_flow.pdf , the equivalent of Fig. 8....
by Johannes
09 Jun 2020, 21:15
Forum: HowTos and FAQ for TeNPy
Topic: overlap of ground states at different parameters
Replies: 7
Views: 25553

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: 17018

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: 17018

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: 9116

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: 11488

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: 46348

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: 7338

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: 6523

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: 36036

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: 7679

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: 8293

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: 46348

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: 7533

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: 46348

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: 7616

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: 46348

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...