decompose_hamiltonian(mol_name, hf_data, mapping='jordan_wigner', docc_mo_indices=None, active_mo_indices=None)[source]

Decomposes the electronic Hamiltonian into a linear combination of Pauli operators using OpenFermion tools.

Example usage:

>>> decompose_hamiltonian('h2', './pyscf/sto-3g/', mapping='bravyi_kitaev')
(-0.04207897696293986+0j) [] + (0.04475014401986122+0j) [X0 Z1 X2] +
(0.04475014401986122+0j) [X0 Z1 X2 Z3] +(0.04475014401986122+0j) [Y0 Z1 Y2] +
(0.04475014401986122+0j) [Y0 Z1 Y2 Z3] +(0.17771287459806262+0j) [Z0] +
(0.17771287459806265+0j) [Z0 Z1] +(0.1676831945625423+0j) [Z0 Z1 Z2] +
(0.1676831945625423+0j) [Z0 Z1 Z2 Z3] +(0.12293305054268105+0j) [Z0 Z2] +
(0.12293305054268105+0j) [Z0 Z2 Z3] +(0.1705973832722409+0j) [Z1] +
(-0.2427428049645989+0j) [Z1 Z2 Z3] +(0.1762764080276107+0j) [Z1 Z3] +
(-0.2427428049645989+0j) [Z2]
  • mol_name (str) – name of the molecule

  • hf_data (str) – path to the directory containing the file with the Hartree-Fock electronic structure

  • mapping (str) – optional argument to specify the fermion-to-qubit mapping Input values can be 'jordan_wigner' or 'bravyi_kitaev'

  • docc_mo_indices (list) – indices of doubly-occupied molecular orbitals, i.e., the orbitals that are not correlated in the many-body wave function

  • active_mo_indices (list) – indices of active molecular orbitals, i.e., the orbitals used to build the correlated many-body wave function


instance of the QubitOperator class representing the electronic Hamiltonian

Return type