Qiskit-nature

Latest version: v0.7.2

Safety actively analyzes 665704 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.3.0

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.

0.2.2

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.

0.2.1

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.

0.2.0

Changelog

Added

- Add `qiskit_nature.mappers.second_quantization.BravyiKitaevSuperFastMapper` implementing
the Bravyi-Kitaev super-fast fermion-to-qubit mapping. For example

from qiskit_nature.mappers.second_quantization import BravyiKitaevSuperFastMapper
mapper = BravyiKitaevSuperFastMapper()
mapper.map(fermionic_op)

- The `qiskit_nature.operators.SecondQuantizedOp` now has a method
`qiskit_nature.operators.SecondQuantizedOp.is_hermitian()` method which will
return ``True`` if the operator is equivalent to its adjoint and ``False`` otherwise

- `qiskit_nature.operators.SecondQuantizedOp.to_list()` is now an abstract method of
`qiskit_nature.operators.SecondQuantizedOp` that is implemented by all subclasses

- Add `qiskit_nature.operators.second_quantization.FermionicOp.to_normal_order()`.
It returns the normal ordered fermionic operator that is equivalent to self.

- Introduces the `qiskit_nature.drivers.second_quantization.ElectronicStructureMoleculeDriver` and
`qiskit_nature.drivers.second_quantization.VibrationalStructureMoleculeDriver`
that allow for the creation of Molecule-based drivers by specifying a molecule plus basis and
method (for Electronic Structure drivers only) and a driver type. An additional type `AUTO` allows for
the lookup of the first driver installed that supports the given method. The documentation of
those two molecule driver classes gives more details on it.

- The Property framework is the new modular and extensible approach for
representing observable quantities. The framework is used as a replacement
for the legacy driver results like `QMolecule` and `WatsonHamiltonian`.
Please refer to the tutorial and documentation for more details.
Related Github issues:
* https://github.com/Qiskit/qiskit-nature/issues/148
* https://github.com/Qiskit/qiskit-nature/issues/167
* https://github.com/Qiskit/qiskit-nature/pull/220
* https://github.com/Qiskit/qiskit-nature/issues/243
* https://github.com/Qiskit/qiskit-nature/pull/263
* https://github.com/Qiskit/qiskit-nature/issues/264
* https://github.com/Qiskit/qiskit-nature/pull/303

- Introduce the `qiskit_nature.runtime.VQEProgram` to allow leveraging Qiskit
Runtime to speed up the VQE algorithm. The `qiskit_nature.runtime.VQEProgram`
implements the `qiskit.algorithms.MinimumEigensolver` interface and can thus
be used as a drop-in replacement for other minimum eigensolvers like
`qiskit.algorithms.VQE`. See the tutorials under `docs/tutorials` for an
explicit example usage.

- The internal data in `qiskit_nature.operators.second_quantization.FermionicOp`
have been changed. As a result, more data type is now accepted by initialize.
The ascending order constraint and the no-same index constraint have been removed.
In addition, the dense and sparse labels are now automatically detected by the existence of
underscores.

The property `display_format` of `qiskit_nature.operators.second_quantization.FermionicOp`
is added. There are two modes `dense` and `sparse`.
This display format can be switched by the property `FermionicOp.display_format`.

- The internal API of the abstract class
`qiskit_nature.operators.second_quantization.SecondQuantizedOp` abstract class has been
changed to use `qiskit.opflow.mixins.StarAlgebraMixin`.

Changed

- The `qiskit_nature.circuit.library.EvolvedOperatorAnsatz` is deprecated.
Use `qiskit.circuit.library.EvolvedOperatorAnsatz` as a direct replacement instead.

- The property `dagger` in the second quantized operators is deprecated. Use `adjoint()` method
alternatively.

- * the legacy driver return types, `QMolecule` and `WatsonHamiltonian`
* the legacy transformers acting on the now deprecated driver return types
* the `BaseProblem.molecule_data` and `BaseProblem.molecule_data_transformed` attributes

- All currently existing drivers have been moved from `qiskit_nature.drivers`
to `qiskit_nature.drivers.second_quantization`. This is necessary because
future additions to Nature which reside in parallel to the
`second_quantization` submodules will not be using these drivers. Making
this separation reflects that in the code structure.
The same change was necessary for the existing `qiskit_nature.transformers`.

Fixed

- Fixed an issue where `qiskit_nature.operators.FermionicOp` raises
unwanted `ValueError` when initialized with some list of sparse label.

- Fixes the issue 198 where total dipole moment was not calculated correctly in the
`ElectronicStructureResult`.

- ``QiskitNatureError``s where not being raised properly by the ``ActiveSpaceTransformer`` due to
ill-formatted error messages.

- Fix `qiskit_nature.algorithms.AdaptVQE` after the update of
`qiskit.algorithms.VQE` which deleted the internal ``_energy_evaluation``
method that Adapt-VQE was relying on.

- The `FreezeCoreTransformer` (and `ActiveSpaceTransformer`) were incompatible with the automatic
`Z2Symmetry` reduction. This issue was fixed by correcting the
`ElectronicStructureProblem.symmetry_sector_locator` method.

- The two-qubit reduction needs to be skipped when a qubit operator only has 2
(or even fewer) qubits.

- The `qiskit_nature.runtime.VQEProgram` does support the evaluation of auxiliary
operators at the final state, but the
`qiskit_nature.runtime.VQEProgram.supports_aux_operators` method previously returned
`False` instead of `True`.

- Allow Qiskit's `qiskit.algorithms.optimizers.Optimizer` classes as input for
the ``optimizer`` in the `qiskit_nature.runtime.VQEProgram` instead of only
dictionaries.

- Changed documentation and code to better reflect rebranding of Qiskit's
chemistry module as Qiskit Nature.

0.1.5

Changelog
=========

Fixed
-----

- Allow Optimizers as input to VQEProgram (290)

0.1.4

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.