Defining a sampler with a specific transition rule #1759
-
Hi! My questions is regarding defining a sampler with a custom transition rule. I saw the code for the TwoLocal rule here, but I am still a little lost... The idea is the following: In essence, I have a system with a very large Hilbert space, but I know what type of states I should be looking for so I was wondering if I can already narrow the space to be explored at the sampling level. Any help or guidance would be appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Can you formalise the rule you'd want mathematically? What is your local basis? A spin-1? |
Beta Was this translation helpful? Give feedback.
What you want is equivalent to what HamiltonianRule does.
If you look at its source, it queries the operator for its connected entries (this could be replaced by your function computing the connected entries given one), then it picks one, then it checks the connected components of the proposed site to compute the Hastings log correction, as your proposal might not be simmetrical.
You'd want to replace calls to
get_conn_flattened
to calls to your own function that lists the connected components given a certain configuration.--
Unlikely. Hilbert spaces are used to generate random …