Search found 465 matches
- 25 Sep 2024, 15:19
- Forum: HowTos and FAQ for TeNPy
- Topic: Strategies to run large-memory calculations?
- Replies: 2
- Views: 60219
Re: Strategies to run large-memory calculations?
I guess I'm late for you to solve the problem, but maybe as a hint for people trying to solve it in the future: The #SBATCH --nodes=2 asks SLURM for 2 nodes with MPI paralellization. TeNPy can not utilize that (unless you're working in the mpi_parallel branch, which is for very specific use cases on...
- 25 Sep 2024, 14:44
- Forum: HowTos and FAQ for TeNPy
- Topic: Why is finite DMRG running so slowly?
- Replies: 1
- Views: 34223
Re: Why is finite DMRG running so slowly?
TeNPy has comparable speed with other libraries like ITensor , if you fix parameters for a fair comparison. One big difference is the default dmrg_params['lanczos_params']['N_max'] , the maximum number of lanczos iterations for finding the "ground state" before moving on to the next site. ...
- 25 Sep 2024, 14:30
- Forum: HowTos and FAQ for TeNPy
- Topic: Variance of purified MPS state
- Replies: 2
- Views: 49713
Re: Variance of purified MPS state
It's not hard to generalize and adjust the source of that variance function to work with purificationMPS - all you need to do is to initially check whether you have the additional q leg (at the top of the function), and if so, in addition contract the additional ['q'] with ['q*'] leg in the tensordo...
- 25 Sep 2024, 14:17
- Forum: HowTos and FAQ for TeNPy
- Topic: Momentum Distribution from MPS
- Replies: 1
- Views: 32418
Re: Momentum Distribution from MPS
I'm not quite sure what you mean with "momentum distribution". What you can do is measure the correlation function corrs=psi.correlation_function('bd', b') to get \bra{\psi} b^\dagger_i b_{j} \ket{\psi} in real space, and then perform a fourier trafo on both axes, which gives you something...
- 25 Sep 2024, 14:06
- Forum: HowTos and FAQ for TeNPy
- Topic: DMRG Calculation for Large Systems
- Replies: 2
- Views: 47579
Re: DMRG Calculation for Large Systems
to put this a bit into perspective, 30 minutes of runtime is often still considered very moderate, state-of-the-art DMRG calculations for publications in journals often run several days to weeks on high-performance-computing cluster nodes with >30 cores (more powerfull than a laptop...) Also, it's i...
- 25 Sep 2024, 13:39
- Forum: HowTos and FAQ for TeNPy
- Topic: Gap in open spin chain :
- Replies: 1
- Views: 26313
Re: Gap in open spin chain :
The Warning is very relevant here: since version 0.9.0 , the `orthogonal_to` should not be an entry in the `dmrg_params`, but should be a direct keyword argument to the dmrg.run() function, i.e. somthing like dmrg.run(psi, M, dmrg_params, orthogonal_to=states) . As an alternative, you might want to ...
- 25 Sep 2024, 13:18
- Forum: HowTos and FAQ for TeNPy
- Topic: How to model anisotropic exchange J, single-ion anisotropy and DMI for DMRG?
- Replies: 5
- Views: 60686
Re: How to model anisotropic exchange J, single-ion anisotropy and DMI for DMRG?
1) If you look at the imange of the tenpy.models.lattice.Triangular lattice, you'll see that it's 30 degrees rotatet compared to your image - that's the pi/6 offsett here. 2) If you explicitly have Jxy, Jyx etc, then these will contribute to the very same "terms" Sx_i Sy_j etc that the DMI...
- 25 Sep 2024, 13:04
- Forum: HowTos and FAQ for TeNPy
- Topic: Custom Hamiltonian with multiple fermions and conserved charges
- Replies: 1
- Views: 17962
Re: Custom Hamiltonian with multiple fermions and conserved charges
Not sure if this is still relevant or solved by now, but anyways: the issue here is that the tenpy.models.lattice.Chain expects that it has a single-site unit cell only. Try using a more general lattice that allows for multiple sites in the MPS unit cell. The "correct" or recommend way in ...
- 25 Sep 2024, 12:35
- Forum: HowTos and FAQ for TeNPy
- Topic: Different coupling terms on different sites
- Replies: 7
- Views: 53617
Re: Different coupling terms on different sites
As documented, the
strength
argumente of add_coupling can be a numpy array - for a square lattice with Lx by Ly sites, for nearest-neighbor hopping/interaction in y -direction, it could be of shape (Lx, Ly-1), or for the one in x-direction (Lx-1, Ly), respectively.- 27 May 2024, 16:08
- Forum: HowTos and FAQ for TeNPy
- Topic: How to evolve an infinite temperature state in a long range Hamiltonian system?
- Replies: 1
- Views: 15331
Re: How to evolve an infinite temperature state in a long range Hamiltonian system?
At the moment, you should use tenpy.algorithms.purification.PurificationApplyMPO for models with long range. (Or alternatively group sites and use the PurificationTEBD as you suggested.) TDVP doesn't work with purification at the moment. Really, we should refactor the purification code a bit such th...
- 27 May 2024, 15:51
- Forum: HowTos and FAQ for TeNPy
- Topic: Calculating Purity of PurificationMPS
- Replies: 1
- Views: 11508
Re: Calculating Purity of PurificationMPS
The best idea I can come up with on the spot would be to contract Tr(rho^2) as a tensor network from left to right. There's no function for that in TeNPy ritght now, but it shouldn't be hard to implement that. Doing this is O(chi^5), though, so it's quite expensive compared to the usual O(chi^3) sca...
- 27 May 2024, 10:34
- Forum: HowTos and FAQ for TeNPy
- Topic: Purification for Finite Temperature Simulations
- Replies: 2
- Views: 14309
Re: Purification for Finite Temperature Simulations
1) these `d` are the time steps for the time evolution that give you a second-order instead of first-order precision by canceling the error terms of O(dt^2). 2) The the new post in that topic. As I said there, it's fixed if you call psi.canonical_form() once more (at least for finite systems). Fix i...
- 27 May 2024, 10:33
- Forum: HowTos and FAQ for TeNPy
- Topic: How to define a infiniteT MPS under canonical ensemble
- Replies: 5
- Views: 27962
Re: How to define a infiniteT MPS under canonical ensemble
The fix is here: PR #414
- 27 May 2024, 09:16
- Forum: HowTos and FAQ for TeNPy
- Topic: How to define a infiniteT MPS under canonical ensemble
- Replies: 5
- Views: 27962
Re: How to define a infiniteT MPS under canonical ensemble
Since there was another question coming back to this: I do understand this now. The error comes from the fact that the imaginary TEBD algorithm applies non-unitary 2-site gates, which change the state and in general also singular values on other bonds. After one update sweep, we end with A S B B B B...
- 27 May 2024, 08:50
- Forum: HowTos and FAQ for TeNPy
- Topic: Can I use tenpy to calculate boson t-J model ?
- Replies: 1
- Views: 9125
Re: Can I use tenpy to calculate boson t-J model ?
Indeed, there's no predefined model for that, but it shouldn't be too difficult to write a new model class for that. Basically, you want to adjust the exisiting tenpy.models.tj_model.TJModel , but use a new bosonic version of the tenpy.networks.site.SpinHalfHoleSite as the local site. Try starting t...
- 27 May 2024, 08:39
- Forum: HowTos and FAQ for TeNPy
- Topic: How to use MPS.from_Bflat
- Replies: 3
- Views: 12580
Re: How to use MPS.from_Bflat
I'm confused. ED should give you an MPS on a finite system, possibly with PBC (?). How did you map that to the infinite system for comparison?
If you want to compare 1:1, you need to compare finite MPS on PBC to ED on PBC, as I explained above.
If you want to compare 1:1, you need to compare finite MPS on PBC to ED on PBC, as I explained above.
- 13 May 2024, 05:25
- Forum: HowTos and FAQ for TeNPy
- Topic: How to use MPS.from_Bflat
- Replies: 3
- Views: 12580
Re: How to use MPS.from_Bflat
The finite mps in Tenpy always has open boundary conditions. In other words, in finite systems, the vL on the first tensor should be trivial of dimension 1, and so should be the vR leg of the last tensor. Closing the loop on the virtual legs with a trace is nasty for numerical simulations, since it ...
- 08 May 2024, 14:15
- Forum: HowTos and FAQ for TeNPy
- Topic: Implementing iDMRG for ladder lattices
- Replies: 2
- Views: 13965
Re: Implementing iDMRG for ladder lattices
Let me be a bit more explicit: in the simple case of the Ladder, the following lines in init_couplings are equivalent: add_coupling(-t, 0, 'Cdu', 0, 'Cu', dx=1, plus_hc=True) add_coupling(-tv, 0, 'Cdu', 1, 'Cu', dx=1, plus_hc=True) add_coupling(-t, 1, 'Cdu', 1, 'Cu', dx=1, plus_hc=True) for x in ran...
- 08 May 2024, 14:04
- Forum: HowTos and FAQ for TeNPy
- Topic: Implementing iDMRG for ladder lattices
- Replies: 2
- Views: 13965
Re: Implementing iDMRG for ladder lattices
Hi Fabio, whether you call add_coupling or explicitly loop over add_local_term doesn't matter for the final DMRG run, if you get the same couplings in the MPO of the hamiltonian - but with the latter, you need to iterate over the starting point of the couplings in real space, so you are responsible ...
- 07 May 2024, 09:53
- Forum: Algorithms
- Topic: Gate-based TEBD
- Replies: 1
- Views: 137775
Re: Gate-based TEBD
It doesn't allow this out of the box, but you can easily write your own subclass of the TEBD Engine which just plugs in the corresponding Us. Essentially, you want to re-use the `update_step` function for the evolution (and maybe the first order suzuki trotter decomposition, depending on how you wan...
- 07 May 2024, 08:11
- Forum: HowTos and FAQ for TeNPy
- Topic: Issue with Missing Subscripts on Fermionic Operators in all_coupling_terms().to_TermList() Output
- Replies: 4
- Views: 12183
Re: Issue with Missing Subscripts on Fermionic Operators in all_coupling_terms().to_TermList() Output
I've quickly fixed that formatting to include brackets in 9739ac3a4e26cbbfada009ec6bef6c3d7286a0a8
- 07 May 2024, 07:57
- Forum: HowTos and FAQ for TeNPy
- Topic: Issue with Missing Subscripts on Fermionic Operators in all_coupling_terms().to_TermList() Output
- Replies: 4
- Views: 12183
Re: Issue with Missing Subscripts on Fermionic Operators in all_coupling_terms().to_TermList() Output
The subscript notation is a bit misleading here, because it suggests that it only applies to the next operator. Really, you should read those operators to be grouped like this: 1.00000 * (Cdd Cu)_0 (Cdu Cd)_1 + 1.00000 * (Cdd Cu)_1 (Cdu Cd)_2 + 1.00000 * (Cdd Cu)_2 (Cdu Cd)_3 + 1.00000 * (Cdd Cu)_3 ...
- 07 May 2024, 07:43
- Forum: HowTos and FAQ for TeNPy
- Topic: Applying different time evolution to different subsystems with TEBD
- Replies: 2
- Views: 37032
Re: Applying different time evolution to different subsystems with TEBD
Jakob is totally right, of course. Let me just mention that it wouldn't be too hard to extend TEBD to work with this. Define a new LadderTEBDEngine, which takes the two models as input, and define 2 separate TEBD engines for them. Then overwrite: def evolve(...): # start with site order # A0 B0 A1 B...
- 16 Apr 2024, 10:15
- Forum: HowTos and FAQ for TeNPy
- Topic: Transfer matrix is incorrect without imposing canonical form
- Replies: 1
- Views: 22294
Re: Transfer matrix is incorrect without imposing canonical form
If you need to_matrix, why don't you implement that function directly on the existing transfer matrix? To get a consistent result, all tensor which you extract *need* to be in the same canonical form, e.g. all right-canonical 'B' form. After a plain DMRG run (without a call of psi.canonical_form() i...
- 10 Apr 2024, 17:42
- Forum: HowTos and FAQ for TeNPy
- Topic: How can I construct a canonical infinite-temperature state with fixed total number of fermions ?
- Replies: 1
- Views: 59032
Re: How can I construct a canonical infinite-temperature state with fixed total number of fermions ?
I guess the answer is a bit late, but for those finding this in the future: it should just work like this: In [10]: M = tenpy.FermiHubbardModel(dict(L=10, cons_Sz='Sz', cons_N='N')) In [11]: M.lat.unit_cell[0].leg.chinfo Out[11]: ChargeInfo([1, 1], ['N', '2*Sz']) In [12]: psi = tenpy.PurificationMPS...