Skip to content

Qiskit Nature 0.5.0

Compare
Choose a tag to compare
@manoelmarques manoelmarques released this 07 Nov 19:37
· 202 commits to main since this release
f0039d4

Changelog

Prelude

  • Qiskit Nature 0.5 comes with a major redesign of the BaseProblem layer of its stack. Rather than tightly integrating drivers and transformers, problems are now a lot more standalone and are generated by the various drivers (or built out by a user to their custom needs directly).

New Features

  • The algorithms module now requires the new algorithms introduced in Qiskit Terra 0.22 which in turn rely on the Qiskit Primitives themselves. For more details check out the migration guide for problem solving.
  • The refactoring of the electronic structure stack has enabled the development of third-party plugins allowing classical codes to call Qiskit Nature instead of relying on the development of drivers in the Qiskit Nature package. One example is the new Qiskit Nature PySCF Plugin which can be used. Qiskit Nature still provides drivers to enable simple testing and provide a more accessible entry to Qiskit Nature for users who do not come from a classical chemistry computing background. Check out the migration guide for electronic structure calculations to learn how to update your code to use the refactored drivers.
  • The properties concept has been largely redesigned and is a lot more refined now. Instead of being a “catchall” for operator factories, the module has been cleanly separated into various components. Check out the corresponding section of the migration guide for electronic structure calculations for more details.
  • The vibrational structure stack has been refactored in-line with the changes to the electronic structure stack mentioned previously. However, changes to this stack also include corrections to the differentiation of real-space and second-quantized coefficients of the Watson hamiltonian. For more details, check out the migration guide for vibrational structure calculations.
  • The lattices and related LatticeModel classes have undergone some API changes, particularly around the location of the utility methods for uniform lattice generation. For more details check out the migration guide for lattice models.
  • Added the qiskit_nature.second_q.properties.HeisenbergModel which implements the Hamiltonian of the Heisenberg model. This model is used in the study of critical points and phase transitions of magnetic systems. Through the choice of the model constants and the external magnetic field, we can produce many models like: XYZ, XXX, Ising model and others.
  • Adds .SparseLabelOp.equiv for checking approximate equality between two SparseLabelOps.
  • The performance of the following mappers, when used to map multiple operators of identical size, is significantly improved, by means of caching internal structures
  • Adds a new Property for the electronic structure stack to evaluate the 1- and 2-body reduced density matrices. Assuming that you already have an instance of your qiskit_nature.second_q.problems.ElectronicStructureProblem, you can add the qiskit_nature.second_q.properties.ElectronicDensity
  • Adds the PropertiesContainer and its subclasses to simplify the handling of SparseLabelOpsFactory instances inside of problems. This container is a MutableSet and enforces at most a single instance of any Property kind to be stored inside of it This is sufficient for all application purposes of the auxiliary operators (which are generated by these objects).
  • Adds the new keyword argument mirror to the SUCCD ansatz, which allows the inclusion of symmetrically mirrored double excitations while preserving the number of circuit parameters.
  • Adds support for the QCSchema via which we aim to standardize the I/O between classical drivers and Qiskit Nature.
  • Implements both HartreeFock and VSCF as subclasses of BlueprintCircuit. This allows the respective classes to be instantiated without explicitly setting all of their instance attributes. Missing attributes can be set at a later point to complete the respective circuit definitions.
  • The new qiskit_nature.second_q.operators.FermionicOp replaces the old qiskit_nature.operators.second_quantization.operators.FermionicOp. This new operator is a subclass of the qiskit_nature.second_q.operators.SparseLabelOp and, as such, only support sparse labels. It is initialized with a dictionary, mapping sparse label keys to coefficients. It supports the usual algebra for operator addition, scalar multiplication, operator composition, operator tensoring, and complex conjugation. It also provides methods for sorting, equality and equivalency checking, operator simplification, normal ordering, and the computation of induced norms as well as hermiticity properties. Finally, it can also be converted to matrices in the occupation number basis.
  • Added the xcf argument to the qiskit_nature.second_q.drivers.GaussianForcesDriver.from_molecule() which allows specifying the exchange-correlation functional to be used by Gaussian.
  • The excitation_list property has been removed from HFInitialPoint, MP2InitialPoint, and VSCFInitialPoint. Thus the excitation list cannot be set directly, rather this must be set via the ansatz.
  • Following the MP2 T2 and energy correction calculation fix, the APIs for MP2InitialPoint and HFInitialPoint have been changed slightly. After setting the grouped_property, the total_energy and energy_correction are now accessed via their respective properties, rather than via get_energy and get_energy_correction.
  • Adds atol parameter to SparseLabelOp.is_hermitian().
  • The supported excitation types in the QEOM code have been updated. It now exposes the full set of excitation generation functionalities provided by the internally used UCC and UVCC ansatze. In particular, this means that rather than providing a custom list of excitation tuples, a function can be set by the user which generates such a custom list. The documentation has been updated accordingly to reflect this in all places.
  • Adds SparseLabelOp.induced_norm().
  • Changes usage of library retworkx to the new substitute rustworkx.
  • Adds utility functions for converting between chemists’ and physicists’ index ordering for two-body integrals. qiskit_nature.second_q.operators.tensor_ordering.to_chemist_ordering() converts from physicists’ or intermediate order to chemists’, whereas qiskit_nature.second_q.operators.tensor_ordering.to_physicist_ordering() converts to physicists’. qiskit_nature.second_q.operators.tensor_ordering.find_index_order() returns the index-order type for a given two-body tensor.