quantumlib / OpenFermion

The electronic structure package for quantum computers.
Apache License 2.0
1.51k stars 374 forks source link

Visualization modules #152

Open babbush opened 6 years ago

babbush commented 6 years ago

There are tools such as VMD and Avogadro which are designed to visualize molecular orbitals and charge densities. Thus, one should be able to use these tools to visualize the 1-RDM output from molecular simulations in OpenFermion or its plugins. Such visualizations would steal the show at many of our quantum computing conferences. Imagine how awesome it would be to visualize how the wavefunction of a molecule is changing during the course of variational optimization in a VQE experiment! What is needed them in some plugin or module (together with usage instructions) which allows OpenFermion data structures to be rendered in open source visualization packages.

jarrodmcc commented 6 years ago

I think a few more specifics to this might be that one path forward might be to

  1. Add basis function meta data to the MolecularData structure we currently store in HDF5 files. E.g. Gaussians with their contraction coefficients and exponents etc. This gives meaning to the coefficients we'll be using as input.
  2. Use the 1-RDM and this information to allow plotting of both something like (a) A select set of the natural orbitals, perhaps HOMO/LUMO (b) Just the densities.
  3. While a minimal option would let one do this at each snapshot of inputs, a nice feature might be to automatically stitch many of these frames together. This might be possible through VMD scripting.
  4. Ideally there should be some functionality for manually making some of the tweaks to the resulting visualization. Specifically, there is the issue that while visualizing molecular surfaces, what you are usually visualizing is some variant on density isosurfaces, and that isosurface needs to be tweaked to accurately and aesthetically represent the phenomenon you are visualizing.
  5. The output of this process should be compatible with real 3d processing software, so that someone with rendering expertise can make these renderings much better looking or integrate them with a larger movie.
kevinsung commented 6 years ago

@jarrodmcc Are the contraction coefficients and exponents already stored in the HDF5 files? In the example files, I see a dataset called 'basis' but it appears to simply store a string like 'sto-3g'.