Search found 429 matches
- 20 Jun 2023, 09:09
- Forum: HowTos and FAQ for TeNPy
- Topic: Question about poorly conditioned H matrix in KrylovBased
- Replies: 6
- Views: 2846
Re: Question about poorly conditioned H matrix in KrylovBased
1) What model are you actually using? The site you define has Sz conservation, which you can't use in the Toric code. 2) What intitial state are you using? Is H psi = 0 on that initial state? 3) What's the log output during the DMRG run? 4) Again, are your individual entanglement entropies larger th...
- 20 Jun 2023, 08:48
- Forum: HowTos and FAQ for TeNPy
- Topic: state overlap(probability)
- Replies: 11
- Views: 9533
Re: state overlap(probability)
at a single site only? Then I would suggest to just use apply_local_op with a local operator |x><x|, where x is the state you want to project on. def project_local(psi, i, state): site = psi.sites[i] P = np.zeros(site.dim) P[site.state_index(state)] = 1. proj = npc.diag(P, site.leg, labels=['p', 'p*...
- 16 Jun 2023, 09:04
- Forum: HowTos and FAQ for TeNPy
- Topic: How to add the resume from checkpoint in yaml file
- Replies: 2
- Views: 1692
Re: How to add the resume from checkpoint in yaml file
At the moment, you need to directly call the tenpy.resume_from_checkpoint function with the filename from where you want to resume the simulation. You can do this from the command line e.g. with python -c 'import tenpy; tenpy.resume_from_run("path_to_file.h5")' . See 269 for ToDo / progres...
- 16 Jun 2023, 08:37
- Forum: HowTos and FAQ for TeNPy
- Topic: How to obtain a more accurate charge-pumping in tenpy
- Replies: 1
- Views: 2064
Re: How to obtain a more accurate charge-pumping in tenpy
The chi_list forces DMRG to project to small bond dimension initially and the increase chi as specified with increasing number of sweeps. The idea is to gradually get close to the true ground state. When doing the charge pump, you want to adiabatically follow the ground state with as little change a...
- 16 Jun 2023, 08:16
- Forum: HowTos and FAQ for TeNPy
- Topic: Question about poorly conditioned H matrix in KrylovBased
- Replies: 6
- Views: 2846
Re: Question about poorly conditioned H matrix in KrylovBased
For you model: double-check that your hamiltonian is indeed hermitian assert model.H_MPO.is_equal(model.H_MPO.dagger()) - if you mess up adding the couplings, it might not be. To fully avoid the warning, you might need to start from a different initial state. In particular, I'd assume you start from...
- 01 Jun 2023, 15:20
- Forum: HowTos and FAQ for TeNPy
- Topic: How to adjust the 'N_sweeps_check' and 'update_env' parameters in Tenpy's idmrg calculation
- Replies: 2
- Views: 2503
Re: How to adjust the 'N_sweeps_check' and 'update_env' parameters in Tenpy's idmrg calculation
the N_sweeps_check defines how often you check for convergence and print the status output to the log. Many iDMRG runs need >100 sweeps to converge, but every sweep is much faster than comparable finite-size DMRG runs (since L_x_infinite ~1-2 << L_x_fininte ~ 50=200 for typical runs). Assuming that ...
- 31 May 2023, 09:20
- Forum: HowTos and FAQ for TeNPy
- Topic: Question about poorly conditioned H matrix in KrylovBased
- Replies: 6
- Views: 2846
Re: Question about poorly conditioned H matrix in KrylovBased
The "poorly conditioned H" is not an error message, it's a warning - telling you that there might be something wrong in your setup. The poorly conditioned H is often a hint for 1) your Hamiltonian not being hermitian or 2) the initial state/ some intermediate state being such that H |psi> ...
- 24 May 2023, 15:17
- Forum: HowTos and FAQ for TeNPy
- Topic: Non-canonical MPS as an initial guess for DMRG
- Replies: 2
- Views: 1573
Re: Non-canonical MPS as an initial guess for DMRG
For finite DMRG, it doesn't really matter, as it effectively brings the MPS to canonical form in the first sweep. For infinite DMRG, I'm not completely sure right now, if it's okay. The subtle thing there is that you absorb the tensors into the environments, which you grow each sweep. The MPO assume...
- 23 May 2023, 14:32
- Forum: HowTos and FAQ for TeNPy
- Topic: Translationally invariant simulation of XXZ
- Replies: 1
- Views: 1545
Re: Translationally invariant simulation of XXZ
When you have a perfect ground state degeneracy, DMRG is by definition allowed to give you any superposition (of the ground states) it wants, and it tends to break the translation invariance if it can. The state you wrote down is what we call a "cat" state, because it is a global superposi...
- 23 May 2023, 13:57
- Forum: HowTos and FAQ for TeNPy
- Topic: how to write HofstadterModel with mixed_xk in infinite dmrg
- Replies: 7
- Views: 5201
Re: how to write HofstadterModel with mixed_xk in infinite dmrg
In real space, you can't conserve ky directly, so you don't get that quantum number (although it's still there in principle, yes). What initial state did you try? You need to put in the correct number of particles, but the total ky is a free parameter which you might need to vary as well (if you don...
- 23 May 2023, 13:41
- Forum: HowTos and FAQ for TeNPy
- Topic: exponential of the sum of operators on different sites
- Replies: 3
- Views: 1789
Re: exponential of the sum of operators on different sites
Okay, it wasn't clear to me that r < Lx, such that this is a non-trivial operator (given charge conservation). In the paper, they use r = L/2, what did you try? if you always start at x=0, it's actually just measuring the parity of particles to the left at a given bond (say in the center at L/2, but...
- 22 May 2023, 17:05
- Forum: HowTos and FAQ for TeNPy
- Topic: exponential of the sum of operators on different sites
- Replies: 3
- Views: 1789
Re: exponential of the sum of operators on different sites
I'm confused what the problem is. Clearly, there's a mathematical identity \exp(i \pi \sum_y( n_{x,y} - 1)) = \prod_y \exp(i \pi (n_{x,y} - 1)) , so \prod_x \exp(i \pi \sum_y( n_{x,y} - 1)) = \prod_{x,y} \exp(i \pi (n_{x,y} - 1)) , which is a product of exponentials of onsite-operators. How do you k...
- 22 May 2023, 16:58
- Forum: HowTos and FAQ for TeNPy
- Topic: How to create a new operator as a combination of operators acting on different sites
- Replies: 2
- Views: 1740
Re: How to create a new operator as a combination of operators acting on different sites
Welcome! Unfortunately, we don't support multi-site operator combinations in TeNPy very well at the moment. However, there's a very simple, general work-around: just write everything explicitly in terms of the single-site operators and sum it up afterwards. In your case, just plugging in \kappa^z_j ...
- 22 May 2023, 16:01
- Forum: HowTos and FAQ for TeNPy
- Topic: how to write HofstadterModel with mixed_xk in infinite dmrg
- Replies: 7
- Views: 5201
Re: how to write HofstadterModel with mixed_xk in infinite dmrg
Hi Kevin, just like the other 2D models in TeNPy, the `MixedXK` model reads out the Lx parameter to define the number of "rings" in the iMPS unit cell, similar as Ly defines the number of sites / lattice unit cells around the cylinder. The add_onsite and add_coupling methods accept the str...
- 08 May 2023, 10:37
- Forum: HowTos and FAQ for TeNPy
- Topic: how to write HofstadterModel with mixed_xk in infinite dmrg
- Replies: 7
- Views: 5201
Re: how to write HofstadterModel with mixed_xk in infinite dmrg
The Hofstadter models in TeNPy are implemented in real-space (both along and around the cylinder). To switch to momentum space, you might want to take a look at the tenpy.models.mixed_xk.MixedXKModel , and the subclass examples tenpy.models.mixed_xk.SpinlessMixedXKSquare and tenpy.models.mixed_xk.Hu...
- 27 Apr 2023, 07:55
- Forum: HowTos and FAQ for TeNPy
- Topic: Behaviour of lattice.find_coupling_pairs()
- Replies: 1
- Views: 1421
Re: Behaviour of lattice.find_coupling_pairs()
Maybe the misleading thing is that we provide default parameter for cutoff. This function is supposed to help in case you define a new Lattice and want to find some useful pairs to define. Of course, finding the nearest- and next-nearest neighbor pairs is still quite easy, but when you reach fourth-...
- 24 Apr 2023, 16:46
- Forum: HowTos and FAQ for TeNPy
- Topic: Write MPS/MPO to disk or increase RAM?
- Replies: 3
- Views: 14176
Re: Write MPS/MPO to disk or increase RAM?
In terms of memory usage of DMRG, the limiting factore are usually the MPO environments rather than the MPS itself: the number of parameters for the MPS scales as O(L\chi^2 d) , where L is MPS unit cell length, chi is bond dimension and d is local dimension. In contrast, MPO environments go as O(L\c...
- 24 Apr 2023, 10:27
- Forum: HowTos and FAQ for TeNPy
- Topic: non-Hermitian Hamitonian for Quantum Trajectory
- Replies: 1
- Views: 1555
Re: non-Hermitian Hamitonian for Quantum Trajectory
What exactly do you want to do here? Do you "just" want a non-hermitian H, but still evolve according to the usual Schrödinger equation i \hbar \partial_t\vert\psi\rangle = H \vert\psi\rangle , or do you e.g. also want to apply jump operators or have a Lindblad-style evolution? That issue ...
- 24 Apr 2023, 10:13
- Forum: Implementations
- Topic: Lindblad steady state
- Replies: 2
- Views: 9348
Re: Lindblad steady state
Unfortunately, we don't have code for doing this in TeNPy as of now.
There had been some work in that direction, see this topic, but I didn't hear back since that initial zoom meeting.
If you want to implement something in that direction, that would be very welcome![Wink ;)](./images/smilies/icon_e_wink.gif)
There had been some work in that direction, see this topic, but I didn't hear back since that initial zoom meeting.
If you want to implement something in that direction, that would be very welcome
![Wink ;)](./images/smilies/icon_e_wink.gif)
- 24 Apr 2023, 10:10
- Forum: HowTos and FAQ for TeNPy
- Topic: dmrg.run() claims quartic Hamiltonian is zero
- Replies: 3
- Views: 3293
Re: dmrg.run() claims quartic Hamiltonian is zero
Hi @pasa, from our last discussions, I understood that you had symmetries that can only be broken by 3-site terms, right? In that case even a TEBD-style RandomUnitaryEvolution will be trivial if you fix those symmetries. So yes, to get away from the product states, you need to group sites, run the R...
- 24 Mar 2023, 09:40
- Forum: HowTos and FAQ for TeNPy
- Topic: Heisenberg model with just next-nearest-neighbor interaction
- Replies: 1
- Views: 1860
Re: Heisenberg model with just next-nearest-neighbor interaction
I'm not sure what you mean with "only interactions of AA BB ABA". The way you define your model, if you consider the sites in a chain as A B A B ... you exclusively get the Heisenberg coupling between A-A sites only, nothing between B -B. Locally on B, you only have a Sz term, so there's n...
- 24 Mar 2023, 09:28
- Forum: HowTos and FAQ for TeNPy
- Topic: MPS as Square Matrices
- Replies: 3
- Views: 2301
Re: MPS as Square Matrices
For a finite system, this doesn't make sense, so I guess you mean infinite and have some translation invariance by a single site? You can just use truncation parameters with the same chi_min=chi_max , which ultimately fixes the bond dimension exactly. I'd do that only once you have your final MPS, t...
- 10 Feb 2023, 12:05
- Forum: HowTos and FAQ for TeNPy
- Topic: Making an MPO given its tensors
- Replies: 2
- Views: 2483
Re: Making an MPO given its tensors
That's right, the grid of the MPO should be np_conserved Arrays. You can also take a look at the mpo_exponential_decay.py example.
- 27 Jan 2023, 17:54
- Forum: Algorithms
- Topic: How do environments grow in infinite DMRG?
- Replies: 2
- Views: 9680
Re: How do environments grow in infinite DMRG?
The figure 11 is a little bit misleading by stating that this happens between the sweeps, and it seems like we update both left and right environments at once. I chose to simplify in this figure to make it easier to grasp what is going on on the conceptual level - the figure makes clear that you nee...
- 27 Jan 2023, 15:53
- Forum: Algorithms
- Topic: How do environments grow in infinite DMRG?
- Replies: 2
- Views: 9680
How do environments grow in infinite DMRG?
I got the following, very reasonable question via email: In 1805.00055 there is a picture showing the update of the environment in the iDMRG (figure 11). I understood that between sweeps we are making two copies of the "central" system, and contracting it with the left and right environmen...