[Feature] HF/DFT Embedding Schemes
See original GitHub issueWhat is the expected improvement?
To add an implementation of the HF and DFT embedding schemes proposed in this paper: https://arxiv.org/abs/2009.01872.
The aforementioned paper provides an algorithm which allows embedding a quantum computing calculation into a DFT calculation. We already have a basic implementation based on the development version of Qiskit which we will open a PR for once the paper is published.
In the meantime, we can use this issue to discuss some of the implementation aspects which involve the paper. At this time, I can say that the implementation can be separated into 3 logically separate blocks. I will outline the concepts of each of these below.
1. HF Embedding
The first block is a simple extension of the QMolecule
class. It adds a new static method called active_space_reduction
which can be used to achieve a proper HF embedding through calculating the inactive Fock operator which is in turn used instead of the 1-electron integrals in all further calculations.
This allows the specification of an active space to which the quantum calculation is being restricted.
Some more notes:
- I have exposed the same functionality in the
Hamiltonian
class (similarly to howfreeze_core
is exposed) - the active space can even be selected manually (i.e. it is not limited to be a symmetric selection around the Fermi level)
- unittests are also in place
2. PySCFDriver Refactoring
In order to prepare the final goal (which is the DFT Embedding) we need to refactor the PySCFDriver
(which is for now the only supported driver). Since the PyQuanteDriver
has common aspects with the PySCFDriver
I have extended the refactoring to it as well, where applicable.
This refactoring includes the following aspects:
- deprecation of
HFMethodType
in favor ofpyscfd.MethodType
andpyquantd.MethodType
- deprecation of
hf_method
in favor ofmethod
(in both,PySCFDriver
andPyQuanteDriver
) - DFT support in both drivers
- support for disabling the dipole integral computation in
PySCFDriver
- support for
QMolecule
construction based on a PySCFchkfile
3. DFT Embedding
Since this DFT Embedding poses a fully fledged application of Qiskit within the chemistry
submodule, I have implemented this algorithm as a new class in the qiskit.chemistry.applications
module. The implementation is currently limited to be used with the PySCFDriver
but supports full configuration in most (I dare not say, all) other aspects. Further driver support is a WIP.
After the successful integration of the previous two paragraphs, this change should essentially only involve the addition of the new class and corresponding unittests.
If you would like to learn more about the algorithm please check out the paper. To highlight the most important aspects of the DFT embedding scheme I have included its technical visualization below.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top GitHub Comments
We are currently in the process of designing and implementing a new API for how Qiskit Nature is going to interact with classical codes. This workflow will supersede the original implementation of the DFT-Embedding scheme, rendering an integration of the current prototype out-of-scope for Qiskit Nature. Instead, we will be releasing a prototype of the DFT-Embedding scheme in a separate repository. I cannot (at this time) provide a reasonable time estimate for such a PoC being available, but will update this issue once more information is available.
Since this issue has not been updated in view of the recent major refactorings, I would like to summarize some thoughts and changes that will need to happen to the original proposal.
1. HF Embedding
This is now available in Qiskit Nature in the form of the
ActiveSpaceTransformer
.2. PySCFDriver Refactoring
The concept of Qiskit Nature’s drivers needs to be properly designed and thought through. This effort did not make it into the shortly upcoming release and, thus, will only be realized for the next major in several months. In the process of the redesign of the drivers, we will tackle the generalization of the
PySCFDriver
and also address some other driver related issues. After the upcoming release, I will open a new discussion issue to track the thought process of the driver design.3. DFT Embedding
The proposal above depends very much on the new design of the drivers. Thus, we need to keep it in mind while coming up with the design for those. In order to provide a general, extensible and maintainable of the DFT Embedding, it will be vital that the new drivers can accommodate more advanced driver callbacks such as the ones necessary for this proposed application. In conclusion, the implementation of the DFT Embedding in a production-level code is blocked, until the drivers have been refactored.