Open lelemmen opened 4 years ago
I will tackle this issue in a separate PR, in order to prevent the current one from becoming too large.
The GHF expectation values are already implemented, so there's just RHF and UHF left to do.
[x] GHF (PR #638 )
[ ] RHF
[ ] UHF
@lelemmen I'm a bit confused here. For UHF, I can implement the S_z
expectation value using the traces of the alpha-alpha and beta-beta overlap matrices. Should the function just return 0 for S_x
and S_y
? As for RHF, I can do the same for S_z
, but this essentially comes down to trace - trace
which seems redundant to me. For S_x
and S_y
the same problem occurs s with UHF, since the mixed components vanish.
Yep, for RHF and UHF you can hard-code the values wherever applicable.
@lelemmen Is it possible that RSpinorBasis
can't quantize an ElectronicSpinOperator
, like the GSpinorBasis
can?
@lelemmen Is it possible that
RSpinorBasis
can't quantize anElectronicSpinOperator
, like theGSpinorBasis
can?
In principle, any spinor basis may quantize the electronic spin operator. However, in this code, we're making a difference between RSpinorBasis
and USpinorBasis
, versus GSpinorBasis
. The first two are spin-orbital bases, representing the situation where the off-diagonal coefficient blocks in GSpinorBasis
are zero. This means that one-electron integrals in the first two spin-orbital basis can be represented by K x K
-matrices, while we use 2K x 2K
-matrices to represent the one-electron integrals in a GSpinorBasis
.
As for your remark, I think that RSpinorBasis
can quantize ElectronicSpinOperator
, but the resulting SQOneElectronOperator
should encapsulate 2K x 2K
-matrices, just like the the result of GSpinorBasis
.
Your question seems related to #559, since the spin operators aren't singlet operators like the non-relativistic spin-free molecular Hamiltonian.
Describe the feature you'd like It would be nice if the spin expectation values (for
S_x, S_y, S_z
) could be calculated from the HFQCModel
s.Describe what the current code offers in relation to what it lacks It's already possible to calculate these spin expectation values generally, using a contraction of the quantized
ElectronicSpin
operator and the density matrix, so we can check this specialized implementation with the general implementationAdditional context