Search found 426 matches

by Johannes
21 Aug 2020, 09:51
Forum: HowTos and FAQ for TeNPy
Topic: Bosonic Haldane Model
Replies: 2
Views: 2726

Re: Bosonic Haldane Model

You're right, that's a double counting. Good catch, thanks for pointing it out! The Fermionic Hofstadter model has the same problem, of course. Additionally, one of the example models had the issue. I've fixed it in a8448f36c23fda6f2ea8217f4f8e938acb7f67df bart Did you see this? Any other consequenc...
by Johannes
20 Aug 2020, 09:29
Forum: HowTos and FAQ for TeNPy
Topic: Qn about iDMRG
Replies: 2
Views: 25341

Re: Qn about iDMRG

The model is H = J \sum_{i} (0.5 (S^+_i S^-_{i+1} + h.c.) + \Delta S^z_I S^z_{i+1} ) - h^z \sum_i S^z_i , which is in the ferromagnetic phase of the XXZ chain for \Delta = -1.7 . In other words, the True ground state is simply all down states (or all up states, if you have a non-zero h^z ). Indeed, ...
by Johannes
31 Jul 2020, 13:11
Forum: HowTos and FAQ for TeNPy
Topic: DMRG different results using SingleSiteEngine and TwoSiteEngine and how to keep certain filling
Replies: 1
Views: 2508

Re: DMRG different results using SingleSiteEngine and TwoSiteEngine and how to keep certain filling

Imposing a small bond dimension has slightly different effects on single-site vs. two-site DMRG. Take the extreme case of chi=1, in which case single-site DMRG (without a mixer) effectively does mean-field theory for a single site in an environment, while two-site dmrg finds the ground state of two ...
by Johannes
31 Jul 2020, 10:59
Forum: HowTos and FAQ for TeNPy
Topic: Entanglement spectrum by charge (specifically for iDMRG)
Replies: 4
Views: 4137

Re: Entanglement spectrum by charge (specifically for iDMRG)

For infinite systems, the absolute value of the charges has no physical meaning but is a pure gauge choice; physical is only the difference between charge values. Indeed, the absolute value depends on the choice of your initial state - did you get different results when you initialized with the down...
by Johannes
11 Jul 2020, 04:20
Forum: HowTos and FAQ for TeNPy
Topic: Multiple sites to combine charges
Replies: 1
Views: 3106

Re: Multiple sites to combine charges

So you have 3 separate conserved quantities: number of A bosons siteA, number of bosons siteB, spin SiteZ? The charges for the siteA and siteB need to be different, so you can't pass the very same Site-instance. I expect the following to work: class BosonSin(CouplingMPOModel): def init_lattice(self,...
by Johannes
17 Jun 2020, 20:03
Forum: HowTos and FAQ for TeNPy
Topic: Superposition of MPS with different total charge
Replies: 4
Views: 5877

Re: Superposition of MPS with different total charge

To detect whether you have cat state, you should look at the eigenvalues of the transfermatrix, whether you get two eigenvalues exactly 1. If the ground state is a stripe, charge conservation can force it into superpositions. For that reason, I would also highly recommend to try using a larger (doub...
by Johannes
16 Jun 2020, 17:53
Forum: HowTos and FAQ for TeNPy
Topic: Superposition of MPS with different total charge
Replies: 4
Views: 5877

Re: Superposition of MPS with different total charge

(I took the freedom to slightly edit your suggested code.)
by Johannes
16 Jun 2020, 17:49
Forum: HowTos and FAQ for TeNPy
Topic: Superposition of MPS with different total charge
Replies: 4
Views: 5877

Re: Superposition of MPS with different total charge

May I ask why you want to create a superposition in the first place? Just for measurements? I don't really see a point for that. Or continuing some algorithm with another model which doesn't have the charge conservation? That would be more reasonable. Schollwoeck's 2011 review ("DMRG in the age...
by Johannes
16 Jun 2020, 05:29
Forum: HowTos and FAQ for TeNPy
Topic: Bipartitioning infinite MPS into 2 semi-infinite chains
Replies: 11
Views: 14374

Re: Bipartitioning infinite MPS into 2 semi-infinite chains

I see. Sorry, if I appeared rude; I just wasn't sure what you wanted to do. I'd still recommend running DMRG to find the ground state, which gives you an MPS, and then just take that as initial state for the TEBD, as outlined below. On a side note, you can derive your model directly from the Nearest...
by Johannes
15 Jun 2020, 16:41
Forum: HowTos and FAQ for TeNPy
Topic: Bipartitioning infinite MPS into 2 semi-infinite chains
Replies: 11
Views: 14374

Re: Bipartitioning infinite MPS into 2 semi-infinite chains

Why are you trying to do the time evolution? The paper you cited does *not* use TEBD, it uses DMRG! We define \theta = 2\pi t/T , assume adiabaticity and work in the instantaneous eigenbasis of H(\theta) . Hence, the charge transport becomes independent of the time scale T . "Adiabatically"...
by Johannes
15 Jun 2020, 16:14
Forum: Algorithms
Topic: Toy code for np_conservervation
Replies: 1
Views: 10270

Re: Toy code for np_conservervation

No, there is no toycode.

The idea is really just to keep track of the charges, which divides the tensor into smaller blocks, and multiply only the subblocks with compatible charges, re-implementing tensordot, eigh, ... to exploit the block structure.
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: 14374

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

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

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

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

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

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

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

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

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

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

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

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

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