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

Add container to demonstrate calculating ground state energy using a quantum computing(simulation) #108

Open
cjh1 opened this issue Oct 28, 2020 · 3 comments

Comments

@cjh1
Copy link
Member

cjh1 commented Oct 28, 2020

The container should be based on the following notebook.

We already have a start at a PR for the container to setup the environment, it includes qiskit and psi4.

The plan is to calculate the ground state energy for a give geometry.

  • The geometry should be provided from an OpenChemistry molecule. We should limit it to simple molecule. Whitelist?
  • We should provide an option to request that the geometry is optimized with psi4 for running the calculation.
  • The user would be able to control the orbital_reduction parameter, to control the complexity of the calculation.
  • The resulting ground state energy would be added a a property of the OpenChemistry molecule?
  • It would be nice to have an example notebooks that compares the ground state energy calculation with a classical simulation such as psi4. What configuration of psi4 do we need to use to make this fair?

@cryos @wibejong This is a proposed outline, let me know what you think. Feel free to update/add.

@cryos
Copy link
Member

cryos commented Oct 30, 2020

This looks good, I don't think we need a white list, but maybe issue a warning if there are more than 3 atoms? You can probably kill it with a single metal, but this is intended for people who should know what types of thing they could run. I think this would be a result like the ones from ChemML, i.e. quantum simulation ground state energy, or similar? I think Bert would be best on commenting on the Psi4 parameters for a fair comparison of energies, that could be another output.

I think primarily this would return a small table of key-value pairs like ChemML, such as simulated energy, psi4 energy. If we integrate this properly then this would give the quantum simulated ground state, and you could separately run psi4, nwchem, etc energy calculations on the same geometry to compare energies in a notebook using a reasonable basis/functional to compare.

@cjh1
Copy link
Member Author

cjh1 commented Nov 11, 2020

@cryos Can you give us an idea of the parameters we should use for the geometry optimization with psi4 if the user requests it?

@bnmajor
Copy link
Contributor

bnmajor commented Jan 5, 2021

The code for calculating the ground state energy (found here) has been added to this container, as well as the option to optimize the geometry using Psi4.

  • The container currently expects that the geometry will be provided in xyz format
  • Right now the optimization is performed if the optimization key is found in the parameters file. If it would be better to indicate this with a separate flag and/or separate parameters file this could be changed.
  • Some of the keys in the optional optimization dict are duplicates of those provided for the qiskit calculation. Currently the optimization uses values provided in the optimization dict first, looks for those values in the qiskit parameters if they are not found, then falls back to default values. This means that is the optimization and ground state calculation share values the parameters do not need to be provided twice.
  • The current defaults in description.json are pulled from the notebook and from the Psi4 container and can be changed if needed.
  • The README currently has instructions for building locally and will need to be updated once the container has been added to dockerhub.

An example of the current output (cjson):

{
  "chemicalJson": 1,
  "atoms": {
    "coords": {
      "3d": [
        0.0,
        0.0,
        -1.407746063312694,
        0.0,
        0.0,
        1.407746063312694
      ]
    }
  },
  "ground_state_energy": -14.638262317493975,
  "optimization_energy": -14.866320010422115
}

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

No branches or pull requests

3 participants