Search found 422 matches
- 13 Apr 2021, 23:58
- Forum: HowTos and FAQ for TeNPy
- Topic: finite open, finite periodic and infinite periodic chains
- Replies: 10
- Views: 9453
Re: finite open, finite periodic and infinite periodic chains
Whoa, I wasn't aware that you want to run it for non-hermitian H. Lancos implicitly assumes that H is hermitian! For that reason at least TeNPy's implementation of TDVP (which uses Lancos to do the local time evolution) does not work for that case! Dropping the hermiticity of H is in general very da...
- 13 Apr 2021, 23:24
- Forum: HowTos and FAQ for TeNPy
- Topic: Energy gap for infinite system using segment DMRG?
- Replies: 2
- Views: 3330
Re: Energy gap for infinite system using segment DMRG?
Hi Ruben, you're right, the DMRG code supports segment boundary conditions already. Right now, you need to extract the left and right environment from a previous DMRG run, and then specify it in resume_data['init_env_data'] to the subsequent DMRG run by hand. There's still some subtleties, e.g. how ...
- 01 Apr 2021, 19:12
- Forum: HowTos and FAQ for TeNPy
- Topic: RuntimeWarning and how to fix it
- Replies: 3
- Views: 2383
Re: RuntimeWarning and how to fix it
Update:
when trying to install TeNPy on a cluster with the Intel Python distribution, we encountered the same runtime warnings.
Looking into this now...
when trying to install TeNPy on a cluster with the Intel Python distribution, we encountered the same runtime warnings.
Looking into this now...
- 01 Apr 2021, 18:33
- Forum: HowTos and FAQ for TeNPy
- Topic: Dynamical spin Structure Factor/ Excitation Spectrum of Spin Ladder
- Replies: 15
- Views: 9337
Re: Dynamical spin Structure Factor/ Excitation Spectrum of Spin Ladder
Sorry, I didn't realize you were looking at infinite MPS. For an infinite MPS, the leg between unit cells is non-trivial, and in general changes when you do a time evolution. This is where the error is coming from: when you initialize the MPSEnvironment, it needs to know how to connect the left-/rig...
- 30 Mar 2021, 21:50
- Forum: HowTos and FAQ for TeNPy
- Topic: Get excited states in different symmetry sectors
- Replies: 3
- Views: 2272
Re: Get excited states in different symmetry sectors
For single-site DMRG to work you need to enable the "mixer" by setting dmrg_params['mixer']=True , otherwise it cannot grow the bond dimension. Be warned that the default mixer_params might still disable the mixer too early for larger/more correlated systems. I've just released a bugfix ve...
- 29 Mar 2021, 21:20
- Forum: HowTos and FAQ for TeNPy
- Topic: Get excited states in different symmetry sectors
- Replies: 3
- Views: 2272
Re: Get excited states in different symmetry sectors
Yes: just run DMRG with an initial state in the symmetry sector you're interested in.
DMRG doesn't switch charge sectors, so the charge sector of the final state is determined by your initial state.
DMRG doesn't switch charge sectors, so the charge sector of the final state is determined by your initial state.
- 29 Mar 2021, 17:10
- Forum: HowTos and FAQ for TeNPy
- Topic: Calculate Energy Expectation on Ladder
- Replies: 3
- Views: 2430
Re: Calculate Energy Expectation on Ladder
There are more ways to get the expectation value \(E = \langle \psi | H | \psi\rangle \) of a given state than just through
Does this answer your question?
H_bonds
: when you have a model, you can evaluate the MPO expectation value with M.H_MPO.expectation_value(psi)
.Does this answer your question?
- 25 Mar 2021, 21:11
- Forum: HowTos and FAQ for TeNPy
- Topic: Dynamical spin Structure Factor/ Excitation Spectrum of Spin Ladder
- Replies: 15
- Views: 9337
Re: Dynamical spin Structure Factor/ Excitation Spectrum of Spin Ladder
Would you mind to provide a traceback? An "incompatible LegCharge" means it's trying to contract two legs with different charges somewhere, not necessarily in the MPS bonds.
- 23 Mar 2021, 18:32
- Forum: HowTos and FAQ for TeNPy
- Topic: Dynamical spin Structure Factor/ Excitation Spectrum of Spin Ladder
- Replies: 15
- Views: 9337
Re: Dynamical spin Structure Factor/ Excitation Spectrum of Spin Ladder
To be clear: you need to evolve this for much longer than just a few steps, and continuously take measurements for C_ij(t) . In the end, you can then fourier-transform C_ij(t) , both in space and time, to get C_k(\omega) , which is what you're really interested in, right? The maximal time you reach ...
- 23 Mar 2021, 18:21
- Forum: HowTos and FAQ for TeNPy
- Topic: Particle Number Conservation
- Replies: 7
- Views: 3957
Re: Particle Number Conservation
It seems there's something gone wrong beforehand; if you try psi.test_sanity() before the psi0.apply_local_op(...) , it will likely give you an error, right? If this code is inside a loop, make sure you have actual copies psi0 = psi.copy() , not just new references. That being said: in what way can ...
- 22 Mar 2021, 23:58
- Forum: HowTos and FAQ for TeNPy
- Topic: Excited states using tenpy
- Replies: 13
- Views: 8092
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: 2556
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: 2976
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: 3957
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: 3957
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: 96399
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: 2545
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: 2044
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: 2086
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: 1498
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: 9337
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: 9337
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: 2162
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: 1841
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: 2109
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...