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

User provided proposal distribution for insert and remove moves #176

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

ec147
Copy link

@ec147 ec147 commented Jul 29, 2024

  • Possibility of providing a user-defined proposal distribution for the insert and remove moves, with the new parameters hist_insert, hist_remove and nbins_histo. The proposal distribution is then skewed with respect to $\Delta \tau=\tau - \tau^{\dagger}$ for the insert move and $\Delta \tau=\tau^{\dagger}-\tau$ for the remove move (following the same conventions as the histograms of the performance_analysis feature).

The user provides two dictionaries hist_insert and hist_remove, with a key for each block name. For each key, the value is a list of size nbins_histo, corresponding to a proposal probability for the insertion/remove of two operators for each bin of $\Delta \tau$. (For the definition of the bins, I follow the same conventions as the histograms of the performance_analysis feature, so the first and last bins are half-sized).

An usage example to build these proposal distributions, using the knowledge of a previous run, would be:

nbins = 100
S.solve(...,performance_analysis=True, nbins_histo=nbins)
hist = S.performance_analysis
hist_insert = {}
hist_remove = {} 
for block_name in list_of_block_names:
    hist_insert[block_name] = hist["insert_length_accepted_" + block_name].data / hist["insert_length_proposed_" + block_name].data   
    hist_remove[block_name] = hist["remove_length_accepted_" + block_name].data / hist["remove_length_proposed_" + block_name].data  
S.solve(...,hist_insert=hist_insert, hist_remove=hist_remove, nbins_histo=nbins) 

@Wentzell
Copy link
Member

Thank you @ec147 for this Pull Request!

Please add a description of the Feature and the changes to this PR.

Also, can you please adjust the git history to group the changes into
logical chunks with useful commit messages, instead of generic
messages like Add files via upload

…sert and remove moves

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Delete solver_core.hpp

Delete configuration.hpp

Delete solver_core.cpp

Delete qmc_data.hpp

Delete parameters.hpp

Delete impurity_trace.hpp

Add files via upload

Update CMakeLists.txt

fixes.cpp

Update qmc_data.hpp

Update solver_core.hpp

Update configuration.hpp

Update solver_core.cpp

Update parameters.hpp

Update solver_core.cpp

Update insert.hpp

Update insert.cpp

Update remove.hpp

Update remove.cpp

Update insert.hpp

Update insert.cpp

Update remove.hpp

Update remove.cpp

Update insert.cpp

Update remove.cpp

Update insert.cpp

Update remove.cpp

Update solver_core.cpp

Update update_time.hpp

Delete c++ directory

Add files via upload

Add user-provided proposal distribution

Add files via upload

Update insert.cpp

Update insert.cpp

test

test2
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.

2 participants