Skip to content

Qiskit Nature 0.3.0

Compare
Choose a tag to compare
@manoelmarques manoelmarques released this 15 Dec 16:41
· 443 commits to main since this release
3fe5ac2

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.