Search found 422 matches
- 18 Jul 2022, 16:09
- Forum: HowTos and FAQ for TeNPy
- Topic: Hermitian conjugate for coupled system
- Replies: 1
- Views: 1625
Re: Hermitian conjugate for coupled system
The first example adds terms b^\dagger_{x,0} b_{x,1} n_{x+1,1} + b^\dagger_{x,1} b_{x,0} n_{x+1,0} , which is not hermitian due to the switch in the n index. DMRG (or more precisely the Lanczos called by DMRG) always assumes a hermitian Hamiltonian! The "poorly conditioned Lanczos" is like...
- 18 Jul 2022, 15:48
- Forum: HowTos and FAQ for TeNPy
- Topic: Cell choice and long range correlations in a 2D iDMRG calculation
- Replies: 2
- Views: 1782
Re: Cell choice and long range correlations in a 2D iDMRG calculation
If you expect translation invariance along the cylinder direction (and you Hamiltonian itself is also translation invariant in x-direction), Lx=1 is certainly a natural choice. Using Lx=1 does not hinder the calculation of correlation lengths - in general, if you have an infinite MPS, it just implie...
- 18 Jul 2022, 15:11
- Forum: HowTos and FAQ for TeNPy
- Topic: Different Energy measures giving mixed results
- Replies: 1
- Views: 1652
Re: Different Energy measures giving mixed results
TEBD breaks translation invariance by performing the Trotterization of the evolution operator onto even/odd bonds. The direct way to reduce this effect is to do more, but smaller timesteps. You could also try to do higher-order evolution, but of course that doesn't make your algorithm higher-order i...
- 18 Jul 2022, 14:42
- Forum: HowTos and FAQ for TeNPy
- Topic: Newcomer of tenpy having an issue with my code
- Replies: 1
- Views: 8156
Re: Newcomer of tenpy having an issue with my code
It's correct behaviour that the state doesn't change: You start from the fully polarized all-up state, which is an eigenstate of the Hamiltonian! Try to start from another initial state, e.g. the Neel state: product_state = ["up", "down"] psi = MPS.from_product_state(M.lat.mps_si...
- 17 Jun 2022, 12:17
- Forum: Implementations
- Topic: Why can we set a low number of maximal Lanczos iterations in DMRG?
- Replies: 0
- Views: 43668
Why can we set a low number of maximal Lanczos iterations in DMRG?
Actually, I have a few more questions for you about lanczos in TeNPy. I notice that in TeNPy you set the default maximum number of iterations for lanczos (i.e. the attribute N_max) to be 20. However, when I tried to realize DMRG and lanczos algorithm on my own, I found that for a Hermitian matrix w...
- 17 Jun 2022, 12:02
- Forum: HowTos and FAQ for TeNPy
- Topic: add_multi_coupling vs. GroupedSite
- Replies: 4
- Views: 4204
Re: add_multi_coupling vs. GroupedSite
What bond dimensions did you try for the timing benchmarks? I'd expect it to become relevant only around chi >~500 or so, maybe even just with chi on the order of a thousands.
- 10 Jun 2022, 19:01
- Forum: HowTos and FAQ for TeNPy
- Topic: Linking against MKL
- Replies: 1
- Views: 2192
Re: Linking against MKL
It's documented in the conda-forge docs here . I think that's actually fine and properly linked against mkl. I've checked, and when I start from a fresh conda environment defined by TeNPy's environment.yml, I also get the # All requested packages already installed. Indeed, when I checked the install...
- 10 Jun 2022, 16:16
- Forum: HowTos and FAQ for TeNPy
- Topic: add_multi_coupling vs. GroupedSite
- Replies: 4
- Views: 4204
Re: add_multi_coupling vs. GroupedSite
Of course, both approaches can work and should give similar results eventually; but I'd usually recommend not grouping sites if you can manage to write the model without grouping. Let me elaborate: When using the tenpy.networks.site.GroupedSite , you will double your local Hilbert space dimension d ...
- 10 Jun 2022, 15:24
- Forum: HowTos and FAQ for TeNPy
- Topic: How to apply a quantum channel?
- Replies: 2
- Views: 1999
Re: How to apply a quantum channel?
I'm confused - what state do you start with? Some ground state, or other pure state, represented as an MPS? What do you want to calculate afterwards? You can use TeNPy to get the single-site reduced density matrix, and then apply the dephasing channel, but you can not apply it on the whole MPS: it's...
- 01 Jun 2022, 13:50
- Forum: HowTos and FAQ for TeNPy
- Topic: About the entropy growth in random unitary circuit
- Replies: 2
- Views: 2405
Re: About the entropy growth in random unitary circuit
With the random unitary evolution, you get an ensemble of Haar-distributed states, i.e. each normalized state has the same probability. Since there *are* states with less than maximal, but no states with more-than-maximal entropy, it is clear that the average entropy in the Haar distribution is less...
- 30 May 2022, 10:40
- Forum: HowTos and FAQ for TeNPy
- Topic: 1d lattice with arbitrary distribution of sites
- Replies: 1
- Views: 2391
Re: 1d lattice with arbitrary distribution of sites
Hi Umberto, there is a tenpy.models.lattice.TrivialLattice , which is exactly the approach 1) you described - it just takes a list of sites, and defines them as a single, big unit cell. Internally in TeNPy, this is used if you group sites together, since you then no longer have the original lattice ...
- 30 May 2022, 10:23
- Forum: HowTos and FAQ for TeNPy
- Topic: Alternating Heisenberg coupling at infinite chain
- Replies: 4
- Views: 2845
Re: Alternating Heisenberg coupling at infinite chain
I don't see the issue here, I checked that it works for an even number of couplings , where the couplings are not incommensurable. For nearest neighbor couplings A_i B_{i+1}, this means it works for (finite, odd # sites) or (infinite, even # sites), as you can easily check with the example below. No...
- 03 May 2022, 15:10
- Forum: HowTos and FAQ for TeNPy
- Topic: Alternating Heisenberg coupling at infinite chain
- Replies: 4
- Views: 2845
Re: Alternating Heisenberg coupling at infinite chain
Hi,
yes, that is correct. It works if the number of couplings is even (ie. odd number of sites for finite systems, even number of sites for infinite MPS) , otherwise it complains about incommensurate arrays for the expansion.
yes, that is correct. It works if the number of couplings is even (ie. odd number of sites for finite systems, even number of sites for infinite MPS) , otherwise it complains about incommensurate arrays for the expansion.
- 26 Apr 2022, 17:07
- Forum: HowTos and FAQ for TeNPy
- Topic: calculate four-point correlation function
- Replies: 1
- Views: 1877
Re: calculate four-point correlation function
Yes, you can do better. The explicit loops you have make this scale as O(L^3 \chi^3) , since each call to psi.expectation_value_term is O(|j+1 - i| \chi^3) . You can get this down to O(L^2 \chi^3) by using the term_correlation_function_right or ..._left, with term_L = [('Cd', 0), ('Cd', 1)], term_R=...
- 21 Apr 2022, 02:01
- Forum: HowTos and FAQ for TeNPy
- Topic: Charge Info for Z3 symmetry in 3-state Potts Model
- Replies: 3
- Views: 3401
Re: Charge Info for Z3 symmetry in 3-state Potts Model
TeNPy tries to preserve local, diagonal symmetries, in your case the Z3 symmetry (\sum_i Q_i \mod 3) where Q_i = diag(0, 1, 2) are the charge values you define. However, the Hamiltonian does not preserve these symmetries, since the \Gamma^{(1,2)}_i don't commute with this symmetry. Instead, you need...
- 18 Apr 2022, 17:18
- Forum: HowTos and FAQ for TeNPy
- Topic: iDMRG sweep schedule
- Replies: 3
- Views: 3690
Re: iDMRG sweep schedule
1) These additional sweeps are meant to (i) bring the MPS into canonical form and (ii) converge the environments. Effectively, it's mostly SVDs and environment updates, and usually cheap compared to the Lanczos optimization, so it should be "cheap" to converge things a bit better, even if ...
- 18 Apr 2022, 17:02
- Forum: HowTos and FAQ for TeNPy
- Topic: parallel computing
- Replies: 4
- Views: 3881
Re: parallel computing
The export OMP_NUM_THREADS=1 is a bash command. You should have a slurm/sge/bash script which you submit to the cluster, include this line there. For example, if you use the setup of the TeNPy project repository , you can explicitly add the corresponding line in the file cluster_templates/slurm.sh (...
- 04 Apr 2022, 17:43
- Forum: HowTos and FAQ for TeNPy
- Topic: TDVP time evolution with interaction / onsite state probability
- Replies: 4
- Views: 16512
Re: TDVP time evolution with interaction / onsite state probability
Indeed, the get_probability is not working; it even gives you wrong dimensions of the array when you go beyond 2 sites. Using the onsite reduced density matrix is as pointed out in the post you linked to is indeed one way. Another and maybe even clearer solution would be to define projection operato...
- 01 Apr 2022, 01:39
- Forum: HowTos and FAQ for TeNPy
- Topic: MPS winding for 'new' lattice
- Replies: 2
- Views: 2173
Re: MPS winding for 'new' lattice
I think you're on the right track. I presume your PhtantasticLattice is derived from the base lattice class. What you should do is override the ordering method, similar as is done in the the tenpy.models.lattice.Honeycomb lattice - take a look at the source there. You want the structure def ordering...
- 22 Mar 2022, 01:55
- Forum: HowTos and FAQ for TeNPy
- Topic: How Does Block Absorption Work in MPS DMRG
- Replies: 1
- Views: 2018
Re: How Does Block Absorption Work in MPS DMRG
Yes, the main idea is that you *never* have the Schmidt states as whole, but only as (partial) MPS, recursivley adding tensors to get the Schmidt states on the next bond; see also Figure 4 c) of our paper 1805.00055 . Indeed, the formula you wrote gives the Schmidt states |a_l> in the basis of |a_{l...
- 22 Mar 2022, 01:22
- Forum: HowTos and FAQ for TeNPy
- Topic: iDMRG sweep schedule
- Replies: 3
- Views: 3690
Re: iDMRG sweep schedule
You're referring to the update_LP_RP defined in get_sweep_schedule for n=2 , i.e. a two-site update. As you can see from the i0s, move_right variables, we do 2L updates in total, each updating 2 sites, in the order (0, 1), ..., (L-2, L-1), (L-1, L), (L, L+1), (L-1, L), ..., (1, 2) . Note that this i...
- 22 Mar 2022, 00:52
- Forum: HowTos and FAQ for TeNPy
- Topic: Disentangler
- Replies: 1
- Views: 2308
Re: Disentangler
The disentangling of purified states indeed currently only works for 1D chains where you can do TEBD. In practice, we found in 1711.01288 that only the "backwards" disentangler leads to a speed-up - while we were able to reduce the entanglement further with the other disentanglers, they di...
- 22 Mar 2022, 00:06
- Forum: HowTos and FAQ for TeNPy
- Topic: parallel computing
- Replies: 4
- Views: 3881
Re: parallel computing
Hi Ling, sorry for the late reply!
Indeed, with your question I realized that we probably don't document this sufficiently.
I've just added a corresponding section in the simulation introduction.
Does that answer your questions?
Indeed, with your question I realized that we probably don't document this sufficiently.
I've just added a corresponding section in the simulation introduction.
Does that answer your questions?
- 21 Mar 2022, 22:26
- Forum: HowTos and FAQ for TeNPy
- Topic: How Do I Define New Operators in TenPy
- Replies: 4
- Views: 3290
Re: How Do I Define New Operators in TenPy
Thanks for the reply Jirawat! Your answer nicely explains how to add an onsite operator (given as a matrix) to a local site. Expanding on this, let me just mention that for a CouplingMPOModel it should often be enough to overwrite the init_sites method. A non-trivial example adding an operator P0 pr...
- 09 Feb 2022, 08:39
- Forum: Algorithms
- Topic: Problems with add_local_term and H.c
- Replies: 1
- Views: 9829
Re: Problems with add_local_term and H.c
This case wasn't tested properly, so a bug could sneak in... I've just fixed it in 72f79cce1f7dd04607027322763db2a6b80466e3 and added proper tests. The index error indicates that you didn't actually set the option explicit_plus_hc=True , otherwise it would not have occured... You need to do that as ...