Electron-phonon extension#294
Conversation
|
Run the tests locally and make sure jax (and probably jaxlib) is added to requirements.txt |
|
For example: |
Should only require jax and jaxlib when one needs to use the electron-phonon module. It's also likely that we will get rid of jax dependence completely soon... |
|
Where did the example go? |
|
@m-baumgarten Could you guard any jax imports so that the tests run when jax is not installed? Add a skip to the unit tests so that the tests don't fail. Make an environment without jax and test it locally. |
|
@m-baumgarten can you resolve the conflict. |
|
@m-baumgarten will this feature be merged? If so, can you please resolve the conflicts and address any remaining comments? |
|
I think all comments should be addressed. Just changed the propagator file, should be ready to go now. |
|
@m-baumgarten Could you fix the failing tests? |
…ein into multiel_holstein
…ein into multiel_holstein
linusjoonho
left a comment
There was a problem hiding this comment.
Please address the comments for merge.
| from ipie.addons.ephqmc.hamiltonians.holstein import HolsteinModel | ||
|
|
||
| Propagator = {GenericRealChol: PhaselessGeneric, GenericComplexChol: PhaselessGeneric} | ||
| Propagator = {GenericRealChol: PhaselessGeneric, GenericComplexChol: PhaselessGeneric, HolsteinModel: HolsteinPropagatorImportance} |
There was a problem hiding this comment.
I am not sure if we want to modify the propagator class this way. Was there no other way?
| from ipie.walkers.uhf_walkers import UHFWalkers | ||
| from ipie.addons.ephqmc.walkers.eph_walkers import EphWalkers | ||
|
|
||
| @plum.dispatch |
There was a problem hiding this comment.
I am not sure why you had to make changes in ipie's native estimator class. Couldn't you write a customized estimator class?
| Walkers object. | ||
| trial : trial object | ||
| Trial wavefunctioni. | ||
| Trial wavefunction. |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # Directory for additions to ipie which depend on the core ipie library. |
There was a problem hiding this comment.
delete lines 15-17. we meant this to be an instruction for contributing to addons.
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # Directory for additions to ipie which depend on the core ipie library. |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # Directory for additions to ipie which depend on the core ipie library. |
| # limitations under the License. | ||
|
|
||
| # pylint: disable=import-error | ||
| import jax.numpy as npj |
There was a problem hiding this comment.
Why is there JAX left?
|
|
||
| # pylint: disable=import-error | ||
| import jax.numpy as npj | ||
| from jax.config import config |
There was a problem hiding this comment.
Why is there JAX left?
| from ipie.addons.eph.trial_wavefunction.toyozawa import circ_perm | ||
|
|
||
| # pylint: disable=import-error | ||
| import jax |
There was a problem hiding this comment.
Why is there JAX left?
| from ipie.addons.eph.trial_wavefunction.variational.estimators import gab | ||
|
|
||
| # pylint: disable=import-error | ||
| import jax |
There was a problem hiding this comment.
Why is there JAX left?
What?
This pull request adds functionalities that allow running Diffusion MC for a 1D Holstein Chain based on [1] using an AFQMC object. Trials currently implemented include a simple coherent state trial as well as a Toyozawa ansatz.
Why?
Implements a convenient framework for continued method development for electron-phonon models.
How?
Major additions include the designated electron-phonon walker class
EphWalkers, keeping track of bosonic overlaps and carrying phonon displacements.Two propagators are added,
HolsteinPropagatorFreeandHolsteinPropagatorImportance, allowing for DMC propagation of bosonic degrees of freedom.Additionally, in
ipie/ipie/trial_wavefunction/holsteintwo trial wave functions are implemented,CoherentStateTrialandToyozawaTrial.To estimate the ground state energy one can use the regular
EnergyEstimator.Lastly, the Holstein Hamiltonian is implemented in
ipie/ipie/hamiltonians/elph/holstein.py.Testing Steps
Example code can be found in
ipie/examples/13-1d_holstein. Some reference values to compare to can be found in [1].References
[1] Joonho Lee, Shiwei Zhang, and David R. Reichman (2021) Phys. Rev. B 103, 115123