Search found 465 matches
- 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: 24059
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: 8146
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: 24524
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: 8065
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: 45162
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
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

- 24 Apr 2023, 10:10
- Forum: HowTos and FAQ for TeNPy
- Topic: dmrg.run() claims quartic Hamiltonian is zero
- Replies: 3
- Views: 11953
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: 8840
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: 11681
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: 10304
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: 47374
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: 47374
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...
- 27 Jan 2023, 15:22
- Forum: Algorithms
- Topic: How are periodic boundary conditions implemented?
- Replies: 4
- Views: 68875
Re: How are periodic boundary conditions implemented?
Indeed, the MPS is always an open line where a cut of a single virtual leg always divides it into left and right parts - otherwise, the canonical form isometry conditions wouldn't go through e.g. for local expectation values or optimal truncation. When you use infinite MPS, the Model formally has &q...
- 26 Jan 2023, 18:25
- Forum: HowTos and FAQ for TeNPy
- Topic: norm attribute when doing compress_svd()
- Replies: 2
- Views: 10732
Re: norm attribute when doing compress_svd()
Sorry for the slow response. I've answered the 165 rather extensively, I hope that clarifies things. If the operator you apply is not exactly unitary, it is to be expected that it changes the norm, isn't it? But you can indeed manually reset psi.norm = 1 by hand if needed. The norm is only relevant ...
- 26 Jan 2023, 17:36
- Forum: HowTos and FAQ for TeNPy
- Topic: Expected speedups for Sz or parity conservation in qc simulations
- Replies: 2
- Views: 26795
Re: Expected speedups for Sz or parity conservation in qc simulations
In general yes, using Sz or parity conservation can speed up calculations. The actual speedup depends on the number and sizes of symmetry sectors in the tensors - it comes from the fact that the tensors have a block-diagonal form. Parity conservation divides a tensor into 2 subsectors, leading to a ...
- 08 Nov 2022, 09:35
- Forum: HowTos and FAQ for TeNPy
- Topic: Asking about how to calculate expectation values after TDVP evolution
- Replies: 6
- Views: 19058
Re: Asking about how to calculate expectation values after TDVP evolution
A Haar random state has (almost) maximal entanglement and can thus *not* be compressed into an MPS (for large system sizes without significant truncation). If you have a given Haar random state, you could try to convert it to a np_conserved Array and then into an MPS (without charge conservation, so...
- 07 Nov 2022, 16:30
- Forum: HowTos and FAQ for TeNPy
- Topic: Applying an iMPO to an iMPS
- Replies: 2
- Views: 10031
Re: Applying an iMPO to an iMPS
The issue lies in different scalings with system size and hence definitions for overlaps that are not what you expect naively. For infinite MPS, the overlap is formally 0, 1, or infinite, and as such not very usefull. Instead, MPS.overlap returns the "overlap per unit cell", to be precise ...
- 07 Nov 2022, 10:35
- Forum: HowTos and FAQ for TeNPy
- Topic: ExpMPOEvolution.run() vs. update()
- Replies: 2
- Views: 11583
Re: ExpMPOEvolution.run() vs. update()
The latter is the recommended way to do a time evolution. You can find the corresponding loop in the source code of the RealTimeEvolution Simulation class in the run_algorithm method.
- 07 Nov 2022, 10:26
- Forum: HowTos and FAQ for TeNPy
- Topic: Asking about how to calculate expectation values after TDVP evolution
- Replies: 6
- Views: 19058
Re: Asking about how to calculate expectation values after TDVP evolution
This is really standard arguments from quantum mechanics: You can use Sz conseration, if [H,S^z] = 0 , where S^z = \sum_i S^z_i . In that case, you *choose* to work in fixed magnetization sectors and write an initial state with S^z |\psi_0\rangle = m \hbar | \psi_0 \rangle , where m\in \mathbb{R} is...
- 04 Nov 2022, 17:22
- Forum: HowTos and FAQ for TeNPy
- Topic: How to add Jordan-Wigner strings on the left sites of an operator?
- Replies: 1
- Views: 8076
- 04 Nov 2022, 17:21
- Forum: HowTos and FAQ for TeNPy
- Topic: MPO-MPS contraction using apply
- Replies: 1
- Views: 9012
Re: MPO-MPS contraction using apply
Sorry that I couldn't answer earlier, I'd been swamped with other things to finish. You're on the right track, but had some convention issue along the way: First, in TeNPy, the convention is that Jordan Wigner strings extend to the left, not to the right. The MPO you wrote down generates \sum_i \alp...
- 04 Nov 2022, 17:03
- Forum: HowTos and FAQ for TeNPy
- Topic: Apply MPO to another MPO
- Replies: 1
- Views: 6884
Re: Apply MPO to another MPO
This is not supported at this point. It's also not quite trivial especially in the case of infinite MPS, since MPOs are often extensive (scaling with L), and multiplying them can give you something quadratic in L.
- 04 Nov 2022, 15:54
- Forum: HowTos and FAQ for TeNPy
- Topic: Bose-Hubbard Model Single Particle Excitation Gap
- Replies: 2
- Views: 8922
Re: Bose-Hubbard Model Single Particle Excitation Gap
Thanks for the suggestion, this is indeed the way to go here. See e.g. arXiv:cond-mat/9906019 for details.
- 04 Nov 2022, 15:45
- Forum: HowTos and FAQ for TeNPy
- Topic: Trouble installing tenpy
- Replies: 2
- Views: 8508
Re: Trouble installing tenpy
On personal laptops, I'd recommend to download anaconda and install the corresponding conda package, then you don't need any build tool yourself.
Note that the latest version 0.9 is by now over a year old, I'll release a new version either today or on Monday....
Note that the latest version 0.9 is by now over a year old, I'll release a new version either today or on Monday....
- 04 Nov 2022, 15:42
- Forum: HowTos and FAQ for TeNPy
- Topic: Asking about how to calculate expectation values after TDVP evolution
- Replies: 6
- Views: 19058
Re: Asking about how to calculate expectation values after TDVP evolution
The XXZ chain by default turns on Sz conservation. Hence, there is no operator 'Sx' or 'Sy', because they don't conserve the Sz charge. Due to Sz conservation, you immediately know that expectation values of Sx and Sy are zero. See also this FAQ question However, note that the correlations <Sx_i Sx_...
- 04 Nov 2022, 15:03
- Forum: HowTos and FAQ for TeNPy
- Topic: Comparing Wave Functions with Different Charge Infos
- Replies: 1
- Views: 6866
Re: Comparing Wave Functions with Different Charge Infos
The Array class has the methods drop_charge and change_charge . What's missing is functions to do this for each tensor in an MPS (or similarly, an MPO). You could do something along the following snippet: def MPS_drop_charge(psi, charge=None, chinfo=None, permute_p_leg=True): psi_c = psi.copy() psi_...