question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] HF/DFT Embedding Schemes

See original GitHub issue

What 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 how freeze_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 of pyscfd.MethodType and pyquantd.MethodType
  • deprecation of hf_method in favor of method (in both, PySCFDriver and PyQuanteDriver)
  • DFT support in both drivers
  • support for disabling the dipole integral computation in PySCFDriver
  • support for QMolecule construction based on a PySCF chkfile

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.

DFT Embedding Scheme

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mrossinekcommented, May 24, 2022

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.

Note: if you wish to receive such updates to this issue in your inbox, you can click on the Subscribe button in the right column of this webpage. If you already commented here, you have automatically been subscribed to such updates.

1reaction
mrossinekcommented, Mar 23, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Simple, Exact Density-Functional-Theory Embedding Scheme
A key motivation for DFT embedding schemes is the possibility of embedding accurate wave function calculations in a DFT environment.
Read more >
A Simple, Exact Density-Functional-Theory Embedding Scheme
A key motivation for DFT embedding schemes is the possibility of embedding accurate wave function calculations in a DFT environment.
Read more >
A Simple, Exact Density-Functional-Theory Embedding Scheme
Density functional theory (DFT) provides a formally exact framework for quantum embedding. The appearance of nonadditive kinetic energy ...
Read more >
Exact density functional and wave function embedding ...
We conclude that for DFT-in-DFT embedding, the Huzinaga-equation-based scheme is more efficient than the other approaches, but QM/MM or even simple vacuum ...
Read more >
Extending density functional embedding theory for covalently ...
To address these issues, we introduce a second modification to DFET: a flexible capping scheme that is compatible with the essential idea of ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found