Closed Lazersmoke closed 8 months ago
Thanks a lot for putting this together. Should we also switch to g=2
for some of the tests in this PR to exercise the new functionality?
Squishing the last of the bugs now, and for this PR and the other one which updates the intensities scale, I'm doing this sequence:
@test new / g_factor^2 == old
to make it pass and be correct@test new == old
which I think is reasonable.
Looks good to me. @ddahlbom would you mind also taking a look?
I guess we're waiting on https://github.com/SunnySuite/Sunny.jl/issues/232 before adding a test with a general 3x3 g-tensor?
232 only impacts 1/4 modes so we can add three tests and a broken test now
Adding an anisotropic g-tensor into the tests would be great, is that possible now? Could we additionally have Sunny throw an informative error if it detects the unsupported case? "Anisotropic g-tensor is not currently supported when [...]".
Now closes #232
This will resolve both https://github.com/SunnySuite/Sunny.jl/issues/236 and https://github.com/SunnySuite/Sunny.jl/issues/232.
I took a pass through. Is it feasible to augment the testset "Magnetization Observables" with a test that exercises a nontrivial $g$ tensor with dynamical_correlations
? Otherwise looks good to me. @ddahlbom you should take a final pass too.
This PR adds support for having observable operators (specifically, the operators Sunny computes correlations between) that vary from site to site. As a side effect, it's now easy to support the Magnetization operator, which is the (static) spin vector operator multiplied from the left by a possibly varying site-to-site tensor g-factor.