Search found 422 matches
- 22 Mar 2021, 23:58
- Forum: HowTos and FAQ for TeNPy
- Topic: Excited states using tenpy
- Replies: 13
- Views: 8144
Re: Excited states using tenpy
Sounds like you're after the bc_shift . With bc_shift=['open', -1] for finite MPS or bc_shift=['periodic', -1] for infinite MPS, couplings in "y-direction" of the lattice wind like a helix around the cylinder. More details in this userguide section . It might also be useful to look at the ...
- 22 Mar 2021, 23:43
- Forum: HowTos and FAQ for TeNPy
- Topic: TDVP run time issue
- Replies: 3
- Views: 2572
Re: TDVP run time issue
1) Glad that this helped. Watch out for the new version of TeNPy that will be released in the next few days! 2) You're more than welcome to contribute! There's plenty of things to be done. Hmm, I'm not completely sure, but it might just be that chi=500 is too small to reach that time. I did some sim...
- 22 Mar 2021, 21:50
- Forum: HowTos and FAQ for TeNPy
- Topic: np conserved module
- Replies: 3
- Views: 3002
Re: np conserved module
If your model is conserving Sz, you should also make sure you conserve Sz during the time evolution for speedup. In this case, the expectation value splits up into \langle g.s. | \sigma_j^x(t)\sigma_0^x(0)|g.s. \rangle = \langle g.s. | \sigma_j^+(t)\sigma_0^-(0)|g.s. \rangle + \langle g.s. | \sigma_...
- 22 Mar 2021, 21:36
- Forum: HowTos and FAQ for TeNPy
- Topic: Particle Number Conservation
- Replies: 7
- Views: 3992
Re: Particle Number Conservation
As far as I understand the error message, it claims that strength_vals is an integer array and hence can not divided by 2. in place . On your side, there's a very easy fix: specifying g = 1. as a float instead of g = 1 as an int - as you do in the default parameters. On TeNPy side, this is likely so...
- 22 Mar 2021, 17:58
- Forum: HowTos and FAQ for TeNPy
- Topic: Particle Number Conservation
- Replies: 7
- Views: 3992
Re: Particle Number Conservation
Your couplings preserve the number of fermions and bosons independently , so you want to end up with qnumber=2 charges. Try using charges='independent' when combining the sites. Moreover, you double-count the N-terms compared to the hopping terms by explicitly adding plus_hc=True , at least if you i...
- 22 Mar 2021, 17:18
- Forum: HowTos and FAQ for TeNPy
- Topic: Exponentiation of operator / String order parameter
- Replies: 11
- Views: 96449
Re: Exponentiation of operator / String order parameter
The correlation function is built with the intention that the i and j are multiple values; that's why the position r of opstr[r] is the index inside the MPS, not relative to i : opstrs = [s.Id if j % 2 == 0 else npc.expm(1.j * np.pi * Sz) for j, s in enumerate(psi.sites)] psi.correlation_function(&q...
- 14 Mar 2021, 19:08
- Forum: HowTos and FAQ for TeNPy
- Topic: How to use TDVP for one site
- Replies: 3
- Views: 2569
Re: How to use TDVP for one site
Hi Pablo, The definition of TDVP in the context of MPS means to project the time evolution into the subspace/manifold of MPS at a fixed bond dimension. Single-Site TDVP is doing exactly that: whatever bond dimension you start with, it will keep that bond dimension. That means when you start from a p...
- 12 Mar 2021, 23:59
- Forum: HowTos and FAQ for TeNPy
- Topic: Energy gap for Odd and Even length
- Replies: 2
- Views: 2060
Re: Energy gap for Odd and Even length
Short answer: Honestly, I don't know. From my limited experience with Bose-Hubbard physics, I could certainly imagine this to be a physical effect. Some suggestions for further investigation: Double-check that you're converged in the Nmax parameter of the BosonSite, i.e. how many bosons can occupy a...
- 12 Mar 2021, 21:12
- Forum: HowTos and FAQ for TeNPy
- Topic: How to deal with different ChargeInfos
- Replies: 2
- Views: 2100
Re: How to deal with different ChargeInfos
I'm not completely sure if I understand what you want to do and what you mean with "Gutzwiller projection". As far as I understand, you have found an MPS of SpinHalfFermionSite -based model with both Sz and N conservation. Now you want to "project" into the subspace of fixed part...
- 12 Mar 2021, 00:59
- Forum: HowTos and FAQ for TeNPy
- Topic: Using BC_shift on cylinder
- Replies: 1
- Views: 1514
Re: Using BC_shift on cylinder
Indeed, as far as I understand your question, you're trying to describe what the bc_shift parameter does. This one allows for a (basically) arbitrary shift when going around the cylinder; I guess you want it to be 1 or 2 in the most cases. Have you seen this section of the user-guide that I added a ...
- 12 Mar 2021, 00:40
- Forum: HowTos and FAQ for TeNPy
- Topic: Dynamical spin Structure Factor/ Excitation Spectrum of Spin Ladder
- Replies: 15
- Views: 9390
Re: Dynamical spin Structure Factor/ Excitation Spectrum of Spin Ladder
The MPS.expectation_value method for a given \(|\phi\rangle\) gives you \(\langle\phi|A_i|\phi\rangle\), but you need
\(\langle\psi|A_i|\phi\rangle\) with \(|\phi\rangle = \exp(-i H t) B_j |\psi_0\rangle\).
The latter is exactly what MPSEnvironment.expectation_value provides.
\(\langle\psi|A_i|\phi\rangle\) with \(|\phi\rangle = \exp(-i H t) B_j |\psi_0\rangle\).
The latter is exactly what MPSEnvironment.expectation_value provides.
- 11 Mar 2021, 22:55
- Forum: HowTos and FAQ for TeNPy
- Topic: Dynamical spin Structure Factor/ Excitation Spectrum of Spin Ladder
- Replies: 15
- Views: 9390
Re: Dynamical spin Structure Factor/ Excitation Spectrum of Spin Ladder
Your new question is probably the follow up on this, so I guess I'm already a bit too late (Sorry :oops: ), but let me comment anyways. The first "standard" thing to do is to just calculate the next excited states (assuming that you have a finite system) using the "orthogonal_to"...
- 11 Mar 2021, 08:50
- Forum: HowTos and FAQ for TeNPy
- Topic: Non-Hermitian problem while using self-defined model
- Replies: 2
- Views: 2177
Re: Non-Hermitian problem while using self-defined model
Wow, that sounds like some interesting physics! Sometimes, it's helpful to double-check the terms produced by the model. In your case, print(M.all_coupling_terms().to_TermList()) prints -1.00000 * B gJW_0 Bd_1 + -1.00000 * Bd gJWd_0 B_1 + -1.00000 * B gJW_1 Bd_2 + -1.00000 * Bd gJWd_1 B_2 + ... Here...
- 11 Mar 2021, 03:08
- Forum: HowTos and FAQ for TeNPy
- Topic: Fourier Transform Product state
- Replies: 1
- Views: 1860
Re: Fourier Transform Product state
The MPS does not know about the Hamiltonian, so it can't have an "energy" per se. Instead, you have a model you ran DMRG with, and you can compute the energy from the MPO of that model as E = model.H_MPO.expectation_value(psi) giving you the value E = \langle \psi | H |\psi \rangle . (For ...
- 11 Mar 2021, 02:36
- Forum: HowTos and FAQ for TeNPy
- Topic: Product state of rotated spins for SpinHalfFermionSite
- Replies: 2
- Views: 2127
Re: Product state of rotated spins for SpinHalfFermionSite
Hi Tana, first of all, welcome to TeNPy, and sorry that I didn't reply earlier. I hope this still helps. The issue which you ran into is quite simple: the SpinHalfFermionSite represents a 4-dimensional local Hilbert space (with states "empty", "spin-up", "spin-down", &q...
- 11 Mar 2021, 02:22
- Forum: HowTos and FAQ for TeNPy
- Topic: RuntimeWarning and how to fix it
- Replies: 3
- Views: 2406
Re: RuntimeWarning and how to fix it
Hmmm. I'm still a bit worried, because after all we should usually avoid taking inverses of small singular values all-together for numerical stability. I tried to track down where it came from and found that it basically stems from this line in MPS.compress_svd() not truncating tiny singualar values...
- 11 Mar 2021, 00:50
- Forum: HowTos and FAQ for TeNPy
- Topic: RuntimeWarning and how to fix it
- Replies: 3
- Views: 2406
Re: RuntimeWarning and how to fix it
Hi Ruben, I have seen this warning before as well, but not so much lately. I vaguely remember that I also tried printing the S values and/or checking that none of them was 0 or negative, but couldn't quite pinpoint it.When testing S=S**-1. for different values like S = np.array([1.e-2, 1.e-15, 1.e-2...
- 25 Feb 2021, 07:06
- Forum: HowTos and FAQ for TeNPy
- Topic: How to define a infiniteT MPS under canonical ensemble
- Replies: 3
- Views: 2482
Re: How to define a infiniteT MPS under canonical ensemble
I played around with this a little bit. When you choose a smaller time step, the error gets smaller, it's O(dt). Further, I noticed that the error is coming from the state not being in canonical form: If you call psi.canonical_form_finite() right before measurements, at least this error is gone, as ...
- 11 Feb 2021, 23:05
- Forum: HowTos and FAQ for TeNPy
- Topic: np conserved module
- Replies: 3
- Views: 3002
Re: np conserved module
Why do you need the state Sx|psi> in the first place? As you know, S^x=0.5* (S^+ + S^-) and thus applying Sx to a state S|\psi\rangle with fixed Sz will give you a superposition of |\phi^\pm\rangle := S^\pm |\psi\rangle . In other words, S^x |\psi\rangle does not have a well defined Sz charge, and c...
- 11 Feb 2021, 02:20
- Forum: HowTos and FAQ for TeNPy
- Topic: Convergence Problem for Quantum Impurity Systems
- Replies: 2
- Views: 1804
Re: Convergence Problem for Quantum Impurity Systems
Sorry for the late reply. In general, I think DMRG should be suitable for such problems. I could understand that it fails for tiny/zero values of lambda, but for O(1) values of lambda it should definitely work. (In fact, I think that people have successfully used DMRG as an impurity solver for DMFT....
- 11 Feb 2021, 00:57
- Forum: HowTos and FAQ for TeNPy
- Topic: Excited states using tenpy
- Replies: 13
- Views: 8144
Re: Excited states using tenpy
I've update the model userguide to inclue a new section on this.
- 11 Feb 2021, 00:33
- Forum: HowTos and FAQ for TeNPy
- Topic: Two component Bose-Hubbard model
- Replies: 4
- Views: 5244
Re: Two component Bose-Hubbard model
Your code looks right. I would have done it basically the same way :) In the newest version of TeNPy, tenpy.networks.site.multi_sites_combine_charges is deprecated in favor of tenpy.networks.site.set_common_charges , you should call it with set_common_charges([siteA, siteB], 'independent') . This sh...
- 10 Feb 2021, 19:23
- Forum: HowTos and FAQ for TeNPy
- Topic: Excited states using tenpy
- Replies: 13
- Views: 8144
Re: Excited states using tenpy
Yes, any strength given to add_onsite, add_coupling, or add_multi_coupling can be an array, as documented in these functions.
Thus also Jv, is allowed to be a numpy array. The shape it needs to have depend on the boundary conditions and shape of your lattice.
- 09 Feb 2021, 22:00
- Forum: HowTos and FAQ for TeNPy
- Topic: Excited states using tenpy
- Replies: 13
- Views: 8144
Re: Excited states using tenpy
the line states = dmrg_params['orthogonal_to'] = [] creates a new list and assigns it to both the variable name states and dmrg_params['orthogonal_to'] . Remember, in Python everything is an "object", and your variables really are just references to objects. Inside the loop, you first crea...
- 05 Feb 2021, 18:33
- Forum: HowTos and FAQ for TeNPy
- Topic: TDVP run time issue
- Replies: 3
- Views: 2572
Re: TDVP run time issue
1) How did you try to install TeNPy? It looks like it's using a version installed with `pip` into the local home directory. Can you try to pip uninstall physics-tenpy and then try to re-install TeNPy? Moreover, the svd_gesvd hints that you're using a very old version of scipy? What python are you us...