Comments (12)
Thanks for pointing this out, we'll look into it
@anbenali
@TApplencourt
from qp2.
@tbhuber do you have a small example so we can be sure we're reproducing the same issue?
thanks!
from qp2.
Here is a small example that shows this.
The <S^2> in the fci and pt2 output don't match.
pt2-s2-issue.tar.gz
from qp2.
from qp2.
We have identified the issue, and it should be fixed soon.
It looks like it's just a problem with what's being printed, so your wavefunction and energy are all still correct.
When pt2
is called, it builds psi_s2
from the provider, and this sets it to <S^2> - S_z*(S_z-1) (or <S_+ S_-> in terms of ladder operators).
When fci
is called, it sets psi_s2
equal to CI_S2
, and this is shifted by S_z*(S_z-1)
The shift is applied here for full diagonalization, and here for the davidson.
So the <S^2>
in the fci
output is actually <S^2>, and the value from the pt2
output is <S^2> - S_z*(S_z-1).
from qp2.
for the high-spin cases (i.e. max Sz for that multiplicity), you should see:
fci pt2
0.75 1
2 2
3.75 3
6 4
8.75 5
from qp2.
Thank you gentlemen. I appreciate the time and effort you have invested in investigating/resolving the issue.
from qp2.
@scemama
One way to make everything consistent would be to add S_z2_Sz
in diag_S_mat_elem
so line 28 would be diag_S_mat_elem = dble(nup) + S_z2_Sz
.
It might make the function a bit heavier (I think it will add some if(.not.s_z2_sz_is_built) ...
), but if this is a problem then we could pass the S_z2_Sz
as an additional argument.
This might be easier than remembering that diag_S_mat_elem
actually returns <S^2> - S_z*(S_z-1) and applying the shift anywhere it is used.
If we make this change, we should also remove the shift in u_0_S2_u_0, davidson_diag_hjj_sjj (1) and (2), and the provider for CI_s2.
from qp2.
OK. Maybe the best would be to remove the variable S_z2_Sz
and to compute it directly in the diagonal elements of S^2. I will do it when I come back from vacation.
Thanks!
from qp2.
It's should be fixed after merging #127.
Can you try to git pull
and see if it fixed your problem @tbhuber ?
Thanks!
from qp2.
@TApplencourt Unfortunately, I have qp2 installed on a cluster owned by a university and do not have privilege to git pull. They do not support using head versions, but I am currently seeking a work-a-round.
from qp2.
you could try wget https://github.com/QuantumPackage/qp2/archive/dev.zip
from qp2.
Related Issues (20)
- Installation failure with zmq/ocaml during make HOT 16
- qp2-dependencies not at latest commit HOT 1
- Makefile contents HOT 5
- How to execute multiple test cases at the same time HOT 5
- Test case script HOT 1
- /bin/qp_mpirun
- ./configure -c config/gfortran_mpi.cfg HOT 4
- Software packaging problems HOT 13
- ocaml 4.11 in qp2-dependencies incompatible with glibc>=2.34 HOT 1
- SCF energy HOT 1
- Issue with print_wf after running CIPSI calculation HOT 3
- OpenSUSE problem HOT 1
- Type mismatch HOT 1
- Ninja: build stopped: subcommand failed HOT 2
- QP2 singularity running in parallel (OpenMPI) on multiple nodes HOT 4
- Problems with qp run diagonalize_h HOT 3
- Issues Installing Quantum Package Using zsh Shell HOT 2
- orbital optimization crash with memory issue. HOT 2
- qp edit feature request HOT 1
- Put the .cfg file in the buil.ninja locally in all plugins :)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qp2.