up-to-now there seems to be no possibility to input Hamiltonians with complex values, e.g. sigma_y. It can be given as input in the python files, but the fortran seems to use real values only for the Hamiltonians. No errors are raised in this case.
Wei and I put this on our to-do list, any comments are welcome.
Best regards,
Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is indeed the case. Mostly, this was motivated by the fact that for
real Hamiltonians we have real eigenvectors, so we can use all real numbers
in the calculation. This is, of course, faster than using complex MPSs.
In order to keep this same speedup when the Hamiltonian is real, the code
would need a switch which only uses the complex routines when complex
parameters are passed. All of the (Fortran) computation is written in a
generic way which can deal with complex Hamiltonians, the change would only
be in choosing whether to use real or complex routines based on input from
python.
up-to-now there seems to be no possibility to input Hamiltonians with
complex values, e.g. sigma_y. It can be given as input in the python files,
but the fortran seems to use real values only for the Hamiltonians. No
errors are raised in this case.
Wei and I put this on our to-do list, any comments are welcome.
Insead of implementing a Hamiltonian with complex value, is there any possiblitity to make observables to be comples? --say, if I have a spin model, how could I measure the site magnetization and correlation function for sigma_y?
Thanks for your help in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OSMPS will switch to complex numbers for the variational ground state search then even if sigma_y is not in the Hamiltonian. Correlations will work the same way.
Let me know if you have any more questions.
Best regards,
Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to include a hopping term in a Hubbard Hamiltonian which looks like
-t \sum_j exp(i \phi) a_j^\dagger a_j + H.c.
and, although the simulations does run, I get
ComplexWarning: Casting complex values to real discards the imaginary part
Hstring = '%30.15E'%(self.weight[ii])
I tried adding the complex part either as the value of the hopping parameter itself and also as the weight in the definition of the operator, but the warning remains there. Is there a way to get around this issue?
Best regards,
Rafael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear all,
up-to-now there seems to be no possibility to input Hamiltonians with complex values, e.g. sigma_y. It can be given as input in the python files, but the fortran seems to use real values only for the Hamiltonians. No errors are raised in this case.
Wei and I put this on our to-do list, any comments are welcome.
Best regards,
Daniel
Hi Daniel,
This is indeed the case. Mostly, this was motivated by the fact that for
real Hamiltonians we have real eigenvectors, so we can use all real numbers
in the calculation. This is, of course, faster than using complex MPSs.
In order to keep this same speedup when the Hamiltonian is real, the code
would need a switch which only uses the complex routines when complex
parameters are passed. All of the (Fortran) computation is written in a
generic way which can deal with complex Hamiltonians, the change would only
be in choosing whether to use real or complex routines based on input from
python.
-Michael
On Tue, Nov 18, 2014 at 1:22 PM, Daniel Jaschke djaschke@users.sf.net
wrote:
I'll start working on the imaginary Hamiltonian part. So if anyone starts working on this, you may ask me before for some pieces ...
Hi Daniel,
Insead of implementing a Hamiltonian with complex value, is there any possiblitity to make observables to be comples? --say, if I have a spin model, how could I measure the site magnetization and correlation function for sigma_y?
Thanks for your help in advance!
Hello,
You add the sigma_y to your operators:
Operators = mps.BuildSpinOperators(spin=0.5)
Operators['sy'] = np.array([[0, -1.0j], [1.0j, 0]], dtype=np.complex128)
Then, you can add the sigma_y observable as measurement as you would add any other site observable.
myObs = mps.Observables(Operators)
myObs.AddObservable('site', 'sy', name='<y>')</y>
OSMPS will switch to complex numbers for the variational ground state search then even if sigma_y is not in the Hamiltonian. Correlations will work the same way.
Let me know if you have any more questions.
Best regards,
Daniel
Hello all,
I am trying to include a hopping term in a Hubbard Hamiltonian which looks like
-t \sum_j exp(i \phi) a_j^\dagger a_j + H.c.
and, although the simulations does run, I get
ComplexWarning: Casting complex values to real discards the imaginary part
Hstring = '%30.15E'%(self.weight[ii])
I tried adding the complex part either as the value of the hopping parameter itself and also as the weight in the definition of the operator, but the warning remains there. Is there a way to get around this issue?
Best regards,
Rafael