qiskit-community / qiskit-aqua

Quantum Algorithms & Applications (**DEPRECATED** since April 2021 - see readme for more info)
https://qiskit.org/aqua
Apache License 2.0
573 stars 376 forks source link

Driver: QMolecule #450

Closed lukasszz closed 5 years ago

lukasszz commented 5 years ago

I've got a molecule with calculated all the integrals in the spin-orbital basis (one_body_integrals and two_body_integrals). I want to run the computation of ground state energy with VQE. I think that the best idea would be to prepare an object like QMolecule and set up its attributes manually and provide it to the qiskit_chemistry.core.hamiltonian.Hamiltonian.run() directly. I think it could be faster and easier than recalculate the integrals to MO basis and write the HDF5 file.

Do you think that it is a good approach or maybe this kind of task could be done simpler? Going further, would it be useful to implement a driver to QiskitChemistry for providing a QMolecule object directly?

woodsp-ibm commented 5 years ago

This issue really would be better in qiskit-chemistry repo since it seems more directly related. But I will address it here. The QMolecule is the output of a chemistry driver, it contains integrals (in MO basis), electron counts, orbital energies etc. The HDF5 file is a stored version of the data in the QMolecule whereby a QMolecule can be created from such a file. It can be used when running a chemistry driver say to store the result so you know next time its the exact same molecular data. You could do this to allow the MOs to be created just once and reuse them if that computation were lengthy. We have an HDF5 driver that acts a chemistry driver reading a named HDF5 file and outputting a QMolecule so you can reuse etc. In normal use of driver such as PySCF, Gaussian etc an HDF5 is not created, the MO basis integrals come from the chemistry program/library. If you want to want to somehow plug into a QMolecule integrals you got from elsewhere, as if you were a chemistry driver, then you would need to populate it out as the chemistry drivers do. From then on it can be used to create the FermionicOperator etc as we do today. In answer to this Going further, would it be useful to implement a driver to QiskitChemistry for providing a QMolecule object directly? since the QMolecule is the output of a driver having it as input to a driver does not seem to make sense - such a driver would seem to be a null/empty driver and do nothing.

woodsp-ibm commented 5 years ago

In the absence of any further discussion I am closing this