Qiskit’s chemistry module (qiskit.chemistry
)¶
This is Qiskit’s chemistry module that provides for experimentation with chemistry domain problems such as ground state energy and excited state energies of molecules.
Overview¶
This is an overview of the workings of the chemistry module and how it may be used. There are different levels of exposure to its functionality, allowing for experimentation at different abstractions. The outline below starts with the flow that provides the most control of the process.
A classical chemistry driver is first instantiated, from the available drivers
,
by means of a molecule specification, along with other configuration such as basis set and method
(RHF, ROHF, UHF). This configuration may include custom settings for the specific driver for more
custom control over the driver’s behavior. When the driver is run the output is a mostly driver
independent QMolecule
. This contains various quantities that were
computed including one and twobody electron integrals that are used as input
FermionicOperator
. Mostly driver independent means that these integrals,
for example, will be there from every driver but the values may differ due to how each underlying
chemistry library/program computes them. Also some fields in the QMolecule may not be populated by
all drivers, for instance dipole integrals are not output from the PyQuante driver, and hence the
dipole moment cannot be computed by qiskit.chemistry when using this driver. The FermionicOperator
once created can then be converted/mapped to a qubit operator for use as input to an Aqua
algorithms. The operator must be in qubit form at this stage since the execution target of the
algorithm will be a quantum device, or simulator ,comprised of qubits and the mapping is needed as
qubits behave differently than fermions. Once the algorithm is run it will compute the electronic
part of the quantity, such as the electronic ground state energy. To get the total ground state
energy this can be combined with the nuclear repulsion energy in the QMolecule.
Instead of using the FermionicOperator the core.Hamiltonian
may be used. This
itself uses the FermionicOperator but provides a higher level of function to simplify use. For
instance the FermionicOperator supports particlehole transformation and different mappings. And to
compute dipole moments each of the X, Y and Z dipole integrals must be prepared, as individual
FermionicOperators, in a like manner to the main electronic energy one, i.e. same transformations,
and eventually same qubit mapping. The core.Hamiltonian class does all this and more, such as
orbital reductions, frozen core and automatic symmetry reduction. When run with a QMolecule output
from a driver it produces qubit operators that can be given directly to Aqua algorithms for
the computation. Also available are several properties, such as number of particles and number of
orbitals, that are needed to correctly instantiate chemistry specific components such as
UCCSD
and HartreeFock
.
Using the FermionicOperator directly requires taking the initial values for the QMolecule and then
keeping track of any changes based on any orbital elimination and/or freezing, and/or Z2Symmetry
reductions that are done. Once the output qubit operators have been used with an Aqua algorithm,
to compute the electronic result, this result can be fed back to the core.Hamiltonian, to
process_algorithm_result()
which will then compute a final total result
including a user friendly formatted text result that may be printed.
Lastly the chemistry applications
may be used. These are given a chemistry driver and,
in the case of MolecularGroundStateEnergy
an optional instance of an Aqua
MinimumEigensolver
, such as VQE
.
Optional since components such as UCCSD
need certain
information that may be unknown at this point. So alternatively, when its method
compute_energy()
is run a callback can be provided
which will later be passed information, such as number of particles and orbitals, and allow a
complete MinimumEigensolver to be built using say UCCSD with HartreeFock, and subsequently returned
to the application and run. MinimumEigensolver itself uses the core.Hamiltonian class wrapping
it to form this high level application.
Mappings¶
To map the FermionicOperator to a qubit operator the chemistry module supports the following mappings:
 Jordan Wigner
The JordanWigner transformation, maps spin operators onto fermionic creation and annihilation operators. It was proposed by Ernst Pascual Jordan and Eugene Paul Wigner for onedimensional lattice models, but now twodimensional analogues of the transformation have also been created. The Jordan–Wigner transformation is often used to exactly solve 1D spinchains by transforming the spin operators to fermionic operators and then diagonalizing in the fermionic basis.
 Parity
The paritymapping transformation. optimizes encodings of fermionic manybody systems by qubits in the presence of symmetries. Such encodings eliminate redundant degrees of freedom in a way that preserves a simple structure of the system Hamiltonian enabling quantum simulations with fewer qubits.
 BravyiKitaev
Also known as binarytreebased qubit mapping, the BravyiKitaev transformation is a method of mapping the occupation state of a fermionic system onto qubits. This transformation maps the Hamiltonian of \(n\) interacting fermions to an \(\mathcal{O}(\log n)\) local Hamiltonian of \(n\) qubits. This is an improvement in locality over the Jordan–Wigner transformation, which results in an \(\mathcal{O}(n)\) local qubit Hamiltonian. The Bravyi–Kitaev transformation was proposed by Sergey B. Bravyi and Alexei Yu. Kitaev.
 BravyiKitaev Superfast
BravyiKitaev Superfast (BKSF) algorithm is a mapping from fermionic operators to qubit operators. BKSF algorithm defines an abstract model where the fermionic modes are mapped to vertices of an interaction graph. The edges of the graph correspond to the interaction between the modes. The graph can be constructed from the Hamiltonian. The simulation is done by putting qubits on the edges of the graph. Each fermionic operator costs \(\mathcal{O}(d)\) qubit operations, where \(d\) is the degree of the interaction graph. The BKSF was proposed by Kanav Setia and James D. Whitfield.
The classes and submodules of qiskit.chemistry are now listed for reference:
Chemistry Error¶
Base class for errors raised by the QiskitChemistry SDK. 
Chemistry Classes¶
A set of functions to map fermionic Hamiltonians to qubit Hamiltonians. 

Molecule data class containing driver result. 

A utility class for MollerPlesset 2nd order (MP2) information 
Submodules¶
Chemistry specific Aqua algorithms ( 

Chemistry Components ( 

Chemistry Core ( 