## Search found 276 matches

- 03 Sep 2021, 04:52
- Forum: HowTos and FAQ for TeNPy
- Topic: M1 compatibily
- Replies:
**1** - Views:
**63**

### Re: M1 compatibily

Since I don't own any Apple products, I can hardly test this and have no idea what's required to get it to work. However, the kind folks from conda-forge apparently have a working CI bot system that should help us: see the conda-forge docs If you want support for the M1, you'll have to get active: s...

- 01 Sep 2021, 23:17
- Forum: HowTos and FAQ for TeNPy
- Topic: Eigenvalues for the transfer matrix and unit cells
- Replies:
**4** - Views:
**88**

### Re: Eigenvalues for the transfer matrix and unit cells

I think you should just look at the Transfermatrix with the smallest possible number of sites. This would be 2 sites for a Neel state, 1 for a completely translation invariant state. Sadly, we don't have an algorithm for the last case at the moment -even single site DMRG requires a two-site MPS unit...

- 31 Aug 2021, 21:31
- Forum: HowTos and FAQ for TeNPy
- Topic: Eigenvalues for the transfer matrix and unit cells
- Replies:
**4** - Views:
**88**

### Re: Eigenvalues for the transfer matrix and unit cells

Hi Pablo, which TeNPy function are you referring to? TransferMatrix. eigenvectors () returns the eigenvalues \lambda of the full transfer matrix, there's no ambiguity there. correlation_length returns the xi in your definition, to make sure it's independent of L; it's basically just changing the uni...

- 30 Aug 2021, 03:15
- Forum: HowTos and FAQ for TeNPy
- Topic: Excited states using tenpy
- Replies:
**13** - Views:
**2279**

### Re: Excited states using tenpy

You can use algorithm_params: diag_method: lanczos lanczos_params: E_shift: -10 # choose small enough such that E + E_shift < 0 (also for excitations!) It basically does the same trick as you suggested - it just replaces H -> H + E_shift[inline], but the [inline]E_shift is automatically subtracted a...

- 11 Aug 2021, 23:59
- Forum: HowTos and FAQ for TeNPy
- Topic: about initial MPS canonical form
- Replies:
**1** - Views:
**318**

### Re: about initial MPS canonical form

When you just call the MPS.__init__() function, it will just assume that it is in right-canonical form. In most cases, people will in some way intialize the MPS from a product state with bond dimension 1 (using MPS.from_product_state or MPS.from_lat_product_state), which is trivially in both left- a...

- 11 Aug 2021, 23:46
- Forum: HowTos and FAQ for TeNPy
- Topic: Implementation of t-J model
- Replies:
**3** - Views:
**456**

### Re: Implementation of t-J model

Hi Leandro, apologies for not replying earlier! Just to check: Did this work out, did you manage it in the end? Or do you still need help? I hope you didn't give up! The t-J model is definitely sufficiently important/generic that it would be a good idea to include it into TeNPy itself. Would you lik...

- 11 Aug 2021, 23:28
- Forum: HowTos and FAQ for TeNPy
- Topic: Random UserWarning: unused option ['P_tol']
- Replies:
**1** - Views:
**257**

### Re: Random UserWarning: unused option ['P_tol']

By default, the option `P_tol_to_trunc` causes DMRG to set the P_tol parameter in the lanczos_params, which causes this warning in case DMRG actually does not use lanczos to diagonalize the effective Hamiltonian (it does exact diagonalizaiton for small enough chi where this is actually faster). I've...

- 11 Aug 2021, 18:35
- Forum: HowTos and FAQ for TeNPy
- Topic: About long-range interaction
- Replies:
**1** - Views:
**233**

### Re: About long-range interaction

