Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining specific symmetry sectors #44

Merged
merged 3 commits into from
Jun 9, 2023
Merged

Conversation

RehMoritz
Copy link
Collaborator

Implementation of symmetry sectors such that states with specific quantum numbers can be modelled.
The LatticeSymmetry class now takes two arguments to initialize, namely the orbits that generate the transformation as well as the factors that give the prefactor in front of the wave function coefficient.
The previous behavior is obtained if one sets all of these prefactors to 1.

@RehMoritz RehMoritz requested a review from markusschmitt May 12, 2023 00:58
@laurinbrunner
Copy link
Collaborator

I suggest we try to keep a similar interface for the MCSampler and the ExactSampler, so I think it would be best to call the 'mu' parameter you added to the MCSampler 'logProbFactor' and make it behave in a similar way as it does in the ExactSampler.

Furthermore I don't see how changing the probability return for the MCSampler from 'None' to the actual probabilities works. Isn't the idea that the samples should already follow the wanted probability distribution, so the average is just the mean without the probabilities since they are already subsumed in the frequency of a configuration in the samples? This argument should be independent from the choice of mu, as it already works for POVMs where we basically get something corresponding to mu=1.

@RehMoritz
Copy link
Collaborator Author

I would like to keep these options separate as they fulfill different purposes.
The MC reweighting scheme (also discussed in some more detail in PR #41) accepts samples with the 'wrong' probability, i.e. $|\psi_\theta|^\mu$ instead of $|\psi_\theta|^2$. This requires reweighting physical observables with $|\psi_\theta|^{2-\mu}$ at a later point.
I agree that this would need to be adapted if one were to apply this to the POVM case aswell, but since there is currently no logProbFactor for MCMC anyways (i.e. no support for POVMs), I did not see the need.

If we wanted to extend the reweighting scheme to MCMC with POVMs (which I think would be a nice feature), we would simply need to have the acceptance probabilities to be $|P_\theta|^\mu$ instead of $|P_\theta|$. This would require reweighting physical observables with $|P_\theta|^{1-\mu}$ at a later point.
Generally, the reweighting factor would then be $|\chi_\theta|^{\frac{1}{\mathrm{logProbFactor}}-\mu}$ with $\chi$ either $P$ or $\psi$.

@laurinbrunner
Copy link
Collaborator

Ah thank you, now I have a better understanding of what you did. I agree that one should keep logProbFactor and mu different, but I think it would be best to make the MCMC sampler compatible with POVMs at this point.

@markusschmitt
Copy link
Owner

I changed the interface for the get_orbit_* functions a bit. Instead of the clumsy dictionaries, one can now simply pass the names of the desired symmetries and separately the quantum number prefactors if they differ from 1, for example:

get_orbit_1D(L, "reflection", reflection_factor=-1)

@markusschmitt markusschmitt merged commit e17a674 into master Jun 9, 2023
@markusschmitt markusschmitt deleted the symmetry_sectors branch June 9, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants