Skip to content

Releases: qiskit-community/qiskit-nature

Qiskit Nature 0.4.4

11 Aug 18:03
058dc97
Compare
Choose a tag to compare

Changelog

Bug Fixes

  • Fixes the behavior of FermionicOp.simplify when called on a zero-operator.

Qiskit Nature 0.4.3

14 Jul 16:25
93b012a
Compare
Choose a tag to compare

Changelog

Bug Fixes

  • The gathering of the auxiliary operator results when using the VQEClient.

Qiskit Nature 0.4.2

01 Jul 19:32
1631116
Compare
Choose a tag to compare

Changelog

Bug Fixes

  • Fixes a bug where numpy integer objects were causing integer-based isinstance checks to fail. This also avoids such problems by explicitly converting integer values to Python integers when loading properties from HDF5 files.
  • Reverts a temporary change to XXPlusYYGate that has been fixed in Qiskit Terra 0.21. Pins Qiskit-Terra to >= 0.21

Qiskit Nature 0.4.1

16 Jun 20:12
982bc7b
Compare
Choose a tag to compare

Changelog

Bug Fixes

  • Fix XXPlusYYGate

Qiskit Nature 0.4.0

16 Jun 17:49
407533e
Compare
Choose a tag to compare

Changelog

New Features

This follows the introduction of MP2InitialPoint for computing the initial point using the Møller-Plesset 2nd Order (MP2) corrections.

MP2InitialPoint, HFInitialPoint, and VSCFInitialPoint all inherit from the abstract base class InitialPoint.

These initial points are intended to be used as starting VQE parameters when using a UCC ansatz (cluster operator coefficients). This should introduce an initial point that is closer to the ground state point, leading to fewer overall evaluations for VQE.

Instances of the appropriate classes are now the default initial_point arguments in VQEUCCFactory and VQEUVCCFactory. Additionally, one may pass an explicit InitialPoint instance to the factories.

  • Added logging utility functions accessible through qiskit_nature.logging.
  • Added Support for Bohr unit in Molecule Class:
  • Adds BogoliubovTransform. This class constructs a circuit that performs a Bogoliubov transform, which is a single-particle basis change that may or may not conserve particle number. See the Quadratic Hamiltonians and Slater determinants tutorial for a demonstration of how to use this class.
  • The new setting qiskit_nature.settings.optimize_einsum was added which allows enabling the optimize argument in numpy.einsum calls with more than 2 operands. This is known to yield significant computational efficiency increases at the expense of higher memory consumption. The setting defaults to True.
  • Adds qiskit_nature.operators.second_quantization.FermionicOp.terms(). This returns an iterable of (term, coefficient) pairs describing the terms contained in the operator. Each term is a list of tuples of the form (action, index), where the action is either “+” or “-” and the index is the integer index of the factor in the term.
  • Added Qiskit Terra’s Gradient Functionality to calculate gradients in AdaptVQE. You can choose the gradient method and input it while calling AdaptVQE.
  • The HDF5Driver has been refactored to leverage the new HDF5-integration protocol of Qiskit Nature. The driver still supports loading legacy QMolecule HDF5 files and also provides a conversion utilit
  • Adds a new HDF5-integration to support storing and loading of (mostly) Property objects using HDF5 files. A similar feature existed in the legacy QMolecule object but the new implementation is handled more general to enable leveraging this integration throughout more parts of the stack in the future.
  • Support the initialization of FermionicOp with tuple as label. FermionicOp can be initialized using a tuple of integers, (action, index)
  • Add the option to initialize a Lattice from a networkx.Graph object, which will be internally converted to a retworkx.PyGraph for performance.
  • Adds a new problem class, qiskit_nature.problems.second_quantization.lattice.LatticeModelProblem, for lattice models. It can create second quantized operators from a lattice model. We can use the Ground State Eigensolver with it to calculate the ground state energy.
  • Adds qiskit_nature.mappers.second_quantization.LogarithmicMapper. This class is a mapper for Logarithmic spin-to-qubit mapping. In this local encoding transformation, each individual spin S system is represented via the lowest lying 2S+1 states in a qubit system with the minimal number of qubits needed to represent >= 2S+1 distinct states.
  • Adds a class to compute the Møller-Plesset 2nd Order (MP2) corrections. The corresponding double-excitation coefficients are intended to be used as an initial point for the VQE parameters (cluster operator coefficients) when using a UCC ansatz. This should introduce an initial point that is closer to the ground state point, leading to fewer overall evaluations for VQE.

MP2InitialPoint inherits from the abstract base class (interface) InitialPoint, which takes a driver result and a UCC ansatz either directly via the compute method or via their respective property setters.

The MP2 computation requires the grouped_property to contain the ElectronicEnergy, which must contain the two-body molecular orbital matrix and the orbital energies. Optionally, it will also use the Hartree-Fock reference energy to compute the absolute energy.

  • Improves the performance of the qiskit_nature.properties.second_quantization.electronic.integrals.ElectronicIntegrals.to_second_q_op() method significantly. Previously, generating the second quantized operators for a system size greater than 20 spin orbitals took on the order of minutes to hours (depending on the actual size). Now, even system sizes of 50 spin orbitals can be handled in a matter of seconds.
  • Now there is a function to interpret the raw result of solving a protein folding problem. Previously the problem was encoded in order to be solved more efficiently but the result could not be easily understood by a user. This new functionality decodes the result for the user and provides a plotting of the protein as well as a file with the x,y,z coordinates of each one of the beads in the protein.

Added: ProteinFoldingResult. This class handles the result found by running a VQE to solve a ProteinFoldingProblem

Read more

Qiskit Nature 0.3.2

05 Apr 17:22
59b80ea
Compare
Choose a tag to compare

Changelog

Upgrade Notes

  • Support for running with Python 3.6 has been removed. To run Nature you need a minimum Python version of 3.7.

Bug Fixes

  • Alter UCC to build the operators on demand when requested via the property, rather than, as before, when the circuit is built. Now if the circuit is built, then the operators, if not built, will be created as before, but since they are cached when built, if done earlier, then these are used. This avoids problems when used in conjunction with VQE that presently fail - most cases today use a fully configured UCC being passed into VQE but whose constructor presently has an unintended side-effect of building the circuit via a logging statement. For other scenarios VQE would fail when it checked on number of qubits and the operators were None, even though UCC was fully configured, when the circuit had not yet been built.

  • Alter UVCC to build the operators on demand when requested via the property, rather than, as before, when the circuit is built. This is a similar change as was done to UCC.

Qiskit Nature 0.3.1

10 Feb 14:29
1d8b580
Compare
Choose a tag to compare

Changelog

Upgrade Notes

  • Added support for running with Python 3.10. At the the time of the release, PySCF didn’t have a python 3.10 version.

Bug Fixes

  • Fix incorrect corner cases in BravyiKitaevSuperFastMapper: Input terms with coefficient zero and output operator equal to zero. Also detect and raise an exception if HartreeFock attempts to use the BKSF mapper.

  • Fix bug in Bravyi-Kitaev Super-Fast (BKSF) Mapper cause by using obsolete method for composing Pauli operators in one kind of fermionic Hamiltonian term.

  • Fixes the wrong inference of register_length in FermionicOp.

  • Fixes the units used for the Molecule generated by the PySCFDriver.

  • Fixes the computation of the spin orbital occupation in a non-singlet state. Previously, a singly occupied MO would result in SO occupations of 0.5 for each spin. Now, the alpha SO will be fully occupied and the beta SO unoccupied.

  • Add a type check for the input graphs to Lattice which asserts that the edge weights of the graph are either numeric (or one of None or {} which is replaced by a unit weight). This prevents possibly unexpected errors in the application stack when an operator is constructed from the lattice.

  • Ensures the VibrationalStructureProblem.truncation_order gets propagated correctly down to the properties before the SecondQuantizedOp instances are constructed.

Qiskit Nature 0.3.0

15 Dec 16:41
3fe5ac2
Compare
Choose a tag to compare

Changelog

New Features

  • The degree_of_freedom attribute of the Molecule class now has its dedicated getter and setter.

  • Add: qiskit_nature.problems.second_quantization.lattice.models.IsingModel implementing the Hamiltonian of the Ising Model. Add: qiskit_nature.problems.second_quantization.lattice.models.LatticeModel implementing a base class for Lattice models.

  • Add: qiskit_nature.problems.second_quantization.lattice.lattice.Lattice for the generation of general lattices.

  • Add: qiskit_nature.problems.second_quantization.lattice.lattice.HyperCubicLattice for the generation of arbitrary d-dimensional lattices.

  • Add: qiskit_nature.problems.second_quantization.lattice.lattice.LineLattice for the generation of one-dimensional lattices.

  • Add: qiskit_nature.problems.second_quantization.lattice.lattice.SquareLattice for the generation of two-dimensional lattices.

  • Add: qiskit_nature.problems.second_quantization.lattice.lattice.TriangularLattice for the generation of two-dimensional lattices with diagonal edges.

  • Add: qiskit_nature.problems.second_quantization.lattice.models.FermiHubbardModel implementing the Hamiltonian of the Fermi-Hubbard Model.

  • Exposes the callback option of the VQE algorithm in the VQE factory classes. It also adds a general kwargs dictionary which allows passing any additional arguments to the VQE.

  • Add to_matrix(). This method returns the matrix representation of the operator over the full fermionic Fock space in the occupation number basis.

  • Added Gaussian drivers to allow execution on python 3.9 (MacOS, Windows, Linux).

  • Support was added for generalized fermionic excitations. These kinds of excitations are effectively ignoring the orbital occupancies and instead yield all possible excitations within a spin species. Furthermore, another option was added which can be used to enabled spin- flipped excitations.

  • Runs checks for the excitations in a UCC ansatz when the excitations were created by a function. If the excitations are not in the expected format the checks raise a qiskit_nature.QiskitNatureError.

Upgrade Notes

  • In order to fix the ElectronicStructureProblem symmetry_sector_locator() information on the mapping was required and the QubitConverter sector_locator parameter callback signature of the convert() method was changed from sector_locator: Optional[Callable[[Z2Symmetries], Optional[List[int]]]] to sector_locator: Optional[Callable[[Z2Symmetries, "QubitConverter"], Optional[List[int]]]] i.e. your supplied callback method must now take a second parameter which is a QubitConverter instance and when invoked will be the instance upon which the convert was called. If you have created your own sector locator then you will need to update it`s signature otherwise the code will fail when calling it now.

  • The EvolvedOperatorAnsatz, from the Nature circuit.library, which was migrated in an earlier release to core Qiskit i.e. Terra, has now been removed. You should change any code that still uses this over to the core Qiskit one, from qiskit.circuit.library, as a direct replacement.

Deprecation Notes

  • Rename the runtime “program” to runtime “client” to avoid name confusions and reflect the fact that it is an interface for code executed in the cloud. The classes VQEProgram and VQEProgramResult have been renamed to VQEClient, VQERuntimeResult, respectively.

Bug Fixes

  • This also ensures that the getter/setter methods of the VQE factories actually affect the constructed VQE instance.

  • Fixed the manual active orbital selection when specifying the active number of electrons as a tuple rather than an integer.

  • Fixed a typo in the ElectronicEnergy._orbital_energies variable name and ensures the correct behavior of the orbital_energies property getter.

  • The ElectronicStructureResult did not initialize the _computed_dipole_moment variable causing critical errors when trying to print a result from an algorithm which does not compute these observables. Proper initialization fixes this issue. Printing the result would also fail when complex numbers were stored. This has also been remedied.

  • Fixed an issue where the existing Mapper was incorrectly mapping the creation operator :math:+
    and the annihilation operator :math:-. It used to be that :math:+ was mapped to
    :math:\sigma_+ and :math:- was mapped to :math:\sigma_-, but it is correct that
    :math:+ is mapped to :math:\sigma_- and :math:- is mapped to :math\sigma_+.

  • Fixes the creation on the HartreeFock initial state which could fail when Z2Symettry reduction was being used via the provided QubitConverter.

  • Also fixes the ElectronicStructureProblem symmetry_sector_locator(), which uses the HartreeFock class too, so that it correctly determines the sector containing the ground state when auto symmetry reduction is used.

  • Ensure BaseProblem.molecule_data_transformed is set when using a legacy driver type without any transformers.

  • Fixes the formatting of the occupied modals and adds the excited state energies when printing a VibrationalStructureResult.

  • Fixes the return type of num_occupied_modals_per_mode() from Optional[List[float]] to Optional[List[List[float]]]

  • Fixes QEOM such that when using parity mapping with two_qubit_reduction, or Z2 symmetries with any mapping, that the excited states are computed as expected.

  • Fix the electronic structure problem sector locator such that the ‘auto’ Z2 symmetry conversion, of the qubit converter, results in the ground state for such problems and not some other value due to incorrect sector selection.

  • Allow input operator to BravyiKitaevSuperFastMapper to be FermionicOp in sparse storage format. Previously, all input was interpreted as dense storage format, which raised an error when parsing sparse format as dense failed.

  • Updates the runtime tutorial to consistently use the new drivers in combination with the new transformers and the Property-framework in general.

Qiskit Nature 0.2.2

13 Oct 20:45
50b16fa
Compare
Choose a tag to compare

Changelog

Added

  • Exposes the callback option of the VQE algorithm in the VQE factory classes. It also adds a general kwargs dictionary which allows passing any additional arguments to the VQE.

Fixed

  • This also ensures that the getter/setter methods of the VQE factories actually affect the constructed VQE instance.
  • Fixed a typo in the ElectronicEnergy._orbital_energies variable name and ensures the correct behavior of the orbital_energies property getter.
  • The ElectronicStructureResult did not initialize the _computed_dipole_moment variable causing critical errors when trying to print a result from an algorithm which does not compute these observables. Proper initialization fixes this issue. Printing the result would also fail when complex numbers were stored. This has also been remedied.
  • Fixed an issue where the existing Mapper was incorrectly mapping the creation operator + and the annihilation operator -.
  • Allow input operator to BravyiKitaevSuperFastMapper to be FermionicOp in sparse storage format. Previously, all input was interpreted as dense storage format, which raised an error when parsing sparse format as dense failed.

Qiskit Nature 0.2.1

09 Sep 14:45
bffdbc4
Compare
Choose a tag to compare

Changelog

Fixed

  • Ensure BaseProblem.molecule_data_transformed is set when using a legacy driver type without any transformers.
  • Updates the runtime tutorial to consistently use the new drivers in combination with the new transformers and the Property-framework in general.