1.) The simplest/naive thing is to just use the usual add_coupling with increasingly longer range interaction |i-j| up to some finite cutoff. Alternatively, the more clever/state of the art way would be to fit the powerlaw by a sum of exponentials, and then use `add_exponentially_decaying_interactio...

- 11 Aug 2021, 18:21
- Forum: HowTos and FAQ for TeNPy
- Topic: Chain with N site unit-cell
- Replies:
**2** - Views:
**428**

### Re: Chain with N site unit-cell

Yes, that's the general way to go about this: just define your lattice with the correct number of sites per unit sell, and add the corresponding couplings. Some inspiration might be given by the Hofstadter models in TeNPy. I guess it would also be useful to re-implement the FermionicHubbardModel wit...

- 11 Aug 2021, 17:41
- Forum: HowTos and FAQ for TeNPy
- Topic: Singular Values as np_conserved
- Replies:
**1** - Views:
**262**

### Re: Singular Values as np_conserved

Hi Nick, not sure if you already solved this. If you want, you can create a diagonal np_conserved tensor from that with the following snippet, but it is numerically inenfficient to actually do that (because tensordot is more expensive than just scaling an axis, which is what we usually do. # assumin...

- 11 Aug 2021, 17:34
- Forum: Algorithms
- Topic: Heisenberg XXZ chain with stagger interaction
- Replies:
**1** - Views:
**205**

### Re: Heisenberg XXZ chain with stagger interaction

What error do you get? Can you please include the error traceback? Otherwise I can only guess what the problem might be.... It seems strange that it works for smaller J_z, but not for larger one. By the way, you can actually do this without implementing a custom lattice/model, just based on the tenp...

- 11 Aug 2021, 17:24
- Forum: Algorithms
- Topic: Question about iTDVP
- Replies:
**1** - Views:
**291**

### Re: Question about iTDVP

Yes, I think you need to recreate the environments from scratch.

Not completely sure, but I think you could try using the old ones as an initial guess for the new environments.

Not completely sure, but I think you could try using the old ones as an initial guess for the new environments.

- 11 Aug 2021, 17:17
- Forum: Algorithms
- Topic: Disentangler for long-range model or for local 2-d lattice model
- Replies:
**2** - Views:
**209**

### Re: Disentangler for long-range model or for local 2-d lattice model

The disentanglers implemented in TeNPy act on two or more consecutive sites in the MPS language, but of course you can try to apply a bunch of them one after the other. It also has code that tries to bring a few sites next to each other and then disentangle them, but in my experience that didn't wor...

- 11 Aug 2021, 17:14
- Forum: HowTos and FAQ for TeNPy
- Topic: How to use self-defined model in Simulation's yml file?
- Replies:
**2** - Views:
**193**

### Re: How to use self-defined model in Simulation's yml file?

You just need to import the file in python, which contains the model definition; then you can just use the "name" of the model in the simulation parameters. To import that file with the definition, you have two options: Either you use the command line option -1 of tenpy-run or python -m te...

- 11 Aug 2021, 16:53
- Forum: HowTos and FAQ for TeNPy
- Topic: Question about convergence statistics in (i)DMRG
- Replies:
**2** - Views:
**187**

### Re: Question about convergence statistics in (i)DMRG

To be clear, the actual convergence of DMRG is

**much**faster than just 1/(#sweeps performed), as you see on the right - there's a log-scale on the yaxis- 11 Aug 2021, 16:52
- Forum: HowTos and FAQ for TeNPy
- Topic: Question about convergence statistics in (i)DMRG
- Replies:
**2** - Views:
**187**

### Re: Question about convergence statistics in (i)DMRG

is not the energy you want to study for convergence' it is the total energy of the system that contains age sites, including all energy terms in the environments with whatever state you had at that point. Pictorially, the "total" system that infinite DMRG grew after a couple of sweeps look...

- 08 Jun 2021, 03:14
- Forum: HowTos and FAQ for TeNPy
- Topic: Custom (sum of) Operators
- Replies:
**3** - Views:
**561**

### Re: Custom (sum of) Operators

A bit late, but better late than never ;-) apply_local_op accepts an operator that acts on n neighboring sites, for example for two sites with legs 'p0', 'p1', 'p0*', 'p1*' . You can use the brand-new function tenpy.networks.site.kron to create the corresponding bond operator from the single-site op...

- 08 Jun 2021, 02:49
- Forum: HowTos and FAQ for TeNPy
- Topic: If/How to avoid: "final DMRG state not in canonical form..."
- Replies:
**2** - Views:
**477**

### Re: If/How to avoid: "final DMRG state not in canonical form..."

You shouldn't trust expectation values/correlation functions that were calculated from an MPS that is not in canonical form, because these functions implicitly assume that psi is in canonical form. When your DMRG is really converged and doesn't change the state during the sweep any more, you would e...

- 08 Jun 2021, 02:31
- Forum: Implementations
- Topic: Keeping number of particles fixed at edges
- Replies:
**1** - Views:
**606**

### Re: Keeping number of particles fixed at edges

The answer comes probably a bit too late, but anyways: How do you want to "fix" the states outside? If you imagine to project them to the local basis states with exactly 0/2 sites, you would have a product state with the rest. The hopping term wouldn't contribute, and you can just calculat...

- 08 Jun 2021, 02:13
- Forum: Implementations
- Topic: wave function from MPS
- Replies:
**1** - Views:
**345**

### Re: wave function from MPS

They will only depend on the charge conservation you're using.

I guess you're aware of this, but just to be clear: when you do this, you write down all 2^L states, so you could just as well use exact diagonalization....

I guess you're aware of this, but just to be clear: when you do this, you write down all 2^L states, so you could just as well use exact diagonalization....

- 08 Jun 2021, 02:05
- Forum: HowTos and FAQ for TeNPy
- Topic: Finite state machine MPO
- Replies:
**2** - Views:
**375**

### Re: Finite state machine MPO

Hi Pablo, there is a way to do it more effiently, although I only did that numerically: I created the AKLT model by just defining bond terms, and then initializing the MPO from these bond terms - there's a function in TeNPy to automatically do the SVD of the bond term to get the MPO. Take a look at ...

- 08 Jun 2021, 01:48
- Forum: HowTos and FAQ for TeNPy
- Topic: dmrg.run() claims quartic Hamiltonian is zero
- Replies:
**1** - Views:
**304**

### Re: dmrg.run() claims quartic Hamiltonian is zero

It's a problem of the inital state and charge conservation, not the jordan wigner strings. TwoSiteDMRG updates two sites in the subspace created by projecting H to the current psi (i.e. your initial state) on other sites; this projection will render H zero because each term in H has at least two C/C...

- 08 Jun 2021, 01:40
- Forum: Algorithms
- Topic: Mapping of Spinful Fermion to Spinless fermion
- Replies:
**3** - Views:
**587**

### Re: Mapping of Spinful Fermion to Spinless fermion

Yes, that's right.

I tried to explain this in the section "spinful fermions" of the Jordan-Wigner user guide you referenced.

If you have a suggestion how to formulate this a bit clearer, feel free to submit a corresponding pull request on github!

I tried to explain this in the section "spinful fermions" of the Jordan-Wigner user guide you referenced.

If you have a suggestion how to formulate this a bit clearer, feel free to submit a corresponding pull request on github!

- 08 Jun 2021, 01:36
- Forum: HowTos and FAQ for TeNPy
- Topic: [RESOLVED] Issue in purification method (normalization of temperature and/or timescales?)
- Replies:
**5** - Views:
**693**

### Re: [RESOLVED] Issue in purification method (normalization of temperature and/or timescales?)

rubenv Good catch, the fix is of course correct. Let me explain: The variation compression needs a copy of the old psi to compress against, and that copy is made during the class intialization, more precisely in [tenpyclass=tenpy.algorithms.mps_common.VariationalApplyMPO]init_env[/inline]. So it mo...

- 13 Apr 2021, 23:58
- Forum: HowTos and FAQ for TeNPy
- Topic: finite open, finite periodic and infinite periodic chains
- Replies:
**10** - Views:
**4379**

### Re: finite open, finite periodic and infinite periodic chains

Whoa, I wasn't aware that you want to run it for non-hermitian H. Lancos implicitly assumes that H is hermitian! For that reason at least TeNPy's implementation of TDVP (which uses Lancos to do the local time evolution) does not work for that case! Dropping the hermiticity of H is in general very da...