Generating the electronic Hamiltonian

For chemistry applications in quantum computing, one needs first to design the electronic Hamiltonian and convert it to qubit Hamiltonian. In this tutorial, we will explain how user can generate the electronic Hamiltonian for their subsequent quantum computing simulation.

The electronic Hamiltonian describes the energy of electrons in the electrostatic field of nuclei that are assumed to be stationary with respect to an inertial frame (1). This operator plays a central role in computational chemistry and physics for calculating properties of molecules including thermal conductivity, specific heat, electrical conductivity, optical properties, magnetic properties, and chemical reactivity.

In quantum mechanics generally, the Hamiltonian operator represents the total energy of a system, including both kinetic and potential energy components. The electronic Hamiltonian specifically focuses on the electronic component of this energy within molecular systems.

Second Quantized formulation.

The second quantized formulation expresses the Hamiltonian in terms of creation and annihilation operators that automatically preserve the antisymmetry requirements for fermions. This representation is particularly useful for implementing computational methods in quantum chemistry.

\[H = \sum_{pq} h_{pq} a_p^\dagger a_q + \frac{1}{2} \sum_{pqrs} g_{pqrs} a_p^\dagger a_q^\dagger a_r a_s\]

where: - \(h_{pq}\) are the one-electron integrals - \(g_{pqrs}\) are the two-electron integrals - \(a_p^\dagger\) and \(a_p\) are the fermion creation and annihilation operators

This formulation provides significant advantages for computational implementations and development of electron correlation methods.

Computational Implementation

The computational implementation of electronic Hamiltonians involves several key steps that transform the abstract operator into a concrete numerical representation.

  • Basis Set Expansion: The first step is to express the electronic Hamiltonian in a finite basis of atomic orbitals (AOs). These are typically Gaussian-type orbitals centered on atoms, chosen for computational efficiency

  • Integral Calculation: Once a basis is chosen, one-electron and two-electron integrals are computed in the AO basis. These represent matrix elements of the Hamiltonian components between different basis functions

  • Self-Consistent Field Calculation: A self-consistent field (SCF) procedure, typically using the Hartree-Fock method, is performed to obtain molecular orbitals (MOs) as linear combinations of AOs

  • Integral Transformation: The AO integrals are transformed to the MO basis using the coefficients from the SCF calculation. This transformation is computationally intensive but crucial for correlated methods

  • Spin Adaptation: For many applications, the spatial MO integrals are converted to spin MO integrals to account for electron spin explicitly

In this tutorial, we employ pyscf to perform these calculations of electron integrals.

[1]:
# Requires pyscf to be installed
%pip install pyscf
Requirement already satisfied: pyscf in /usr/local/lib/python3.10/dist-packages (2.10.0)
Requirement already satisfied: scipy>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from pyscf) (1.10.1)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from pyscf) (59.6.0)
Requirement already satisfied: h5py>=2.7 in /usr/local/lib/python3.10/dist-packages (from pyscf) (3.10.0)
Requirement already satisfied: numpy!=1.16,!=1.17,>=1.13 in /usr/local/lib/python3.10/dist-packages (from pyscf) (1.26.4)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Note: you may need to restart the kernel to use updated packages.

To calculate the electronic integrals, and generate the spin molecular Hamiltonian, import the following

[2]:
from qchem.classical_pyscf import get_mol_hamiltonian

To convert from fermionic Hamiltonian to qubit hamiltonian, import the following

[3]:
from qchem.hamiltonian import jordan_wigner_fermion
[4]:
# Import the cudaq module
import cudaq

# Set the traget
# Double precision is recommended for the best performance.
cudaq.set_target("nvidia", option = "fp64")

Full space Hamiltonian

(a) Generate the molecular Hamiltonian using Restricted Hartree Fock molecular orbitals

[5]:
H2_mol = "qchem/H2.xyz"

# Run HF, ccsd and compute the spin molecular hamiltonian using the HF molecular orbitals.
molecular_data = get_mol_hamiltonian(xyz=H2_mol, spin=0, charge=0, basis='sto3g', ccsd=True, verbose=True)

obi = molecular_data[0]
tbi = molecular_data[1]
e_nn = molecular_data[2]
nelectrons = molecular_data[3]
norbitals = molecular_data[4]
fermionic_hamiltonian = molecular_data[5]
energies = molecular_data[6]

print('-------------------------------')
print('Molecular data')
print('-------------------------------')
print('Number of electrons: ', nelectrons)
print('Total number of spatial orbitals: ', norbitals)
print('Number of spin molecular orbitals: ', 2 * norbitals)
print('Nuclear repulsion energy: ', e_nn)
print('Fermionic hamiltonian: ', fermionic_hamiltonian)
print('Energies: ', energies)

print('-------------------------------')
print('Jordan-Wigner transformation')
print('-------------------------------')
# Compute the qubit hamiltonian.
spin_ham = jordan_wigner_fermion(obi, tbi, e_nn, tolerance = 1e-12)

print('[Cudaq] Qubit hamiltonian: ', spin_ham)
print('[Cudaq] Number of terms in the Qubit hamiltonian: ', spin_ham.term_count)

output file: qchem/H2-pyscf.log
[pyscf] Total number of orbitals =  2
[pyscf] Total number of electrons =  2
[pyscf] HF energy =  -1.1166512474115224
[pyscf] Total R-CCSD energy =  -1.137263505145682
-------------------------------
Molecular data
-------------------------------
Number of electrons:  2
Total number of spatial orbitals:  2
Number of spin molecular orbitals:  4
Nuclear repulsion energy:  0.7131768341239892
Fermionic hamiltonian:  -1.2521011771187975 a_0^† a_0 + -1.2521011771187975 b_1^† b_1 + 0.16859356817552074 a_0^† a_0^† a_0 a_0 + 0.16859356817552074 b_1^† b_1^† b_1 b_1 + 0.16859356817552074 a_0^† b_1^† b_1 a_0 + 0.16859356817552074 b_1^† a_0^† a_0 b_1 + 3.469446951953614e-18 a_0^† a_0^† a_0 a_2 + 3.469446951953614e-18 b_1^† b_1^† b_1 b_3 + 3.469446951953614e-18 a_0^† b_1^† b_1 a_2 + 3.469446951953614e-18 b_1^† a_0^† a_0 b_3 + 2.7755575615628914e-17 a_0^† a_0^† a_2 a_0 + 2.7755575615628914e-17 b_1^† b_1^† b_3 b_1 + 2.7755575615628914e-17 a_0^† b_1^† b_3 a_0 + 2.7755575615628914e-17 b_1^† a_0^† a_2 b_1 + 0.045330601391148286 a_0^† a_0^† a_2 a_2 + 0.045330601391148286 b_1^† b_1^† b_3 b_3 + 0.045330601391148286 a_0^† b_1^† b_3 a_2 + 0.045330601391148286 b_1^† a_0^† a_2 b_3 + -2.220446049250313e-16 a_0^† a_2 + -2.220446049250313e-16 b_1^† b_3 + -6.938893903907228e-18 a_0^† a_2^† a_0 a_0 + -6.938893903907228e-18 b_1^† b_3^† b_1 b_1 + -6.938893903907228e-18 a_0^† b_3^† b_1 a_0 + -6.938893903907228e-18 b_1^† a_2^† a_0 b_1 + 0.04533060139114836 a_0^† a_2^† a_0 a_2 + 0.04533060139114836 b_1^† b_3^† b_1 b_3 + 0.04533060139114836 a_0^† b_3^† b_1 a_2 + 0.04533060139114836 b_1^† a_2^† a_0 b_3 + 0.1658409687410311 a_0^† a_2^† a_2 a_0 + 0.1658409687410311 b_1^† b_3^† b_3 b_1 + 0.1658409687410311 a_0^† b_3^† b_3 a_0 + 0.1658409687410311 b_1^† a_2^† a_2 b_1 + 0.0 a_0^† a_2^† a_2 a_2 + 0.0 b_1^† b_3^† b_3 b_3 + 0.0 a_0^† b_3^† b_3 a_2 + 0.0 b_1^† a_2^† a_2 b_3 + 9.71445146547012e-17 a_2^† a_0 + 9.71445146547012e-17 b_3^† b_1 + 8.673617379884035e-18 a_2^† a_0^† a_0 a_0 + 8.673617379884035e-18 b_3^† b_1^† b_1 b_1 + 8.673617379884035e-18 a_2^† b_1^† b_1 a_0 + 8.673617379884035e-18 b_3^† a_0^† a_0 b_1 + 0.16584096874103113 a_2^† a_0^† a_0 a_2 + 0.16584096874103113 b_3^† b_1^† b_1 b_3 + 0.16584096874103113 a_2^† b_1^† b_1 a_2 + 0.16584096874103113 b_3^† a_0^† a_0 b_3 + 0.04533060139114828 a_2^† a_0^† a_2 a_0 + 0.04533060139114828 b_3^† b_1^† b_3 b_1 + 0.04533060139114828 a_2^† b_1^† b_3 a_0 + 0.04533060139114828 b_3^† a_0^† a_2 b_1 + 2.7755575615628914e-17 a_2^† a_0^† a_2 a_2 + 2.7755575615628914e-17 b_3^† b_1^† b_3 b_3 + 2.7755575615628914e-17 a_2^† b_1^† b_3 a_2 + 2.7755575615628914e-17 b_3^† a_0^† a_2 b_3 + -0.47632466628305836 a_2^† a_2 + -0.47632466628305836 b_3^† b_3 + 0.045330601391148355 a_2^† a_2^† a_0 a_0 + 0.045330601391148355 b_3^† b_3^† b_1 b_1 + 0.045330601391148355 a_2^† b_3^† b_1 a_0 + 0.045330601391148355 b_3^† a_2^† a_0 b_1 + 6.938893903907228e-18 a_2^† a_2^† a_0 a_2 + 6.938893903907228e-18 b_3^† b_3^† b_1 b_3 + 6.938893903907228e-18 a_2^† b_3^† b_1 a_2 + 6.938893903907228e-18 b_3^† a_2^† a_0 b_3 + 6.938893903907228e-18 a_2^† a_2^† a_2 a_0 + 6.938893903907228e-18 b_3^† b_3^† b_3 b_1 + 6.938893903907228e-18 a_2^† b_3^† b_3 a_0 + 6.938893903907228e-18 b_3^† a_2^† a_2 b_1 + 0.17432084334442566 a_2^† a_2^† a_2 a_2 + 0.17432084334442566 b_3^† b_3^† b_3 b_3 + 0.17432084334442566 a_2^† b_3^† b_3 a_2 + 0.17432084334442566 b_3^† a_2^† a_2 b_3
Energies:  {'hf': -1.1166512474115224, 'mp2': None, 'casci': None, 'casscf': None, 'ccsd': -1.137263505145682, 'fci': None}
-------------------------------
Jordan-Wigner transformation
-------------------------------
[Cudaq] Qubit hamiltonian:  (-0.0996319+0i) + (0.171106+0i) * Z0 + (0.171106+0i) * Z1 + (-0.22251+0i) * Z2 + (-0.22251+0i) * Z3 + (0.168594+0i) * Z0Z1 + (0.12051+0i) * Z0Z2 + (0.165841+0i) * Z0Z3 + (0.165841+0i) * Z1Z2 + (0.12051+0i) * Z1Z3 + (0.174321+0i) * Z2Z3 + (-0.0453306+0i) * X0X1Y2Y3 + (0.0453306+0i) * X0Y1Y2X3 + (0.0453306+0i) * Y0X1X2Y3 + (-0.0453306+0i) * Y0Y1X2X3
[Cudaq] Number of terms in the Qubit hamiltonian:  15

(b) Generate the molecular Hamiltonian using Unrestricted Hartree Fock molecular orbitals

[6]:
H2_mol = "qchem/H2.xyz"

# Run HF, ccsd and compute the spin molecular hamiltonian using the HF molecular orbitals.
molecular_data = get_mol_hamiltonian(xyz=H2_mol, spin=0, charge=0, basis='sto3g', UR=True, ccsd=True, verbose=True)

obi = molecular_data[0]
tbi = molecular_data[1]
e_nn = molecular_data[2]
nelectrons = molecular_data[3]
norbitals = molecular_data[4]
fermionic_hamiltonian = molecular_data[5]
energies = molecular_data[6]

print('-------------------------------')
print('Molecular data')
print('-------------------------------')
print('Number of electrons: ', nelectrons)
print('Total number of spatial orbitals: ', norbitals)
print('Number of spin molecular orbitals: ', 2 * norbitals)
print('Nuclear repulsion energy: ', e_nn)
print('Fermionic hamiltonian: ', fermionic_hamiltonian)
print('Energies: ', energies)

print('-------------------------------')
print('Jordan-Wigner transformation')
print('-------------------------------')
# Compute the qubit hamiltonian.
spin_ham = jordan_wigner_fermion(obi, tbi, e_nn, tolerance = 1e-12)

print('[Cudaq] Qubit hamiltonian: ', spin_ham)
print('[Cudaq] Number of terms in the Qubit hamiltonian: ', spin_ham.term_count)
overwrite output file: qchem/H2-pyscf.log
[pyscf] Total number of alpha molecular orbitals =  2
[pyscf] Total number of beta molecular orbitals =  2
[pyscf] Total number of electrons =  2
[pyscf] HF energy =  -1.1166512474115224
[pyscf] Total UR-CCSD energy =  -1.137263505145682
-------------------------------
Molecular data
-------------------------------
Number of electrons:  2
Total number of spatial orbitals:  2
Number of spin molecular orbitals:  4
Nuclear repulsion energy:  0.7131768341239892
Fermionic hamiltonian:  (-1.2521011771187975+0j) a_0^† a_0 + (-1.2521011771187975+0j) b_1^† b_1 + (-2.220446049250313e-16+0j) a_0^† a_2 + (-2.220446049250313e-16+0j) b_1^† b_3 + (9.71445146547012e-17+0j) a_2^† a_0 + (9.71445146547012e-17+0j) b_3^† b_1 + (-0.47632466628305836+0j) a_2^† a_2 + (-0.47632466628305836+0j) b_3^† b_3 + (0.16859356817552074+0j) a_0^† a_0^† a_0 a_0 + (0.16859356817552074+0j) b_1^† b_1^† b_1 b_1 + (0.16859356817552074+0j) a_0^† b_1^† b_1 a_0 + (0.16859356817552074+0j) b_1^† a_0^† a_0 b_1 + (3.469446951953614e-18+0j) a_0^† a_0^† a_0 a_2 + (3.469446951953614e-18+0j) b_1^† b_1^† b_1 b_3 + (3.469446951953614e-18+0j) a_0^† b_1^† b_1 a_2 + (3.469446951953614e-18+0j) b_1^† a_0^† a_0 b_3 + (2.7755575615628914e-17+0j) a_0^† a_0^† a_2 a_0 + (2.7755575615628914e-17+0j) b_1^† b_1^† b_3 b_1 + (2.7755575615628914e-17+0j) a_0^† b_1^† b_3 a_0 + (2.7755575615628914e-17+0j) b_1^† a_0^† a_2 b_1 + (0.045330601391148286+0j) a_0^† a_0^† a_2 a_2 + (0.045330601391148286+0j) b_1^† b_1^† b_3 b_3 + (0.045330601391148286+0j) a_0^† b_1^† b_3 a_2 + (0.045330601391148286+0j) b_1^† a_0^† a_2 b_3 + (-6.938893903907228e-18+0j) a_0^† a_2^† a_0 a_0 + (-6.938893903907228e-18+0j) b_1^† b_3^† b_1 b_1 + (-6.938893903907228e-18+0j) a_0^† b_3^† b_1 a_0 + (-6.938893903907228e-18+0j) b_1^† a_2^† a_0 b_1 + (0.04533060139114836+0j) a_0^† a_2^† a_0 a_2 + (0.04533060139114836+0j) b_1^† b_3^† b_1 b_3 + (0.04533060139114836+0j) a_0^† b_3^† b_1 a_2 + (0.04533060139114836+0j) b_1^† a_2^† a_0 b_3 + (0.1658409687410311+0j) a_0^† a_2^† a_2 a_0 + (0.1658409687410311+0j) b_1^† b_3^† b_3 b_1 + (0.1658409687410311+0j) a_0^† b_3^† b_3 a_0 + (0.1658409687410311+0j) b_1^† a_2^† a_2 b_1 + 0j a_0^† a_2^† a_2 a_2 + 0j b_1^† b_3^† b_3 b_3 + 0j a_0^† b_3^† b_3 a_2 + 0j b_1^† a_2^† a_2 b_3 + (8.673617379884035e-18+0j) a_2^† a_0^† a_0 a_0 + (8.673617379884035e-18+0j) b_3^† b_1^† b_1 b_1 + (8.673617379884035e-18+0j) a_2^† b_1^† b_1 a_0 + (8.673617379884035e-18+0j) b_3^† a_0^† a_0 b_1 + (0.16584096874103113+0j) a_2^† a_0^† a_0 a_2 + (0.16584096874103113+0j) b_3^† b_1^† b_1 b_3 + (0.16584096874103113+0j) a_2^† b_1^† b_1 a_2 + (0.16584096874103113+0j) b_3^† a_0^† a_0 b_3 + (0.04533060139114828+0j) a_2^† a_0^† a_2 a_0 + (0.04533060139114828+0j) b_3^† b_1^† b_3 b_1 + (0.04533060139114828+0j) a_2^† b_1^† b_3 a_0 + (0.04533060139114828+0j) b_3^† a_0^† a_2 b_1 + (2.7755575615628914e-17+0j) a_2^† a_0^† a_2 a_2 + (2.7755575615628914e-17+0j) b_3^† b_1^† b_3 b_3 + (2.7755575615628914e-17+0j) a_2^† b_1^† b_3 a_2 + (2.7755575615628914e-17+0j) b_3^† a_0^† a_2 b_3 + (0.045330601391148355+0j) a_2^† a_2^† a_0 a_0 + (0.045330601391148355+0j) b_3^† b_3^† b_1 b_1 + (0.045330601391148355+0j) a_2^† b_3^† b_1 a_0 + (0.045330601391148355+0j) b_3^† a_2^† a_0 b_1 + (6.938893903907228e-18+0j) a_2^† a_2^† a_0 a_2 + (6.938893903907228e-18+0j) b_3^† b_3^† b_1 b_3 + (6.938893903907228e-18+0j) a_2^† b_3^† b_1 a_2 + (6.938893903907228e-18+0j) b_3^† a_2^† a_0 b_3 + (6.938893903907228e-18+0j) a_2^† a_2^† a_2 a_0 + (6.938893903907228e-18+0j) b_3^† b_3^† b_3 b_1 + (6.938893903907228e-18+0j) a_2^† b_3^† b_3 a_0 + (6.938893903907228e-18+0j) b_3^† a_2^† a_2 b_1 + (0.17432084334442566+0j) a_2^† a_2^† a_2 a_2 + (0.17432084334442566+0j) b_3^† b_3^† b_3 b_3 + (0.17432084334442566+0j) a_2^† b_3^† b_3 a_2 + (0.17432084334442566+0j) b_3^† a_2^† a_2 b_3
Energies:  {'hf': -1.1166512474115224, 'mp2': None, 'casci': None, 'casscf': None, 'ccsd': -1.137263505145682, 'fci': None}
-------------------------------
Jordan-Wigner transformation
-------------------------------
[Cudaq] Qubit hamiltonian:  (-0.0996319+0i) + (0.171106+0i) * Z0 + (0.171106+0i) * Z1 + (-0.22251+0i) * Z2 + (-0.22251+0i) * Z3 + (0.168594+0i) * Z0Z1 + (0.12051+0i) * Z0Z2 + (0.165841+0i) * Z0Z3 + (0.165841+0i) * Z1Z2 + (0.12051+0i) * Z1Z3 + (0.174321+0i) * Z2Z3 + (-0.0453306+0i) * X0X1Y2Y3 + (0.0453306+0i) * X0Y1Y2X3 + (0.0453306+0i) * Y0X1X2Y3 + (-0.0453306+0i) * Y0Y1X2X3
[Cudaq] Number of terms in the Qubit hamiltonian:  15

Active space Hamiltonian:

The active space Hamiltonian (2) is a reduced-dimensionality quantum chemical model that focuses computational resources on the most chemically relevant orbitals and electrons. This approach enables practical calculations for systems with strong electron correlation by partitioning orbitals into three classes:

  • Core orbitals: Fully occupied and treated as inert

  • Active orbitals: Partially occupied, explicitly correlated

  • Virtual orbitals: Unoccupied and excluded

The active space Hamiltonian \(H^{AS}\) derives from the full electronic Hamiltonian through orbital space partitioning:

\[H^{AS} = \sum_{pq}^{\text{active}} \tilde{h}_{pq} \hat{a}_p^{\dagger} \hat{a}_q + \frac{1}{2} \sum_{pqrs}^{\text{active}} g_{pqrs} \hat{a}_p^{\dagger} \hat{a}_q^{\dagger} \hat{a}_r \hat{a}_s + E_{\text{core}}\]

Where: - \(\tilde{h}_{pq}\) are modified one-electron integrals incorporating mean-field effects from core orbitals - \(g_{pqrs}\) are two-electron integrals within the active space - \(E_{\text{core}}\) accounts for frozen core contributions

(a) Generate the active space hamiltonian using RHF molecular orbitals.

[7]:
H2O_mol = "qchem/H2O.xyz"

# Run HF, ccsd, casci and compute the active space spin molecular hamiltonian
# using the HF molecular orbitals with 4 electron and 4 orbitals in the active space.
molecular_data = get_mol_hamiltonian(xyz=H2O_mol, spin=0, charge=0, basis='631g', nele_cas=4, norb_cas=4,
                                     ccsd=True, casci=True, verbose=True)

obi = molecular_data[0]
tbi = molecular_data[1]
ecore = molecular_data[2]
nelectrons = molecular_data[3]
norbitals = molecular_data[4]
fermionic_hamiltonian = molecular_data[5]
energies = molecular_data[6]

print('-------------------------------')
print('Molecular data')
print('-------------------------------')
print('Number of electrons in the active space: ', nelectrons)
print('Number of spatial orbitals in the active space: ', norbitals)
print('Number of spin molecular orbitals: ', 2 * norbitals)
print('Core energy: ', ecore)
print('CASCI Energy: ', energies['casci'])
#print('Fermionic hamiltonian: ', fermionic_hamiltonian)

print('-------------------------------')
print('Jordan-Wigner transformation')
print('-------------------------------')
# Compute the qubit hamiltonian.
spin_ham = jordan_wigner_fermion(obi, tbi, ecore)
print('[Cudaq] Qubit hamiltonian: ', spin_ham)
print('[Cudaq] Number of terms in the Qubit hamiltonian: ', spin_ham.term_count)
output file: qchem/H2O-pyscf.log
[pyscf] Total number of orbitals =  13
[pyscf] Total number of electrons =  10
[pyscf] HF energy =  -75.9839755372789
[pyscf] R-CASCI energy using molecular orbitals=  -75.98508981028924
[pyscf] R-CCSD energy of the active space using molecular orbitals=  -75.98508980454677
-------------------------------
Molecular data
-------------------------------
Number of electrons in the active space:  4
Number of spatial orbitals in the active space:  4
Number of spin molecular orbitals:  8
Core energy:  -69.78937499839162
CASCI Energy:  -75.98508981028924
-------------------------------
Jordan-Wigner transformation
-------------------------------
[Cudaq] Qubit hamiltonian:  (-74.3886+0i) + (0.429698+0i) * Z0 + (0.429698+0i) * Z1 + (0.395076+0i) * Z2 + (0.395076+0i) * Z3 + (0.0246717+0i) * Z4 + (0.0246717+0i) * Z5 + (-0.0124873+0i) * Z6 + (-0.0124873+0i) * Z7 + (0.183927+0i) * Z0Z1 + (0.154956+0i) * Z0Z2 + (0.1664+0i) * Z0Z3 + (0.0441992+0i) * X0Z1Z2Z3X4 + (0.0441992+0i) * Y0Z1Z2Z3Y4 + (0.0835026+0i) * Z0Z4 + (0.0902279+0i) * Z0Z5 + (0.0881962+0i) * Z0Z6 + (0.0939854+0i) * Z0Z7 + (0.1664+0i) * Z1Z2 + (0.154956+0i) * Z1Z3 + (0.0902279+0i) * Z1Z4 + (0.0441992+0i) * X1Z2Z3Z4X5 + (0.0441992+0i) * Y1Z2Z3Z4Y5 + (0.0835026+0i) * Z1Z5 + (0.0939854+0i) * Z1Z6 + (0.0881962+0i) * Z1Z7 + (0.190993+0i) * Z2Z3 + (0.089279+0i) * Z2Z4 + (0.0924599+0i) * Z2Z5 + (0.0920865+0i) * Z2Z6 + (0.0941389+0i) * Z2Z7 + (0.0924599+0i) * Z3Z4 + (0.089279+0i) * Z3Z5 + (0.0941389+0i) * Z3Z6 + (0.0920865+0i) * Z3Z7 + (0.0843783+0i) * Z4Z5 + (0.061204+0i) * Z4Z6 + (0.0833701+0i) * Z4Z7 + (0.0833701+0i) * Z5Z6 + (0.061204+0i) * Z5Z7 + (0.0864277+0i) * Z6Z7 + (0.0184753+0i) * Z0X1Z2Z3Z4X5 + (0.0184753+0i) * Z0Y1Z2Z3Z4Y5 + (0.0184753+0i) * X0Z2Z3X4 + (0.0184753+0i) * Y0Z2Z3Y4 + (-0.0114445+0i) * X0X1Y2Y3 + (0.0114445+0i) * X0Y1Y2X3 + (0.0114445+0i) * Y0X1X2Y3 + (-0.0114445+0i) * Y0Y1X2X3 + (-0.00672531+0i) * X0X1Y4Y5 + (0.00672531+0i) * X0Y1Y4X5 + (0.00672531+0i) * Y0X1X4Y5 + (-0.00672531+0i) * Y0Y1X4X5 + (-0.00578919+0i) * X0X1Y6Y7 + (0.00578919+0i) * X0Y1Y6X7 + (0.00578919+0i) * Y0X1X6Y7 + (-0.00578919+0i) * Y0Y1X6X7 + (0.01658+0i) * X0Z1Z3X4 + (0.01658+0i) * Y0Z1Z3Y4 + (-8.79249e-05+0i) * X0Z1X2X3Z4X5 + (-8.79249e-05+0i) * X0Z1X2Y3Z4Y5 + (-8.79249e-05+0i) * Y0Z1Y2X3Z4X5 + (-8.79249e-05+0i) * Y0Z1Y2Y3Z4Y5 + (0.0166679+0i) * X0Z1Z2X4 + (0.0166679+0i) * Y0Z1Z2Y4 + (0.000423558+0i) * X0Z1Z2Z3X4Z5 + (0.000423558+0i) * Y0Z1Z2Z3Y4Z5 + (-0.00705531+0i) * X0Z1Z2Z3Z4X5Y6Y7 + (0.00705531+0i) * X0Z1Z2Z3Z4Y5Y6X7 + (0.00705531+0i) * Y0Z1Z2Z3Z4X5X6Y7 + (-0.00705531+0i) * Y0Z1Z2Z3Z4Y5X6X7 + (0.00707794+0i) * X0Z1Z2Z3X4Z6 + (0.00707794+0i) * Y0Z1Z2Z3Y4Z6 + (2.26249e-05+0i) * X0Z1Z2Z3X4Z7 + (2.26249e-05+0i) * Y0Z1Z2Z3Y4Z7 + (0.0166679+0i) * X1Z3Z4X5 + (0.0166679+0i) * Y1Z3Z4Y5 + (8.79249e-05+0i) * X1X2Y3Y4 + (-8.79249e-05+0i) * X1Y2Y3X4 + (-8.79249e-05+0i) * Y1X2X3Y4 + (8.79249e-05+0i) * Y1Y2X3X4 + (0.01658+0i) * X1Z2Z4X5 + (0.01658+0i) * Y1Z2Z4Y5 + (0.000423558+0i) * X1Z2Z3X5 + (0.000423558+0i) * Y1Z2Z3Y5 + (-0.00705531+0i) * X1Z2Z3X4X6X7 + (-0.00705531+0i) * X1Z2Z3Y4Y6X7 + (-0.00705531+0i) * Y1Z2Z3X4X6Y7 + (-0.00705531+0i) * Y1Z2Z3Y4Y6Y7 + (2.26249e-05+0i) * X1Z2Z3Z4X5Z6 + (2.26249e-05+0i) * Y1Z2Z3Z4Y5Z6 + (0.00707794+0i) * X1Z2Z3Z4X5Z7 + (0.00707794+0i) * Y1Z2Z3Z4Y5Z7 + (-0.00318093+0i) * X2X3Y4Y5 + (0.00318093+0i) * X2Y3Y4X5 + (0.00318093+0i) * Y2X3X4Y5 + (-0.00318093+0i) * Y2Y3X4X5 + (-0.00205243+0i) * X2X3Y6Y7 + (0.00205243+0i) * X2Y3Y6X7 + (0.00205243+0i) * Y2X3X6Y7 + (-0.00205243+0i) * Y2Y3X6X7 + (-0.0221661+0i) * X4X5Y6Y7 + (0.0221661+0i) * X4Y5Y6X7 + (0.0221661+0i) * Y4X5X6Y7 + (-0.0221661+0i) * Y4Y5X6X7
[Cudaq] Number of terms in the Qubit hamiltonian:  105

(b) Generate the active space Hamiltonian using the natural orbitals computed from MP2 simulation

[8]:
H2O_mol = "qchem/H2O.xyz"

# Run HF, MP2, ccsd, casci and compute the active space spin molecular hamiltonian.
# Inspect the active space from the natural orbitals. Natural orbitals are computed using MP2.
# The active space is defined by 4 electrons and 4 orbitals.
# The natural orbitals are used to compute the electron integrals.
molecular_data = get_mol_hamiltonian(xyz=H2O_mol, spin=0, charge=0, basis='631g',nele_cas=4, norb_cas=4,
                                     MP2=True, natorb=True, ccsd=True, casci=True, integrals_natorb=True, verbose=True)

obi = molecular_data[0]
tbi = molecular_data[1]
ecore = molecular_data[2]
nelectrons = molecular_data[3]
norbitals = molecular_data[4]
fermionic_hamiltonian = molecular_data[5]
energies = molecular_data[6]

print('-------------------------------')
print('Molecular data')
print('-------------------------------')
print('Number of electrons in the active space: ', nelectrons)
print('Number of spatial orbitals in the active space: ', norbitals)
print('Number of spin molecular orbitals: ', 2 * norbitals)
print('Core energy: ', ecore)
#print('Fermionic hamiltonian: ', fermionic_hamiltonian)

print('-------------------------------')
print('Jordan-Wigner transformation')
print('-------------------------------')
# Compute the qubit hamiltonian.
spin_ham = jordan_wigner_fermion(obi, tbi, ecore)
print('[Cudaq] Qubit hamiltonian: ', spin_ham)
print('[Cudaq] Number of terms in the Qubit hamiltonian: ', spin_ham.term_count)

overwrite output file: qchem/H2O-pyscf.log
[pyscf] Total number of orbitals =  13
[pyscf] Total number of electrons =  10
[pyscf] HF energy =  -75.98397553727888
[pyscf] R-MP2 energy=  -76.11280670065035
[pyscf] Natural orbital occupation number from R-MP2:
[1.99995663e+00 1.99012740e+00 1.98197049e+00 1.97722983e+00
 1.97515174e+00 2.23585706e-02 2.09527832e-02 1.73621504e-02
 1.00838241e-02 2.32351484e-03 1.74875097e-03 4.27482714e-04
 3.06831462e-04]
[pyscf] R-CASCI energy using natural orbitals=  -76.0330421260011
[pyscf] R-CCSD energy of the active space using natural orbitals=  -76.03293564805283
-------------------------------
Molecular data
-------------------------------
Number of electrons in the active space:  4
Number of spatial orbitals in the active space:  4
Number of spin molecular orbitals:  8
Core energy:  -69.59209064078028
-------------------------------
Jordan-Wigner transformation
-------------------------------
[Cudaq] Qubit hamiltonian:  (-73.4465+0i) + (0.19855+0i) * Z0 + (0.19855+0i) * Z1 + (0.233578+0i) * Z2 + (0.233578+0i) * Z3 + (-0.284531+0i) * Z4 + (-0.284531+0i) * Z5 + (-0.317727+0i) * Z6 + (-0.317727+0i) * Z7 + (0.169845+0i) * Z0Z1 + (0.137855+0i) * Z0Z2 + (0.153384+0i) * Z0Z3 + (0.145992+0i) * Z0Z4 + (0.156607+0i) * Z0Z5 + (-0.018065+0i) * X0Z1Z2Z3Z4Z5X6 + (-0.018065+0i) * Y0Z1Z2Z3Z4Z5Y6 + (0.123378+0i) * Z0Z6 + (0.164004+0i) * Z0Z7 + (0.153384+0i) * Z1Z2 + (0.137855+0i) * Z1Z3 + (0.156607+0i) * Z1Z4 + (0.145992+0i) * Z1Z5 + (0.164004+0i) * Z1Z6 + (-0.018065+0i) * X1Z2Z3Z4Z5Z6X7 + (-0.018065+0i) * Y1Z2Z3Z4Z5Z6Y7 + (0.123378+0i) * Z1Z7 + (0.163223+0i) * Z2Z3 + (0.00966883+0i) * X2Z3X4 + (0.00966883+0i) * Y2Z3Y4 + (0.119937+0i) * Z2Z4 + (0.163499+0i) * Z2Z5 + (0.140568+0i) * Z2Z6 + (0.151859+0i) * Z2Z7 + (0.163499+0i) * Z3Z4 + (0.00966883+0i) * X3Z4X5 + (0.00966883+0i) * Y3Z4Y5 + (0.119937+0i) * Z3Z5 + (0.151859+0i) * Z3Z6 + (0.140568+0i) * Z3Z7 + (0.175043+0i) * Z4Z5 + (0.141038+0i) * Z4Z6 + (0.159822+0i) * Z4Z7 + (0.159822+0i) * Z5Z6 + (0.141038+0i) * Z5Z7 + (0.170651+0i) * Z6Z7 + (0.042603+0i) * Z0X1Z2Z3Z4Z5Z6X7 + (0.042603+0i) * Z0Y1Z2Z3Z4Z5Z6Y7 + (0.042603+0i) * X0Z2Z3Z4Z5X6 + (0.042603+0i) * Y0Z2Z3Z4Z5Y6 + (-0.0155289+0i) * X0X1Y2Y3 + (0.0155289+0i) * X0Y1Y2X3 + (0.0155289+0i) * Y0X1X2Y3 + (-0.0155289+0i) * Y0Y1X2X3 + (0.00424669+0i) * X0X1Y2Z3Z4Y5 + (-0.00424669+0i) * X0Y1Y2Z3Z4X5 + (-0.00424669+0i) * Y0X1X2Z3Z4Y5 + (0.00424669+0i) * Y0Y1X2Z3Z4X5 + (0.00424669+0i) * X0X1X3X4 + (0.00424669+0i) * X0Y1Y3X4 + (0.00424669+0i) * Y0X1X3Y4 + (0.00424669+0i) * Y0Y1Y3Y4 + (-0.0106147+0i) * X0X1Y4Y5 + (0.0106147+0i) * X0Y1Y4X5 + (0.0106147+0i) * Y0X1X4Y5 + (-0.0106147+0i) * Y0Y1X4X5 + (-0.0406258+0i) * X0X1Y6Y7 + (0.0406258+0i) * X0Y1Y6X7 + (0.0406258+0i) * Y0X1X6Y7 + (-0.0406258+0i) * Y0Y1X6X7 + (-0.0382825+0i) * Z0X2Z3X4 + (-0.0382825+0i) * Z0Y2Z3Y4 + (0.0355881+0i) * X0Z1Z3Z4Z5X6 + (0.0355881+0i) * Y0Z1Z3Z4Z5Y6 + (0.0184957+0i) * X0Z1X2X4Z5X6 + (-0.00516964+0i) * X0Z1X2Y4Z5Y6 + (0.0236653+0i) * X0Z1Y2Y4Z5X6 + (0.0236653+0i) * Y0Z1X2X4Z5Y6 + (-0.00516964+0i) * Y0Z1Y2X4Z5X6 + (0.0184957+0i) * Y0Z1Y2Y4Z5Y6 + (-0.0340358+0i) * Z0X3Z4X5 + (-0.0340358+0i) * Z0Y3Z4Y5 + (0.00538795+0i) * X0Z1X2X3Z4Z5Z6X7 + (0.00538795+0i) * X0Z1X2Y3Z4Z5Z6Y7 + (0.00538795+0i) * Y0Z1Y2X3Z4Z5Z6X7 + (0.00538795+0i) * Y0Z1Y2Y3Z4Z5Z6Y7 + (0.0302001+0i) * X0Z1Z2Z4Z5X6 + (0.0302001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979+0i) * Y1X2X4Z5Z6Y7 + (0.0338979+0i) * Y1Y2Y4Z5Z6Y7 + (0.0102326+0i) * X1X2Y5Y6 + (-0.0102326+0i) * X1Y2Y5X6 + (-0.0102326+0i) * Y1X2X5Y6 + (0.0102326+0i) * Y1Y2X5X6 + (-0.0382825+0i) * Z1X3Z4X5 + (-0.0382825+0i) * Z1Y3Z4Y5 + (0.0355881+0i) * X1Z2Z4Z5Z6X7 + (0.0355881+0i) * Y1Z2Z4Z5Z6Y7 + (0.0184957+0i) * X1Z2X3X5Z6X7 + (-0.00516964+0i) * X1Z2X3Y5Z6Y7 + (0.0236653+0i) * X1Z2Y3Y5Z6X7 + (0.0236653+0i) * Y1Z2X3X5Z6Y7 + (-0.00516964+0i) * Y1Z2Y3X5Z6X7 + (0.0184957+0i) * Y1Z2Y3Y5Z6Y7 + (-0.0154022+0i) * X1Z2X3X4Z5X6 + (-0.0154022+0i) * X1Z2X3Y4Z5Y6 + (-0.0154022+0i) * Y1Z2Y3X4Z5X6 + (-0.0154022+0i) * Y1Z2Y3Y4Z5Y6 + (0.0379243+0i) * X1Z2Z3Z5Z6X7 + (0.0379243+0i) * Y1Z2Z3Z5Z6Y7 + (-0.00600788+0i) * X1Z2Z3X4Y5Y6 + (0.00600788+0i) * X1Z2Z3Y4Y5X6 + (0.00600788+0i) * Y1Z2Z3X4X5Y6 + (-0.00600788+0i) * Y1Z2Z3Y4X5X6 + (0.0439322+0i) * X1Z2Z3Z4Z6X7 + (0.0439322+0i) * Y1Z2Z3Z4Z6Y7 + (0.0445998+0i) * X1Z2Z3Z4Z5X7 + (0.0445998+0i) * Y1Z2Z3Z4Z5Y7 + (-0.0327198+0i) * Z2X3Z4X5 + (-0.0327198+0i) * Z2Y3Z4Y5 + (-0.0327198+0i) * X2X4 + (-0.0327198+0i) * Y2Y4 + (-0.0435622+0i) * X2X3Y4Y5 + (0.0435622+0i) * X2Y3Y4X5 + (0.0435622+0i) * Y2X3X4Y5 + (-0.0435622+0i) * Y2Y3X4X5 + (-0.0112912+0i) * X2X3Y6Y7 + (0.0112912+0i) * X2Y3Y6X7 + (0.0112912+0i) * Y2X3X6Y7 + (-0.0112912+0i) * Y2Y3X6X7 + (-0.0425308+0i) * X2Z3X4Z5 + (-0.0425308+0i) * Y2Z3Y4Z5 + (0.00684156+0i) * X2Z3Z4X5Y6Y7 + (-0.00684156+0i) * X2Z3Z4Y5Y6X7 + (-0.00684156+0i) * Y2Z3Z4X5X6Y7 + (0.00684156+0i) * Y2Z3Z4Y5X6X7 + (-0.0395088+0i) * X2Z3X4Z6 + (-0.0395088+0i) * Y2Z3Y4Z6 + (-0.0326672+0i) * X2Z3X4Z7 + (-0.0326672+0i) * Y2Z3Y4Z7 + (-0.0425308+0i) * X3X5 + (-0.0425308+0i) * Y3Y5 + (0.00684156+0i) * X3X4X6X7 + (0.00684156+0i) * X3Y4Y6X7 + (0.00684156+0i) * Y3X4X6Y7 + (0.00684156+0i) * Y3Y4Y6Y7 + (-0.0326672+0i) * X3Z4X5Z6 + (-0.0326672+0i) * Y3Z4Y5Z6 + (-0.0395088+0i) * X3Z4X5Z7 + (-0.0395088+0i) * Y3Z4Y5Z7 + (-0.0187841+0i) * X4X5Y6Y7 + (0.0187841+0i) * X4Y5Y6X7 + (0.0187841+0i) * Y4X5X6Y7 + (-0.0187841+0i) * Y4Y5X6X7
[Cudaq] Number of terms in the Qubit hamiltonian:  185

(c) Generate the active space Hamiltonian computed from the CASSCF molecular orbitals

[9]:
H2O_mol = "qchem/H2O.xyz"

# Run HF, MP2, casscf and compute the active space spin molecular hamiltonian.
# Inspect and the active space from the natural orbitals. Natural orbitals are computed using MP2.
# The natural orbitals are used with casscf calaculations.
# The casscf  orbitals are used to compute the electron integrals.

molecular_data = get_mol_hamiltonian(xyz=H2O_mol, spin=0, charge=0, basis='631g', nele_cas=4, norb_cas=4,
                                     MP2=True, natorb=True, casscf=True, integrals_casscf=True, verbose=True)

# If do not want to use the natural orbitals to inspect active space, set natorb=False (default).
#molecular_data = get_mol_hamiltonian(xyz=H2O_mol, spin=0, charge=0, basis='631g', nele_cas=4, norb_cas=4,
#                                    casscf=True, integrals_casscf=True, verbose=True)

obi = molecular_data[0]
tbi = molecular_data[1]
ecore = molecular_data[2]
nelectrons = molecular_data[3]
norbitals = molecular_data[4]
fermionic_hamiltonian = molecular_data[5]
energies = molecular_data[6]

print('-------------------------------')
print('Molecular data')
print('-------------------------------')
print('Number of electrons in the active space: ', nelectrons)
print('Number of spatial orbitals in the active space: ', norbitals)
print('Number of spin molecular orbitals: ', 2 * norbitals)
print('Core energy: ', ecore)
#print('Fermionic hamiltonian: ', fermionic_hamiltonian)

print('-------------------------------')
print('Jordan-Wigner transformation')
print('-------------------------------')
# Compute the qubit hamiltonian.
spin_ham = jordan_wigner_fermion(obi, tbi, ecore)
print('[Cudaq] Qubit hamiltonian: ', spin_ham)
print('[Cudaq] Number of terms in the Qubit hamiltonian: ', spin_ham.term_count)
overwrite output file: qchem/H2O-pyscf.log
[pyscf] Total number of orbitals =  13
[pyscf] Total number of electrons =  10
[pyscf] HF energy =  -75.98397553727882
[pyscf] R-MP2 energy=  -76.1128067006503
[pyscf] Natural orbital occupation number from R-MP2:
[1.99995663e+00 1.99012740e+00 1.98197049e+00 1.97722983e+00
 1.97515174e+00 2.23585706e-02 2.09527832e-02 1.73621504e-02
 1.00838241e-02 2.32351484e-03 1.74875097e-03 4.27482714e-04
 3.06831462e-04]
[pyscf] R-CASSCF energy using natural orbitals=  -76.03702384069327
-------------------------------
Molecular data
-------------------------------
Number of electrons in the active space:  4
Number of spatial orbitals in the active space:  4
Number of spin molecular orbitals:  8
Core energy:  -69.14810818510908
-------------------------------
Jordan-Wigner transformation
-------------------------------
[Cudaq] Qubit hamiltonian:  (-73.4246+0i) + (0.286+0i) * Z0 + (0.286+0i) * Z1 + (0.232955+0i) * Z2 + (0.232955+0i) * Z3 + (-0.262533+0i) * Z4 + (-0.262533+0i) * Z5 + (-0.24543+0i) * Z6 + (-0.24543+0i) * Z7 + (0.181709+0i) * Z0Z1 + (-3.7135e-10+0i) * X0Z1X2 + (-3.7135e-10+0i) * Y0Z1Y2 + (0.135721+0i) * Z0Z2 + (0.158846+0i) * Z0Z3 + (-3.13622e-11+0i) * X0Z1Z2Z3X4 + (-3.13622e-11+0i) * Y0Z1Z2Z3Y4 + (0.147141+0i) * Z0Z4 + (0.159353+0i) * Z0Z5 + (0.00801359+0i) * X0Z1Z2Z3Z4Z5X6 + (0.00801359+0i) * Y0Z1Z2Z3Z4Z5Y6 + (0.130427+0i) * Z0Z6 + (0.173887+0i) * Z0Z7 + (0.158846+0i) * Z1Z2 + (-3.7135e-10+0i) * X1Z2X3 + (-3.7135e-10+0i) * Y1Z2Y3 + (0.135721+0i) * Z1Z3 + (0.159353+0i) * Z1Z4 + (-3.13622e-11+0i) * X1Z2Z3Z4X5 + (-3.13622e-11+0i) * Y1Z2Z3Z4Y5 + (0.147141+0i) * Z1Z5 + (0.173887+0i) * Z1Z6 + (0.00801359+0i) * X1Z2Z3Z4Z5Z6X7 + (0.00801359+0i) * Y1Z2Z3Z4Z5Z6Y7 + (0.130427+0i) * Z1Z7 + (0.163669+0i) * Z2Z3 + (-0.005669+0i) * X2Z3X4 + (-0.005669+0i) * Y2Z3Y4 + (0.119773+0i) * Z2Z4 + (0.163692+0i) * Z2Z5 + (-7.23282e-12+0i) * X2Z3Z4Z5X6 + (-7.23282e-12+0i) * Y2Z3Z4Z5Y6 + (0.139625+0i) * Z2Z6 + (0.155968+0i) * Z2Z7 + (0.163692+0i) * Z3Z4 + (-0.005669+0i) * X3Z4X5 + (-0.005669+0i) * Y3Z4Y5 + (0.119773+0i) * Z3Z5 + (0.155968+0i) * Z3Z6 + (-7.23282e-12+0i) * X3Z4Z5Z6X7 + (-7.23282e-12+0i) * Y3Z4Z5Z6Y7 + (0.139625+0i) * Z3Z7 + (0.173287+0i) * Z4Z5 + (1.25993e-10+0i) * X4Z5X6 + (1.25993e-10+0i) * Y4Z5Y6 + (0.133367+0i) * Z4Z6 + (0.16168+0i) * Z4Z7 + (0.16168+0i) * Z5Z6 + (1.25993e-10+0i) * X5Z6X7 + (1.25993e-10+0i) * Y5Z6Y7 + (0.133367+0i) * Z5Z7 + (0.176899+0i) * Z6Z7 + (-2.86907e-11+0i) * Z0X1Z2X3 + (-2.86907e-11+0i) * Z0Y1Z2Y3 + (9.78476e-12+0i) * Z0X1Z2Z3Z4X5 + (9.78476e-12+0i) * Z0Y1Z2Z3Z4Y5 + (-0.0405626+0i) * Z0X1Z2Z3Z4Z5Z6X7 + (-0.0405626+0i) * Z0Y1Z2Z3Z4Z5Z6Y7 + (-2.86907e-11+0i) * X0X2 + (-2.86907e-11+0i) * Y0Y2 + (9.78476e-12+0i) * X0Z2Z3X4 + (9.78476e-12+0i) * Y0Z2Z3Y4 + (-0.0405626+0i) * X0Z2Z3Z4Z5X6 + (-0.0405626+0i) * Y0Z2Z3Z4Z5Y6 + (-0.0231244+0i) * X0X1Y2Y3 + (0.0231244+0i) * X0Y1Y2X3 + (0.0231244+0i) * Y0X1X2Y3 + (-0.0231244+0i) * Y0Y1X2X3 + (-0.00729609+0i) * X0X1Y2Z3Z4Y5 + (0.00729609+0i) * X0Y1Y2Z3Z4X5 + (0.00729609+0i) * Y0X1X2Z3Z4Y5 + (-0.00729609+0i) * Y0Y1X2Z3Z4X5 + (-0.00729609+0i) * X0X1X3X4 + (-0.00729609+0i) * X0Y1Y3X4 + (-0.00729609+0i) * Y0X1X3Y4 + (-0.00729609+0i) * Y0Y1Y3Y4 + (-0.0122114+0i) * X0X1Y4Y5 + (0.0122114+0i) * X0Y1Y4X5 + (0.0122114+0i) * Y0X1X4Y5 + (-0.0122114+0i) * Y0Y1X4X5 + (6.39823e-12+0i) * X0X1Y4Z5Z6Y7 + (-6.39823e-12+0i) * X0Y1Y4Z5Z6X7 + (-6.39823e-12+0i) * Y0X1X4Z5Z6Y7 + (6.39823e-12+0i) * Y0Y1X4Z5Z6X7 + (6.39823e-12+0i) * X0X1X5X6 + (6.39823e-12+0i) * X0Y1Y5X6 + (6.39823e-12+0i) * Y0X1X5Y6 + (6.39823e-12+0i) * Y0Y1Y5Y6 + (-0.0434604+0i) * X0X1Y6Y7 + (0.0434604+0i) * X0Y1Y6X7 + (0.0434604+0i) * Y0X1X6Y7 + (-0.0434604+0i) * Y0Y1X6X7 + (0.0337551+0i) * Z0X2Z3X4 + (0.0337551+0i) * Z0Y2Z3Y4 + (-6.08535e-12+0i) * Z0X2Z3Z4Z5X6 + (-6.08535e-12+0i) * Z0Y2Z3Z4Z5Y6 + (-0.0362638+0i) * X0Z1Z3Z4Z5X6 + (-0.0362638+0i) * Y0Z1Z3Z4Z5Y6 + (0.0108497+0i) * X0Z1X2X4Z5X6 + (-0.00966188+0i) * X0Z1X2Y4Z5Y6 + (0.0205116+0i) * X0Z1Y2Y4Z5X6 + (0.0205116+0i) * Y0Z1X2X4Z5Y6 + (-0.00966188+0i) * Y0Z1Y2X4Z5X6 + (0.0108497+0i) * Y0Z1Y2Y4Z5Y6 + (0.026459+0i) * Z0X3Z4X5 + (0.026459+0i) * Z0Y3Z4Y5 + (-5.18267e-12+0i) * Z0X3Z4Z5Z6X7 + (-5.18267e-12+0i) * Z0Y3Z4Z5Z6Y7 + (-5.82122e-11+0i) * X0Z1X2Z3 + (-5.82122e-11+0i) * Y0Z1Y2Z3 + (1.42428e-12+0i) * X0Z1X2X3Z4X5 + (1.42428e-12+0i) * X0Z1X2Y3Z4Y5 + (1.42428e-12+0i) * Y0Z1Y2X3Z4X5 + (1.42428e-12+0i) * Y0Z1Y2Y3Z4Y5 + (-0.0092937+0i) * X0Z1X2X3Z4Z5Z6X7 + (-0.0092937+0i) * X0Z1X2Y3Z4Z5Z6Y7 + (-0.0092937+0i) * Y0Z1Y2X3Z4Z5Z6X7 + (-0.0092937+0i) * Y0Z1Y2Y3Z4Z5Z6Y7 + (-0.0269701+0i) * X0Z1Z2Z4Z5X6 + (-0.0269701+0i) * Y0Z1Z2Z4Z5Y6 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* X1Y2Y4X5 + (-5.07403e-12+0i) * Y1X2X4Y5 + (-5.07403e-12+0i) * Y1Y2Y4Y5 + (0.0342907+0i) * X1X2X4Z5Z6X7 + (0.0342907+0i) * X1Y2Y4Z5Z6X7 + (0.0342907+0i) * Y1X2X4Z5Z6Y7 + (0.0342907+0i) * Y1Y2Y4Z5Z6Y7 + (0.0137791+0i) * X1X2Y5Y6 + (-0.0137791+0i) * X1Y2Y5X6 + (-0.0137791+0i) * Y1X2X5Y6 + (0.0137791+0i) * Y1Y2X5X6 + (-8.71301e-12+0i) * X1X2X6X7 + (-8.71301e-12+0i) * X1Y2Y6X7 + (-8.71301e-12+0i) * Y1X2X6Y7 + (-8.71301e-12+0i) * Y1Y2Y6Y7 + (0.0337551+0i) * Z1X3Z4X5 + (0.0337551+0i) * Z1Y3Z4Y5 + (-6.08535e-12+0i) * Z1X3Z4Z5Z6X7 + (-6.08535e-12+0i) * Z1Y3Z4Z5Z6Y7 + (-0.0362638+0i) * X1Z2Z4Z5Z6X7 + (-0.0362638+0i) * Y1Z2Z4Z5Z6Y7 + (0.0108497+0i) * X1Z2X3X5Z6X7 + (-0.00966188+0i) * X1Z2X3Y5Z6Y7 + (0.0205116+0i) * X1Z2Y3Y5Z6X7 + (0.0205116+0i) * Y1Z2X3X5Z6Y7 + (-0.00966188+0i) * Y1Z2Y3X5Z6X7 + (0.0108497+0i) * Y1Z2Y3Y5Z6Y7 + (-6.9337e-12+0i) * Z1X4Z5X6 + (-6.9337e-12+0i) * Z1Y4Z5Y6 + (-0.023441+0i) * X1Z2X3X4Z5X6 + (-0.023441+0i) * X1Z2X3Y4Z5Y6 + (-0.023441+0i) * Y1Z2Y3X4Z5X6 + (-0.023441+0i) * Y1Z2Y3Y4Z5Y6 + (1.16495e-11+0i) * X1Z2Z3X5 + (1.16495e-11+0i) * Y1Z2Z3Y5 + (-0.0301078+0i) * X1Z2Z3Z5Z6X7 + (-0.0301078+0i) * Y1Z2Z3Z5Z6Y7 + (0.010417+0i) * X1Z2Z3X4Y5Y6 + (-0.010417+0i) * X1Z2Z3Y4Y5X6 + (-0.010417+0i) * Y1Z2Z3X4X5Y6 + (0.010417+0i) * Y1Z2Z3Y4X5X6 + (-9.07003e-12+0i) * X1Z2Z3X4X6X7 + (-9.07003e-12+0i) * X1Z2Z3Y4Y6X7 + (-9.07003e-12+0i) * Y1Z2Z3X4X6Y7 + (-9.07003e-12+0i) * Y1Z2Z3Y4Y6Y7 + (-1.33319e-11+0i) * Z1X5Z6X7 + (-1.33319e-11+0i) * Z1Y5Z6Y7 + (4.32968e-12+0i) * X1Z2X3Z5 + (4.32968e-12+0i) * Y1Z2Y3Z5 + (-0.0405248+0i) * X1Z2Z3Z4Z6X7 + (-0.0405248+0i) * Y1Z2Z3Z4Z6Y7 + (-2.56152e-11+0i) * X1Z2X3Z6 + (-2.56152e-11+0i) * Y1Z2Y3Z6 + (8.21296e-12+0i) * X1Z2Z3Z4X5Z6 + (8.21296e-12+0i) * Y1Z2Z3Z4Y5Z6 + (-0.0379837+0i) * X1Z2Z3Z4Z5X7 + (-0.0379837+0i) * Y1Z2Z3Z4Z5Y7 + (-1.69022e-11+0i) * X1Z2X3Z7 + (-1.69022e-11+0i) * Y1Z2Y3Z7 + (1.7283e-11+0i) * X1Z2Z3Z4X5Z7 + (1.7283e-11+0i) * Y1Z2Z3Z4Y5Z7 + (0.0306081+0i) * Z2X3Z4X5 + (0.0306081+0i) * Z2Y3Z4Y5 + (1.03373e-11+0i) * Z2X3Z4Z5Z6X7 + (1.03373e-11+0i) * Z2Y3Z4Z5Z6Y7 + (0.0306081+0i) * X2X4 + (0.0306081+0i) * Y2Y4 + (1.03373e-11+0i) * X2Z4Z5X6 + (1.03373e-11+0i) * Y2Z4Z5Y6 + (-0.043919+0i) * X2X3Y4Y5 + (0.043919+0i) * X2Y3Y4X5 + (0.043919+0i) * Y2X3X4Y5 + (-0.043919+0i) * Y2Y3X4X5 + (-0.0163427+0i) * X2X3Y6Y7 + (0.0163427+0i) * X2Y3Y6X7 + (0.0163427+0i) * Y2X3X6Y7 + (-0.0163427+0i) * Y2Y3X6X7 + (3.24115e-11+0i) * Z2X4Z5X6 + (3.24115e-11+0i) * Z2Y4Z5Y6 + (8.06134e-12+0i) * X2Z3Z5X6 + (8.06134e-12+0i) * Y2Z3Z5Y6 + (3.1488e-11+0i) * Z2X5Z6X7 + (3.1488e-11+0i) * Z2Y5Z6Y7 + (0.0360254+0i) * X2Z3X4Z5 + (0.0360254+0i) * Y2Z3Y4Z5 + (4.35124e-12+0i) * X2Z3X4X5Z6X7 + (4.35124e-12+0i) * X2Z3X4Y5Z6Y7 + (4.35124e-12+0i) * Y2Z3Y4X5Z6X7 + (4.35124e-12+0i) * Y2Z3Y4Y5Z6Y7 + (3.71009e-12+0i) * X2Z3Z4X6 + (3.71009e-12+0i) * Y2Z3Z4Y6 + (-0.013094+0i) * X2Z3Z4X5Y6Y7 + (0.013094+0i) * X2Z3Z4Y5Y6X7 + (0.013094+0i) * Y2Z3Z4X5X6Y7 + (-0.013094+0i) * Y2Z3Z4Y5X6X7 + (0.0358977+0i) * X2Z3X4Z6 + (0.0358977+0i) * Y2Z3Y4Z6 + (0.0228038+0i) * X2Z3X4Z7 + (0.0228038+0i) * Y2Z3Y4Z7 + (-8.74286e-12+0i) * X2Z3Z4Z5X6Z7 + (-8.74286e-12+0i) * Y2Z3Z4Z5Y6Z7 + (3.1488e-11+0i) * Z3X4Z5X6 + (3.1488e-11+0i) * Z3Y4Z5Y6 + (0.0360254+0i) * X3X5 + (0.0360254+0i) * Y3Y5 + (3.71009e-12+0i) * X3Z5Z6X7 + (3.71009e-12+0i) * Y3Z5Z6Y7 + (-4.35124e-12+0i) * X3X4Y5Y6 + (4.35124e-12+0i) * X3Y4Y5X6 + (4.35124e-12+0i) * Y3X4X5Y6 + (-4.35124e-12+0i) * Y3Y4X5X6 + (-0.013094+0i) * X3X4X6X7 + (-0.013094+0i) * X3Y4Y6X7 + (-0.013094+0i) * Y3X4X6Y7 + (-0.013094+0i) * Y3Y4Y6Y7 + (3.24115e-11+0i) * Z3X5Z6X7 + (3.24115e-11+0i) * Z3Y5Z6Y7 + (8.06134e-12+0i) * X3Z4Z6X7 + (8.06134e-12+0i) * Y3Z4Z6Y7 + (0.0228038+0i) * X3Z4X5Z6 + (0.0228038+0i) * Y3Z4Y5Z6 + (-8.74286e-12+0i) * X3Z4Z5X7 + (-8.74286e-12+0i) * Y3Z4Z5Y7 + (0.0358977+0i) * X3Z4X5Z7 + (0.0358977+0i) * Y3Z4Y5Z7 + (-1.71946e-11+0i) * Z4X5Z6X7 + (-1.71946e-11+0i) * Z4Y5Z6Y7 + (-1.71946e-11+0i) * X4X6 + (-1.71946e-11+0i) * Y4Y6 + (-0.0283132+0i) * X4X5Y6Y7 + (0.0283132+0i) * X4Y5Y6X7 + (0.0283132+0i) * Y4X5X6Y7 + (-0.0283132+0i) * Y4Y5X6X7 + (-1.29035e-11+0i) * X4Z5X6Z7 + (-1.29035e-11+0i) * Y4Z5Y6Z7 + (-1.29035e-11+0i) * X5X7 + (-1.29035e-11+0i) * Y5Y7
[Cudaq] Number of terms in the Qubit hamiltonian:  333

(d) Generate the electronic Hamiltonian using ROHF

[10]:
geomerty = 'N 0.0 0.0 0.56; N 0.0 0.0 -0.56'
molecular_data = get_mol_hamiltonian(xyz= geomerty, spin=1, charge=1, basis='631g', nele_cas=5, norb_cas=6, ccsd=True, casci = True, verbose=True)

obi = molecular_data[0]
tbi = molecular_data[1]
ecore = molecular_data[2]
nelectrons = molecular_data[3]
norbitals = molecular_data[4]
fermionic_hamiltonian = molecular_data[5]
energies = molecular_data[6]

print('-------------------------------')
print('Molecular data')
print('-------------------------------')
print('Number of electrons in the active space: ', nelectrons)
print('Number of spatial orbitals in the active space: ', norbitals)
print('Number of spin molecular orbitals: ', 2 * norbitals)
print('Core energy: ', ecore)

# Compute the qubit hamiltonian.
spin_ham = jordan_wigner_fermion(obi, tbi, ecore)
print('[Cudaq] Qubit hamiltonian: ', spin_ham)
print('[Cudaq] Number of terms in the Qubit hamiltonian: ', spin_ham.term_count)
output file: N 0-pyscf.log
[pyscf] Total number of orbitals =  18
[pyscf] Total number of electrons =  13
[pyscf] HF energy =  -108.28029717676162
[pyscf] R-CASCI energy using molecular orbitals=  -108.37916901674117
WARN: RCCSD method does not support ROHF method. ROHF object is converted to UHF object and UCCSD method is called.
[pyscf] R-CCSD energy of the active space using molecular orbitals=  -108.37763087821688
-------------------------------
Molecular data
-------------------------------
Number of electrons in the active space:  5
Number of spatial orbitals in the active space:  6
Number of spin molecular orbitals:  12
Core energy:  -97.73731859734104
[Cudaq] Qubit hamiltonian:  (-106.644+0i) + (0.261983+0i) * Z0 + (0.261983+0i) * Z1 + (0.261983+0i) * Z2 + (0.261983+0i) * Z3 + (0.237545+0i) * Z4 + (0.237545+0i) * Z5 + (0.0601943+0i) * Z6 + (0.0601943+0i) * Z7 + (0.0601943+0i) * Z8 + (0.0601943+0i) * Z9 + (-0.199869+0i) * Z10 + (-0.199869+0i) * Z11 + (0.144151+0i) * Z0Z1 + (0.127483+0i) * Z0Z2 + (0.133039+0i) * Z0Z3 + (0.123982+0i) * Z0Z4 + (0.131017+0i) * Z0Z5 + (0.100836+0i) * Z0Z6 + (0.132356+0i) * Z0Z7 + (0.112894+0i) * Z0Z8 + (0.12824+0i) * Z0Z9 + (0.0907631+0i) * Z0Z10 + (0.0949805+0i) * Z0Z11 + (0.133039+0i) * Z1Z2 + (0.127483+0i) * Z1Z3 + (0.131017+0i) * Z1Z4 + (0.123982+0i) * Z1Z5 + (0.132356+0i) * Z1Z6 + (0.100836+0i) * Z1Z7 + (0.12824+0i) * Z1Z8 + (0.112894+0i) * Z1Z9 + (0.0949805+0i) * Z1Z10 + (0.0907631+0i) * Z1Z11 + (0.144151+0i) * Z2Z3 + (0.123982+0i) * Z2Z4 + (0.131017+0i) * Z2Z5 + (0.112894+0i) * Z2Z6 + (0.12824+0i) * Z2Z7 + (0.100836+0i) * Z2Z8 + (0.132356+0i) * Z2Z9 + (0.0907631+0i) * Z2Z10 + (0.0949805+0i) * Z2Z11 + (0.131017+0i) * Z3Z4 + (0.123982+0i) * Z3Z5 + (0.12824+0i) * Z3Z6 + (0.112894+0i) * Z3Z7 + (0.132356+0i) * Z3Z8 + (0.100836+0i) * Z3Z9 + (0.0949805+0i) * Z3Z10 + (0.0907631+0i) * Z3Z11 + (0.148494+0i) * Z4Z5 + (0.119366+0i) * Z4Z6 + (0.128149+0i) * Z4Z7 + (0.119366+0i) * Z4Z8 + (0.128149+0i) * Z4Z9 + (0.0924767+0i) * Z4Z10 + (0.0997354+0i) * Z4Z11 + (0.128149+0i) * Z5Z6 + (0.119366+0i) * Z5Z7 + (0.128149+0i) * Z5Z8 + (0.119366+0i) * Z5Z9 + (0.0997354+0i) * Z5Z10 + (0.0924767+0i) * Z5Z11 + (0.130646+0i) * Z6Z7 + (0.115745+0i) * Z6Z8 + (0.120712+0i) * Z6Z9 + (0.0880899+0i) * Z6Z10 + (0.0932951+0i) * Z6Z11 + (0.120712+0i) * Z7Z8 + (0.115745+0i) * Z7Z9 + (0.0932951+0i) * Z7Z10 + (0.0880899+0i) * Z7Z11 + (0.130646+0i) * Z8Z9 + (0.0880899+0i) * Z8Z10 + (0.0932951+0i) * Z8Z11 + (0.0932951+0i) * Z9Z10 + (0.0880899+0i) * Z9Z11 + (0.0905739+0i) * Z10Z11 + (-0.00555603+0i) * X0X1Y2Y3 + (0.00555603+0i) * X0Y1Y2X3 + (0.00555603+0i) * Y0X1X2Y3 + (-0.00555603+0i) * Y0Y1X2X3 + (-0.00703472+0i) * X0X1Y4Y5 + (0.00703472+0i) * X0Y1Y4X5 + (0.00703472+0i) * Y0X1X4Y5 + (-0.00703472+0i) * Y0Y1X4X5 + (-0.0315196+0i) * X0X1Y6Y7 + (0.0315196+0i) * X0Y1Y6X7 + (0.0315196+0i) * Y0X1X6Y7 + (-0.0315196+0i) * Y0Y1X6X7 + (-0.0175786+0i) * X0X1Y6Z7Z8Y9 + (0.0175786+0i) * X0Y1Y6Z7Z8X9 + (0.0175786+0i) * Y0X1X6Z7Z8Y9 + (-0.0175786+0i) * Y0Y1X6Z7Z8X9 + (-0.0175786+0i) * X0X1X7X8 + (-0.0175786+0i) * X0Y1Y7X8 + (-0.0175786+0i) * Y0X1X7Y8 + (-0.0175786+0i) * Y0Y1Y7Y8 + (-0.0153463+0i) * X0X1Y8Y9 + (0.0153463+0i) * X0Y1Y8X9 + (0.0153463+0i) * Y0X1X8Y9 + (-0.0153463+0i) * Y0Y1X8X9 + (-0.00421737+0i) * X0X1Y10Y11 + (0.00421737+0i) * X0Y1Y10X11 + (0.00421737+0i) * Y0X1X10Y11 + (-0.00421737+0i) * Y0Y1X10X11 + (-0.00923737+0i) * X0Z1X2X6Z7X8 + (0.0212944+0i) * X0Z1X2Y6Z7Y8 + (-0.0305318+0i) * X0Z1Y2Y6Z7X8 + (-0.0305318+0i) * Y0Z1X2X6Z7Y8 + (0.0212944+0i) * Y0Z1Y2X6Z7X8 + (-0.00923737+0i) * Y0Z1Y2Y6Z7Y8 + (-0.0175786+0i) * X0Z1Z2X3Y6Y7 + (0.0175786+0i) * X0Z1Z2Y3Y6X7 + (0.0175786+0i) * Y0Z1Z2X3X6Y7 + (-0.0175786+0i) * Y0Z1Z2Y3X6X7 + (0.0233525+0i) * X0Z1Z2X3Y6Z7Z8Y9 + (-0.0233525+0i) * X0Z1Z2Y3Y6Z7Z8X9 + (-0.0233525+0i) * Y0Z1Z2X3X6Z7Z8Y9 + (0.0233525+0i) * Y0Z1Z2Y3X6Z7Z8X9 + (-0.00717925+0i) * X0Z1Z2X3X7X8 + (-0.00717925+0i) * X0Z1Z2Y3Y7X8 + (-0.00717925+0i) * Y0Z1Z2X3X7Y8 + (-0.00717925+0i) * Y0Z1Z2Y3Y7Y8 + (0.0175786+0i) * X0Z1Z2X3Y8Y9 + (-0.0175786+0i) * X0Z1Z2Y3Y8X9 + (-0.0175786+0i) * Y0Z1Z2X3X8Y9 + (0.0175786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X5X9X10 + (0.00109472+0i) * X0Z1Z2Z3Z4Y5Y9X10 + (0.00109472+0i) * Y0Z1Z2Z3Z4X5X9Y10 + (0.00109472+0i) * Y0Z1Z2Z3Z4Y5Y9Y10 + (0.0131047+0i) * Z0X6Z7X8 + (0.0131047+0i) * Z0Y6Z7Y8 + (0.0131047+0i) * X0Z1X2Z6 + (0.0131047+0i) * Y0Z1Y2Z6 + (-0.00447389+0i) * Z0X7Z8X9 + (-0.00447389+0i) * Z0Y7Z8Y9 + (-0.00447389+0i) * X0Z1X2Z7 + (-0.00447389+0i) * Y0Z1Y2Z7 + (-0.00205812+0i) * X0Z1X2X7Z8X9 + (-0.00205812+0i) * X0Z1X2Y7Z8Y9 + (-0.00205812+0i) * Y0Z1Y2X7Z8X9 + (-0.00205812+0i) * Y0Z1Y2Y7Z8Y9 + (-0.00104446+0i) * X0Z1Z2Z3X4X7Z8Z9Z10X11 + (-0.00104446+0i) * X0Z1Z2Z3X4Y7Z8Z9Z10Y11 + (-0.00104446+0i) * Y0Z1Z2Z3Y4X7Z8Z9Z10X11 + (-0.00104446+0i) * Y0Z1Z2Z3Y4Y7Z8Z9Z10Y11 + (-0.0131047+0i) * X0Z1X2Z8 + (-0.0131047+0i) * Y0Z1Y2Z8 + (0.00447389+0i) * X0Z1X2Z9 + (0.00447389+0i) * Y0Z1Y2Z9 + (-0.000669197+0i) * X0Z1Z2Z3X4X9Z10X11 + (-0.000669197+0i) * X0Z1Z2Z3X4Y9Z10Y11 + (-0.000669197+0i) * Y0Z1Z2Z3Y4X9Z10X11 + (-0.000669197+0i) * Y0Z1Z2Z3Y4Y9Z10Y11 + (-0.0175786+0i) * X1X2X6X7 + (-0.0175786+0i) * X1Y2Y6X7 + (-0.0175786+0i) * Y1X2X6Y7 + (-0.0175786+0i) * Y1Y2Y6Y7 + (-0.00717925+0i) * X1X2X6Z7Z8X9 + (-0.00717925+0i) * X1Y2Y6Z7Z8X9 + (-0.00717925+0i) * Y1X2X6Z7Z8Y9 + (-0.00717925+0i) * Y1Y2Y6Z7Z8Y9 + (0.0233525+0i) * X1X2Y7Y8 + (-0.0233525+0i) * X1Y2Y7X8 + (-0.0233525+0i) * Y1X2X7Y8 + (0.0233525+0i) * Y1Y2X7X8 + (0.0175786+0i) * X1X2X8X9 + (0.0175786+0i) * X1Y2Y8X9 + (0.0175786+0i) * Y1X2X8Y9 + (0.0175786+0i) * Y1Y2Y8Y9 + (-0.00923737+0i) * X1Z2X3X7Z8X9 + (0.0212944+0i) * X1Z2X3Y7Z8Y9 + (-0.0305318+0i) * X1Z2Y3Y7Z8X9 + (-0.0305318+0i) * Y1Z2X3X7Z8Y9 + (0.0212944+0i) * Y1Z2Y3X7Z8X9 + (-0.00923737+0i) * Y1Z2Y3Y7Z8Y9 + (0.00170861+0i) * X1Z2Z3X4X6Z7Z8Z9Z10X11 + (0.00170861+0i) * X1Z2Z3Y4Y6Z7Z8Z9Z10X11 + (0.00170861+0i) * Y1Z2Z3X4X6Z7Z8Z9Z10Y11 + (0.00170861+0i) * Y1Z2Z3Y4Y6Z7Z8Z9Z10Y11 + (-0.006681+0i) * X1Z2Z3X4Y7Z8Z9Y10 + (0.006681+0i) * X1Z2Z3Y4Y7Z8Z9X10 + (0.006681+0i) * Y1Z2Z3X4X7Z8Z9Y10 + (-0.006681+0i) * Y1Z2Z3Y4X7Z8Z9X10 + (0.00109472+0i) * X1Z2Z3X4X8Z9Z10X11 + (0.00109472+0i) * X1Z2Z3Y4Y8Z9Z10X11 + (0.00109472+0i) * Y1Z2Z3X4X8Z9Z10Y11 + (0.00109472+0i) * Y1Z2Z3Y4Y8Z9Z10Y11 + (-0.00428059+0i) * X1Z2Z3X4Y9Y10 + (0.00428059+0i) * X1Z2Z3Y4Y9X10 + (0.00428059+0i) * Y1Z2Z3X4X9Y10 + (-0.00428059+0i) * Y1Z2Z3Y4X9X10 + (0.000664146+0i) * X1Z2Z3Z4X5X7Z8Z9Z10X11 + (-0.00772546+0i) * X1Z2Z3Z4X5Y7Z8Z9Z10Y11 + (0.00838961+0i) * X1Z2Z3Z4Y5Y7Z8Z9Z10X11 + (0.00838961+0i) * Y1Z2Z3Z4X5X7Z8Z9Z10Y11 + (-0.00772546+0i) * Y1Z2Z3Z4Y5X7Z8Z9Z10X11 + (0.000664146+0i) * Y1Z2Z3Z4Y5Y7Z8Z9Z10Y11 + (0.000425525+0i) * X1Z2Z3Z4X5X9Z10X11 + (-0.00494978+0i) * X1Z2Z3Z4X5Y9Z10Y11 + (0.00537531+0i) * X1Z2Z3Z4Y5Y9Z10X11 + (0.00537531+0i) * Y1Z2Z3Z4X5X9Z10Y11 + (-0.00494978+0i) * Y1Z2Z3Z4Y5X9Z10X11 + (0.000425525+0i) * Y1Z2Z3Z4Y5Y9Z10Y11 + (-0.00447389+0i) * Z1X6Z7X8 + (-0.00447389+0i) * Z1Y6Z7Y8 + (-0.00447389+0i) * X1Z2X3Z6 + (-0.00447389+0i) * Y1Z2Y3Z6 + (-0.00205812+0i) * X1Z2X3X6Z7X8 + (-0.00205812+0i) * X1Z2X3Y6Z7Y8 + (-0.00205812+0i) * Y1Z2Y3X6Z7X8 + (-0.00205812+0i) * Y1Z2Y3Y6Z7Y8 + (-0.00104446+0i) * X1Z2Z3Z4X5X6Z7Z8Z9X10 + (-0.00104446+0i) * X1Z2Z3Z4X5Y6Z7Z8Z9Y10 + (-0.00104446+0i) * Y1Z2Z3Z4Y5X6Z7Z8Z9X10 + (-0.00104446+0i) * Y1Z2Z3Z4Y5Y6Z7Z8Z9Y10 + (0.0131047+0i) * Z1X7Z8X9 + (0.0131047+0i) * Z1Y7Z8Y9 + (0.0131047+0i) * X1Z2X3Z7 + (0.0131047+0i) * Y1Z2Y3Z7 + (0.00447389+0i) * X1Z2X3Z8 + (0.00447389+0i) * Y1Z2Y3Z8 + (-0.000669197+0i) * X1Z2Z3Z4X5X8Z9X10 + (-0.000669197+0i) * X1Z2Z3Z4X5Y8Z9Y10 + (-0.000669197+0i) * Y1Z2Z3Z4Y5X8Z9X10 + (-0.000669197+0i) * Y1Z2Z3Z4Y5Y8Z9Y10 + (-0.0131047+0i) * X1Z2X3Z9 + (-0.0131047+0i) * Y1Z2Y3Z9 + (-0.00703472+0i) * X2X3Y4Y5 + (0.00703472+0i) * X2Y3Y4X5 + (0.00703472+0i) * Y2X3X4Y5 + (-0.00703472+0i) * Y2Y3X4X5 + (-0.0153463+0i) * X2X3Y6Y7 + (0.0153463+0i) * X2Y3Y6X7 + (0.0153463+0i) * Y2X3X6Y7 + (-0.0153463+0i) * Y2Y3X6X7 + (0.0175786+0i) * X2X3Y6Z7Z8Y9 + (-0.0175786+0i) * X2Y3Y6Z7Z8X9 + (-0.0175786+0i) * Y2X3X6Z7Z8Y9 + (0.0175786+0i) * Y2Y3X6Z7Z8X9 + (0.0175786+0i) * X2X3X7X8 + (0.0175786+0i) * X2Y3Y7X8 + (0.0175786+0i) * Y2X3X7Y8 + (0.0175786+0i) * Y2Y3Y7Y8 + (-0.0315196+0i) * X2X3Y8Y9 + (0.0315196+0i) * X2Y3Y8X9 + (0.0315196+0i) * Y2X3X8Y9 + (-0.0315196+0i) * Y2Y3X8X9 + (-0.00421737+0i) * X2X3Y10Y11 + (0.00421737+0i) * X2Y3Y10X11 + (0.00421737+0i) * Y2X3X10Y11 + (-0.00421737+0i) * Y2Y3X10X11 + (0.000425525+0i) * X2Z3X4X6Z7Z8Z9X10 + (-0.00494978+0i) * X2Z3X4Y6Z7Z8Z9Y10 + (0.00537531+0i) * X2Z3Y4Y6Z7Z8Z9X10 + (0.00537531+0i) * Y2Z3X4X6Z7Z8Z9Y10 + (-0.00494978+0i) * Y2Z3Y4X6Z7Z8Z9X10 + (0.000425525+0i) * Y2Z3Y4Y6Z7Z8Z9Y10 + (-0.000664146+0i) * X2Z3X4X8Z9X10 + (0.00772546+0i) * X2Z3X4Y8Z9Y10 + (-0.00838961+0i) * X2Z3Y4Y8Z9X10 + (-0.00838961+0i) * Y2Z3X4X8Z9Y10 + (0.00772546+0i) * Y2Z3Y4X8Z9X10 + (-0.000664146+0i) * Y2Z3Y4Y8Z9Y10 + (-0.00428059+0i) * X2Z3Z4X5Y6Z7Z8Z9Z10Y11 + (0.00428059+0i) * X2Z3Z4Y5Y6Z7Z8Z9Z10X11 + (0.00428059+0i) * Y2Z3Z4X5X6Z7Z8Z9Z10Y11 + (-0.00428059+0i) * Y2Z3Z4Y5X6Z7Z8Z9Z10X11 + (0.00109472+0i) * X2Z3Z4X5X7Z8Z9X10 + (0.00109472+0i) * X2Z3Z4Y5Y7Z8Z9X10 + (0.00109472+0i) * Y2Z3Z4X5X7Z8Z9Y10 + (0.00109472+0i) * Y2Z3Z4Y5Y7Z8Z9Y10 + (0.006681+0i) * X2Z3Z4X5Y8Z9Z10Y11 + (-0.006681+0i) * X2Z3Z4Y5Y8Z9Z10X11 + (-0.006681+0i) * Y2Z3Z4X5X8Z9Z10Y11 + (0.006681+0i) * Y2Z3Z4Y5X8Z9Z10X11 + (-0.00170861+0i) * X2Z3Z4X5X9X10 + (-0.00170861+0i) * X2Z3Z4Y5Y9X10 + (-0.00170861+0i) * Y2Z3Z4X5X9Y10 + (-0.00170861+0i) * Y2Z3Z4Y5Y9Y10 + (-0.0131047+0i) * Z2X6Z7X8 + (-0.0131047+0i) * Z2Y6Z7Y8 + (0.00447389+0i) * Z2X7Z8X9 + (0.00447389+0i) * Z2Y7Z8Y9 + (-0.000669197+0i) * X2Z3X4X7Z8Z9Z10X11 + (-0.000669197+0i) * X2Z3X4Y7Z8Z9Z10Y11 + (-0.000669197+0i) * Y2Z3Y4X7Z8Z9Z10X11 + (-0.000669197+0i) * Y2Z3Y4Y7Z8Z9Z10Y11 + (0.00104446+0i) * X2Z3X4X9Z10X11 + (0.00104446+0i) * X2Z3X4Y9Z10Y11 + (0.00104446+0i) * Y2Z3Y4X9Z10X11 + (0.00104446+0i) * Y2Z3Y4Y9Z10Y11 + (0.00109472+0i) * X3X4X6Z7Z8Z9Z10X11 + (0.00109472+0i) * X3Y4Y6Z7Z8Z9Z10X11 + (0.00109472+0i) * Y3X4X6Z7Z8Z9Z10Y11 + (0.00109472+0i) * Y3Y4Y6Z7Z8Z9Z10Y11 + (-0.00428059+0i) * X3X4Y7Z8Z9Y10 + (0.00428059+0i) * X3Y4Y7Z8Z9X10 + (0.00428059+0i) * Y3X4X7Z8Z9Y10 + (-0.00428059+0i) * Y3Y4X7Z8Z9X10 + (-0.00170861+0i) * X3X4X8Z9Z10X11 + (-0.00170861+0i) * X3Y4Y8Z9Z10X11 + (-0.00170861+0i) * Y3X4X8Z9Z10Y11 + (-0.00170861+0i) * Y3Y4Y8Z9Z10Y11 + (0.006681+0i) * X3X4Y9Y10 + (-0.006681+0i) * X3Y4Y9X10 + (-0.006681+0i) * Y3X4X9Y10 + (0.006681+0i) * Y3Y4X9X10 + (0.000425525+0i) * X3Z4X5X7Z8Z9Z10X11 + (-0.00494978+0i) * X3Z4X5Y7Z8Z9Z10Y11 + (0.00537531+0i) * X3Z4Y5Y7Z8Z9Z10X11 + (0.00537531+0i) * Y3Z4X5X7Z8Z9Z10Y11 + (-0.00494978+0i) * Y3Z4Y5X7Z8Z9Z10X11 + (0.000425525+0i) * Y3Z4Y5Y7Z8Z9Z10Y11 + (-0.000664146+0i) * X3Z4X5X9Z10X11 + (0.00772546+0i) * X3Z4X5Y9Z10Y11 + (-0.00838961+0i) * X3Z4Y5Y9Z10X11 + (-0.00838961+0i) * Y3Z4X5X9Z10Y11 + (0.00772546+0i) * Y3Z4Y5X9Z10X11 + (-0.000664146+0i) * Y3Z4Y5Y9Z10Y11 + (0.00447389+0i) * Z3X6Z7X8 + (0.00447389+0i) * Z3Y6Z7Y8 + (-0.000669197+0i) * X3Z4X5X6Z7Z8Z9X10 + (-0.000669197+0i) * X3Z4X5Y6Z7Z8Z9Y10 + (-0.000669197+0i) * Y3Z4Y5X6Z7Z8Z9X10 + (-0.000669197+0i) * Y3Z4Y5Y6Z7Z8Z9Y10 + (-0.0131047+0i) * Z3X7Z8X9 + (-0.0131047+0i) * Z3Y7Z8Y9 + (0.00104446+0i) * X3Z4X5X8Z9X10 + (0.00104446+0i) * X3Z4X5Y8Z9Y10 + (0.00104446+0i) * Y3Z4Y5X8Z9X10 + (0.00104446+0i) * Y3Z4Y5Y8Z9Y10 + (-0.00878244+0i) * X4X5Y6Y7 + (0.00878244+0i) * X4Y5Y6X7 + (0.00878244+0i) * Y4X5X6Y7 + (-0.00878244+0i) * Y4Y5X6X7 + (-0.00878244+0i) * X4X5Y8Y9 + (0.00878244+0i) * X4Y5Y8X9 + (0.00878244+0i) * Y4X5X8Y9 + (-0.00878244+0i) * Y4Y5X8X9 + (-0.00725868+0i) * X4X5Y10Y11 + (0.00725868+0i) * X4Y5Y10X11 + (0.00725868+0i) * Y4X5X10Y11 + (-0.00725868+0i) * Y4Y5X10X11 + (-0.00496705+0i) * X6X7Y8Y9 + (0.00496705+0i) * X6Y7Y8X9 + (0.00496705+0i) * Y6X7X8Y9 + (-0.00496705+0i) * Y6Y7X8X9 + (-0.00520528+0i) * X6X7Y10Y11 + (0.00520528+0i) * X6Y7Y10X11 + (0.00520528+0i) * Y6X7X10Y11 + (-0.00520528+0i) * Y6Y7X10X11 + (-0.00520528+0i) * X8X9Y10Y11 + (0.00520528+0i) * X8Y9Y10X11 + (0.00520528+0i) * Y8X9X10Y11 + (-0.00520528+0i) * Y8Y9X10X11
[Cudaq] Number of terms in the Qubit hamiltonian:  383

(e) Generate electronic Hamiltonian using UHF

Note: in case of UHF only electronic Hamiltonian from HF molecular orbital are supported. Calculating the electron integrals from natural orbitals or CASSCF orbitals is not supported yet.

[11]:
geomerty = 'N 0.0 0.0 0.56; N 0.0 0.0 -0.56'
molecular_data = get_mol_hamiltonian(xyz= geomerty, spin=1, charge=1, basis='631g', UR=True, nele_cas=5, norb_cas=6, ccsd=True, casci = True, verbose=True)

obi = molecular_data[0]
tbi = molecular_data[1]
ecore = molecular_data[2]
nelectrons = molecular_data[3]
norbitals = molecular_data[4]
fermionic_hamiltonian = molecular_data[5]
energies = molecular_data[6]

print('-------------------------------')
print('Molecular data')
print('-------------------------------')
print('Number of electrons in the active space: ', nelectrons)
print('Number of spatial orbitals in the active space: ', norbitals)
print('Number of spin molecular orbitals: ', 2 * norbitals)
print('Core energy: ', ecore)
print(energies)

# Compute the qubit hamiltonian.
spin_ham = jordan_wigner_fermion(obi, tbi, ecore)
print('[Cudaq] Qubit hamiltonian: ', spin_ham)
print('[Cudaq] Number of terms in the Qubit hamiltonian: ', spin_ham.term_count)
overwrite output file: N 0-pyscf.log
WARN: system HOMO -0.376086973991371 >= system LUMO -0.376086973991371
[pyscf] Total number of alpha molecular orbitals =  18
[pyscf] Total number of beta molecular orbitals =  18
[pyscf] Total number of electrons =  13
[pyscf] HF energy =  -108.2893388837719
[pyscf] Converting nele_cas from 5 to (3, 2) (alpha, beta)
[pyscf] UR-CASCI energy using molecular orbitals=  -108.38773041848835
[pyscf] Converting nele_cas from 5 to (3, 2) (alpha, beta)
[pyscf] UR-CCSD energy of the active space using molecular orbitals=  -108.38620486132406
[pyscf] Converting nele_cas from 5 to (3, 2) (alpha, beta)
-------------------------------
Molecular data
-------------------------------
Number of electrons in the active space:  5
Number of spatial orbitals in the active space:  6
Number of spin molecular orbitals:  12
Core energy:  -103.1394501006166
{'hf': -108.2893388837719, 'mp2': None, 'casci': -108.38773041848835, 'casscf': None, 'ccsd': -108.38620486132406, 'fci': None}
[Cudaq] Qubit hamiltonian:  (-139.182+0i) + (2.65092+0i) * Z0 + (2.71224+0i) * Z1 + (2.72614+0i) * Z2 + (2.71224+0i) * Z3 + (2.72614+0i) * Z4 + (2.52845+0i) * Z5 + (2.40571+0i) * Z6 + (2.39077+0i) * Z7 + (2.40571+0i) * Z8 + (2.39077+0i) * Z9 + (1.49759+0i) * Z10 + (1.41636+0i) * Z11 + (0.130154+0i) * Z0Z1 + (0.123285+0i) * Z0Z2 + (0.130154+0i) * Z0Z3 + (0.123285+0i) * Z0Z4 + (0.141709+0i) * Z0Z5 + (0.118922+0i) * Z0Z6 + (0.127641+0i) * Z0Z7 + (0.118922+0i) * Z0Z8 + (0.127641+0i) * Z0Z9 + (0.0941675+0i) * Z0Z10 + (0.0981197+0i) * Z0Z11 + (0.135664+0i) * Z1Z2 + (0.126993+0i) * Z1Z3 + (0.141401+0i) * Z1Z4 + (0.118702+0i) * Z1Z5 + (0.125324+0i) * Z1Z6 + (0.0932033+0i) * Z1Z7 + (0.135173+0i) * Z1Z8 + (0.119782+0i) * Z1Z9 + (0.0967903+0i) * Z1Z10 + (0.08889+0i) * Z1Z11 + (0.141401+0i) * Z2Z3 + (0.127861+0i) * Z2Z4 + (0.125754+0i) * Z2Z5 + (0.0996722+0i) * Z2Z6 + (0.129352+0i) * Z2Z7 + (0.114569+0i) * Z2Z8 + (0.130983+0i) * Z2Z9 + (0.0923836+0i) * Z2Z10 + (0.0928646+0i) * Z2Z11 + (0.135664+0i) * Z3Z4 + (0.118702+0i) * Z3Z5 + (0.135173+0i) * Z3Z6 + (0.119782+0i) * Z3Z7 + (0.125324+0i) * Z3Z8 + (0.0932033+0i) * Z3Z9 + (0.0967903+0i) * Z3Z10 + (0.08889+0i) * Z3Z11 + (0.125754+0i) * Z4Z5 + (0.114569+0i) * Z4Z6 + (0.130983+0i) * Z4Z7 + (0.0996722+0i) * Z4Z8 + (0.129352+0i) * Z4Z9 + (0.0923836+0i) * Z4Z10 + (0.0928646+0i) * Z4Z11 + (0.123223+0i) * Z5Z6 + (0.114379+0i) * Z5Z7 + (0.123223+0i) * Z5Z8 + (0.114379+0i) * Z5Z9 + (0.0993155+0i) * Z5Z10 + (0.0866001+0i) * Z5Z11 + (0.120947+0i) * Z6Z7 + (0.116067+0i) * Z6Z8 + (0.130193+0i) * Z6Z9 + (0.0892601+0i) * Z6Z10 + (0.0915793+0i) * Z6Z11 + (0.130193+0i) * Z7Z8 + (0.115228+0i) * Z7Z9 + (0.094734+0i) * Z7Z10 + (0.0866918+0i) * Z7Z11 + (0.120947+0i) * Z8Z9 + (0.0892601+0i) * Z8Z10 + (0.0915793+0i) * Z8Z11 + (0.094734+0i) * Z9Z10 + (0.0866918+0i) * Z9Z11 + (0.0904142+0i) * Z10Z11 + (0.00341177+0i) * X0X1Y2Z3Z4Y5 + (-0.00341177+0i) * X0Y1Y2Z3Z4X5 + (-0.00341177+0i) * Y0X1X2Z3Z4Y5 + (0.00341177+0i) * Y0Y1X2Z3Z4X5 + (-0.00604236+0i) * X0X1Y4Y5 + (0.00604236+0i) * X0Y1Y4X5 + (0.00604236+0i) * Y0X1X4Y5 + (-0.00604236+0i) * Y0Y1X4X5 + (4.05285e-06+0i) * X0X1Y6Z7Z8Z9Z10Y11 + (-4.05285e-06+0i) * X0Y1Y6Z7Z8Z9Z10X11 + (-4.05285e-06+0i) * Y0X1X6Z7Z8Z9Z10Y11 + (4.05285e-06+0i) * Y0Y1X6Z7Z8Z9Z10X11 + (0.00659625+0i) * X0X1X7Z8Z9X10 + (0.00659625+0i) * X0Y1Y7Z8Z9X10 + (0.00659625+0i) * Y0X1X7Z8Z9Y10 + (0.00659625+0i) * Y0Y1Y7Z8Z9Y10 + (-0.0019637+0i) * X0X1Y8Z9Z10Y11 + (0.0019637+0i) * X0Y1Y8Z9Z10X11 + (0.0019637+0i) * Y0X1X8Z9Z10Y11 + (-0.0019637+0i) * Y0Y1X8Z9Z10X11 + (-0.00125526+0i) * X0X1X9X10 + (-0.00125526+0i) * X0Y1Y9X10 + (-0.00125526+0i) * Y0X1X9Y10 + (-0.00125526+0i) * Y0Y1Y9Y10 + (0.00745472+0i) * X0Z1X2X6Z7Z8Z9X10 + (-0.000578267+0i) * X0Z1X2Y6Z7Z8Z9Y10 + (0.00803299+0i) * X0Z1Y2Y6Z7Z8Z9X10 + (0.00803299+0i) * Y0Z1X2X6Z7Z8Z9Y10 + (-0.000578267+0i) * Y0Z1Y2X6Z7Z8Z9X10 + (0.00745472+0i) * Y0Z1Y2Y6Z7Z8Z9Y10 + (0.00422957+0i) * X0Z1X2X8Z9X10 + (-0.00032809+0i) * X0Z1X2Y8Z9Y10 + (0.00455766+0i) * X0Z1Y2Y8Z9X10 + (0.00455766+0i) * Y0Z1X2X8Z9Y10 + (-0.00032809+0i) * Y0Z1Y2X8Z9X10 + (0.00422957+0i) * Y0Z1Y2Y8Z9Y10 + (-0.00604236+0i) * X0Z1X2X3Z4X5 + (-0.00604236+0i) * X0Z1X2Y3Z4Y5 + (-0.00604236+0i) * Y0Z1Y2X3Z4X5 + (-0.00604236+0i) * Y0Z1Y2Y3Z4Y5 + (0.00341177+0i) * X0Z1Z2X3Y4Y5 + (-0.00341177+0i) * X0Z1Z2Y3Y4X5 + (-0.00341177+0i) * Y0Z1Z2X3X4Y5 + (0.00341177+0i) * Y0Z1Z2Y3X4X5 + (-0.0019637+0i) * X0Z1Z2X3Y6Z7Z8Z9Z10Y11 + (0.0019637+0i) * X0Z1Z2Y3Y6Z7Z8Z9Z10X11 + (0.0019637+0i) * Y0Z1Z2X3X6Z7Z8Z9Z10Y11 + (-0.0019637+0i) * Y0Z1Z2Y3X6Z7Z8Z9Z10X11 + (0.00125526+0i) * X0Z1Z2X3X7Z8Z9X10 + (0.00125526+0i) * X0Z1Z2Y3Y7Z8Z9X10 + (0.00125526+0i) * Y0Z1Z2X3X7Z8Z9Y10 + (0.00125526+0i) * Y0Z1Z2Y3Y7Z8Z9Y10 + (-4.05285e-06+0i) * X0Z1Z2X3Y8Z9Z10Y11 + (4.05285e-06+0i) * X0Z1Z2Y3Y8Z9Z10X11 + (4.05285e-06+0i) * Y0Z1Z2X3X8Z9Z10Y11 + (-4.05285e-06+0i) * Y0Z1Z2Y3X8Z9Z10X11 + (0.00659625+0i) * X0Z1Z2X3X9X10 + (0.00659625+0i) * X0Z1Z2Y3Y9X10 + (0.00659625+0i) * Y0Z1Z2X3X9Y10 + (0.00659625+0i) * Y0Z1Z2Y3Y9Y10 + (0.00422957+0i) * X0Z1Z2Z3X4X6Z7Z8Z9X10 + (-0.00032809+0i) * X0Z1Z2Z3X4Y6Z7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+0i) * X0Z1Z2Z3Z4Y5Y10X11 + (-0.00816074+0i) * Y0Z1Z2Z3Z4X5X10Y11 + (0.00816074+0i) * Y0Z1Z2Z3Z4Y5X10X11 + (0.00082191+0i) * X0Z1X2X7Z8Z9Z10X11 + (0.00082191+0i) * X0Z1X2Y7Z8Z9Z10Y11 + (0.00082191+0i) * Y0Z1Y2X7Z8Z9Z10X11 + (0.00082191+0i) * Y0Z1Y2Y7Z8Z9Z10Y11 + (-0.000971723+0i) * X0Z1Z2Z3X4X7Z8Z9Z10X11 + (-0.000971723+0i) * X0Z1Z2Z3X4Y7Z8Z9Z10Y11 + (-0.000971723+0i) * Y0Z1Z2Z3Y4X7Z8Z9Z10X11 + (-0.000971723+0i) * Y0Z1Z2Z3Y4Y7Z8Z9Z10Y11 + (0.000971723+0i) * X0Z1X2X9Z10X11 + (0.000971723+0i) * X0Z1X2Y9Z10Y11 + (0.000971723+0i) * Y0Z1Y2X9Z10X11 + (0.000971723+0i) * Y0Z1Y2Y9Z10Y11 + (0.00082191+0i) * X0Z1Z2Z3X4X9Z10X11 + (0.00082191+0i) * X0Z1Z2Z3X4Y9Z10Y11 + (0.00082191+0i) * Y0Z1Z2Z3Y4X9Z10X11 + (0.00082191+0i) * Y0Z1Z2Z3Y4Y9Z10Y11 + (0.00475551+0i) * Z1X2Z3X4 + (0.00475551+0i) * Z1Y2Z3Y4 + (-0.00475551+0i) * X1X3 + (-0.00475551+0i) * Y1Y3 + (0.00286849+0i) * X1X2Y3Y4 + (-0.00286849+0i) * X1Y2Y3X4 + (-0.00286849+0i) * Y1X2X3Y4 + (0.00286849+0i) * Y1Y2X3X4 + (-0.0299018+0i) * X1X2X6X7 + (-0.0299018+0i) * X1Y2Y6X7 + (-0.0299018+0i) * Y1X2X6Y7 + (-0.0299018+0i) * Y1Y2Y6Y7 + (0.00365631+0i) * X1X2X6Z7Z8X9 + (0.00365631+0i) * X1Y2Y6Z7Z8X9 + (0.00365631+0i) * Y1X2X6Z7Z8Y9 + (0.00365631+0i) * Y1Y2Y6Z7Z8Y9 + (-0.021363+0i) * X1X2Y7Y8 + (0.021363+0i) * X1Y2Y7X8 + (0.021363+0i) * Y1X2X7Y8 + (-0.021363+0i) * Y1Y2X7X8 + (0.000445668+0i) * X1X2X8X9 + (0.000445668+0i) * X1Y2Y8X9 + (0.000445668+0i) * Y1X2X8Y9 + (0.000445668+0i) * Y1Y2Y8Y9 + (-0.00205122+0i) * X1X2X10X11 + (-0.00205122+0i) * X1Y2Y10X11 + (-0.00205122+0i) * Y1X2X10Y11 + (-0.00205122+0i) * Y1Y2Y10Y11 + (0.00184327+0i) * X1Z2X3X7Z8X9 + (-0.0284222+0i) * X1Z2X3Y7Z8Y9 + (0.0302655+0i) * X1Z2Y3Y7Z8X9 + (0.0302655+0i) * Y1Z2X3X7Z8Y9 + (-0.0284222+0i) * Y1Z2Y3X7Z8X9 + (0.00184327+0i) * Y1Z2Y3Y7Z8Y9 + (0.00475551+0i) * X1Z2X3Z4 + (0.00475551+0i) * Y1Z2Y3Z4 + (-0.0161077+0i) * X1Z2Z3X4X6X7 + (-0.0161077+0i) * X1Z2Z3Y4Y6X7 + (-0.0161077+0i) * Y1Z2Z3X4X6Y7 + (-0.0161077+0i) * Y1Z2Z3Y4Y6Y7 + (0.00668498+0i) * X1Z2Z3X4X6Z7Z8X9 + (0.00668498+0i) * X1Z2Z3Y4Y6Z7Z8X9 + (0.00668498+0i) * Y1Z2Z3X4X6Z7Z8Y9 + (0.00668498+0i) * Y1Z2Z3Y4Y6Z7Z8Y9 + (0.0361412+0i) * X1Z2Z3X4Y7Y8 + (-0.0361412+0i) * X1Z2Z3Y4Y7X8 + (-0.0361412+0i) * Y1Z2Z3X4X7Y8 + (0.0361412+0i) * Y1Z2Z3Y4X7X8 + (-0.00891164+0i) * X1Z2Z3X4X8X9 + (-0.00891164+0i) * X1Z2Z3Y4Y8X9 + (-0.00891164+0i) * Y1Z2Z3X4X8Y9 + (-0.00891164+0i) * Y1Z2Z3Y4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y9 + (0.00524801+0i) * X1Z2X3Z7 + (0.00524801+0i) * Y1Z2Y3Z7 + (-2.03255e-05+0i) * X1Z2X3Z8 + (-2.03255e-05+0i) * Y1Z2Y3Z8 + (-0.00126864+0i) * X1Z2Z3Z4X5X8Z9X10 + (-0.00126864+0i) * X1Z2Z3Z4X5Y8Z9Y10 + (-0.00126864+0i) * Y1Z2Z3Z4Y5X8Z9X10 + (-0.00126864+0i) * Y1Z2Z3Z4Y5Y8Z9Y10 + (-0.00524801+0i) * X1Z2X3Z9 + (-0.00524801+0i) * Y1Z2Y3Z9 + (-0.00475551+0i) * X2X4 + (-0.00475551+0i) * Y2Y4 + (-0.00891164+0i) * X2X3Y6Y7 + (0.00891164+0i) * X2Y3Y6X7 + (0.00891164+0i) * Y2X3X6Y7 + (-0.00891164+0i) * Y2Y3X6X7 + (-0.0361412+0i) * X2X3Y6Z7Z8Y9 + (0.0361412+0i) * X2Y3Y6Z7Z8X9 + (0.0361412+0i) * Y2X3X6Z7Z8Y9 + (-0.0361412+0i) * Y2Y3X6Z7Z8X9 + (-0.00668498+0i) * X2X3X7X8 + (-0.00668498+0i) * X2Y3Y7X8 + (-0.00668498+0i) * Y2X3X7Y8 + (-0.00668498+0i) * Y2Y3Y7Y8 + (-0.0161077+0i) * X2X3Y8Y9 + (0.0161077+0i) * X2Y3Y8X9 + (0.0161077+0i) * Y2X3X8Y9 + (-0.0161077+0i) * Y2Y3X8X9 + (-0.00363277+0i) * X2X3Y10Y11 + (0.00363277+0i) * X2Y3Y10X11 + (0.00363277+0i) * Y2X3X10Y11 + (-0.00363277+0i) * Y2Y3X10X11 + (-0.00791021+0i) * X2Z3X4X6Z7X8 + (0.0228067+0i) * X2Z3X4Y6Z7Y8 + (-0.0307169+0i) * X2Z3Y4Y6Z7X8 + (-0.0307169+0i) * Y2Z3X4X6Z7Y8 + (0.0228067+0i) * Y2Z3Y4X6Z7X8 + (-0.00791021+0i) * Y2Z3Y4Y6Z7Y8 + (-0.00878018+0i) * X2Z3Z4X5Y6Z7Z8Z9Z10Y11 + (0.00878018+0i) * X2Z3Z4Y5Y6Z7Z8Z9Z10X11 + (0.00878018+0i) * Y2Z3Z4X5X6Z7Z8Z9Z10Y11 + (-0.00878018+0i) * Y2Z3Z4Y5X6Z7Z8Z9Z10X11 + (0.00132026+0i) * X2Z3Z4X5X7Z8Z9X10 + (0.00132026+0i) * X2Z3Z4Y5Y7Z8Z9X10 + (0.00132026+0i) * Y2Z3Z4X5X7Z8Z9Y10 + (0.00132026+0i) * Y2Z3Z4Y5Y7Z8Z9Y10 + (-0.00498159+0i) * X2Z3Z4X5Y8Z9Z10Y11 + (0.00498159+0i) * X2Z3Z4Y5Y8Z9Z10X11 + (0.00498159+0i) * Y2Z3Z4X5X8Z9Z10Y11 + (-0.00498159+0i) * Y2Z3Z4Y5X8Z9Z10X11 + (0.00156091+0i) * X2Z3Z4X5X9X10 + (0.00156091+0i) * X2Z3Z4Y5Y9X10 + (0.00156091+0i) * Y2Z3Z4X5X9Y10 + (0.00156091+0i) * Y2Z3Z4Y5Y9Y10 + (0.012464+0i) * Z2X6Z7X8 + (0.012464+0i) * Z2Y6Z7Y8 + (0.012464+0i) * X2Z3X4Z6 + (0.012464+0i) * Y2Z3Y4Z6 + (-0.00484846+0i) * Z2X7Z8X9 + (-0.00484846+0i) * Z2Y7Z8Y9 + (0.00484846+0i) * X2Z3X4Z7 + (0.00484846+0i) * Y2Z3Y4Z7 + (-0.000815624+0i) * X2Z3X4X7Z8X9 + (-0.000815624+0i) * X2Z3X4Y7Z8Y9 + (-0.000815624+0i) * Y2Z3Y4X7Z8X9 + (-0.000815624+0i) * Y2Z3Y4Y7Z8Y9 + (-0.012464+0i) * X2Z3X4Z8 + (-0.012464+0i) * Y2Z3Y4Z8 + (-0.00484846+0i) * X2Z3X4Z9 + (-0.00484846+0i) * Y2Z3Y4Z9 + (-0.000445668+0i) * X3X4X6X7 + (-0.000445668+0i) * X3Y4Y6X7 + (-0.000445668+0i) * Y3X4X6Y7 + (-0.000445668+0i) * Y3Y4Y6Y7 + (-0.021363+0i) * X3X4X6Z7Z8X9 + (-0.021363+0i) * X3Y4Y6Z7Z8X9 + (-0.021363+0i) * Y3X4X6Z7Z8Y9 + (-0.021363+0i) * Y3Y4Y6Z7Z8Y9 + (0.00365631+0i) * X3X4Y7Y8 + (-0.00365631+0i) * X3Y4Y7X8 + (-0.00365631+0i) * Y3X4X7Y8 + (0.00365631+0i) * Y3Y4X7X8 + (0.0299018+0i) * X3X4X8X9 + (0.0299018+0i) * X3Y4Y8X9 + (0.0299018+0i) * Y3X4X8Y9 + (0.0299018+0i) * Y3Y4Y8Y9 + (-0.00205122+0i) * X3X4X10X11 + (-0.00205122+0i) * X3Y4Y10X11 + (-0.00205122+0i) * Y3X4X10Y11 + (-0.00205122+0i) * Y3Y4Y10Y11 + (0.00014637+0i) * X3Z4X5X7Z8Z9Z10X11 + (-0.00202412+0i) * X3Z4X5Y7Z8Z9Z10Y11 + (0.00217049+0i) * X3Z4Y5Y7Z8Z9Z10X11 + (0.00217049+0i) * Y3Z4X5X7Z8Z9Z10Y11 + (-0.00202412+0i) * Y3Z4Y5X7Z8Z9Z10X11 + (0.00014637+0i) * Y3Z4Y5Y7Z8Z9Z10Y11 + (0.000769154+0i) * X3Z4X5X9Z10X11 + (-0.0106365+0i) * X3Z4X5Y9Z10Y11 + (0.0114056+0i) * X3Z4Y5Y9Z10X11 + (0.0114056+0i) * Y3Z4X5X9Z10Y11 + (-0.0106365+0i) * Y3Z4Y5X9Z10X11 + (0.000769154+0i) * Y3Z4Y5Y9Z10Y11 + (-2.03255e-05+0i) * Z3X6Z7X8 + (-2.03255e-05+0i) * Z3Y6Z7Y8 + (-0.00126864+0i) * X3Z4X5X6Z7Z8Z9X10 + (-0.00126864+0i) * X3Z4X5Y6Z7Z8Z9Y10 + (-0.00126864+0i) * Y3Z4Y5X6Z7Z8Z9X10 + (-0.00126864+0i) * Y3Z4Y5Y6Z7Z8Z9Y10 + (0.00524801+0i) * Z3X7Z8X9 + (0.00524801+0i) * Z3Y7Z8Y9 + (-2.61831e-06+0i) * X3Z4X5X8Z9X10 + (-2.61831e-06+0i) * X3Z4X5Y8Z9Y10 + (-2.61831e-06+0i) * Y3Z4Y5X8Z9X10 + (-2.61831e-06+0i) * Y3Z4Y5Y8Z9Y10 + (-0.00498159+0i) * X4X5Y6Z7Z8Z9Z10Y11 + (0.00498159+0i) * X4Y5Y6Z7Z8Z9Z10X11 + (0.00498159+0i) * Y4X5X6Z7Z8Z9Z10Y11 + (-0.00498159+0i) * Y4Y5X6Z7Z8Z9Z10X11 + (-0.00156091+0i) * X4X5X7Z8Z9X10 + (-0.00156091+0i) * X4Y5Y7Z8Z9X10 + (-0.00156091+0i) * Y4X5X7Z8Z9Y10 + (-0.00156091+0i) * Y4Y5Y7Z8Z9Y10 + (0.00878018+0i) * X4X5Y8Z9Z10Y11 + (-0.00878018+0i) * X4Y5Y8Z9Z10X11 + (-0.00878018+0i) * Y4X5X8Z9Z10Y11 + (0.00878018+0i) * Y4Y5X8Z9Z10X11 + (0.00132026+0i) * X4X5X9X10 + (0.00132026+0i) * X4Y5Y9X10 + (0.00132026+0i) * Y4X5X9Y10 + (0.00132026+0i) * Y4Y5Y9Y10 + (-0.012464+0i) * Z4X6Z7X8 + (-0.012464+0i) * Z4Y6Z7Y8 + (0.00484846+0i) * Z4X7Z8X9 + (0.00484846+0i) * Z4Y7Z8Y9 + (-0.0018035+0i) * Z6X7Z8X9 + (-0.0018035+0i) * Z6Y7Z8Y9 + (-0.0018035+0i) * X6X8 + (-0.0018035+0i) * Y6Y8 + (-0.00462276+0i) * X6X7Y8Y9 + (0.00462276+0i) * X6Y7Y8X9 + (0.00462276+0i) * Y6X7X8Y9 + (-0.00462276+0i) * Y6Y7X8X9 + (-0.000951563+0i) * X6X7Y10Y11 + (0.000951563+0i) * X6Y7Y10X11 + (0.000951563+0i) * Y6X7X10Y11 + (-0.000951563+0i) * Y6Y7X10X11 + (0.0018035+0i) * X6Z7X8Z9 + (0.0018035+0i) * Y6Z7Y8Z9 + (-0.00505716+0i) * X6Z7Z8X9Y10Y11 + (0.00505716+0i) * X6Z7Z8Y9Y10X11 + (0.00505716+0i) * Y6Z7Z8X9X10Y11 + (-0.00505716+0i) * Y6Z7Z8Y9X10X11 + (0.0018035+0i) * X7X9 + (0.0018035+0i) * Y7Y9 + (-0.00505716+0i) * X7X8X10X11 + (-0.00505716+0i) * X7Y8Y10X11 + (-0.00505716+0i) * Y7X8X10Y11 + (-0.00505716+0i) * Y7Y8Y10Y11 + (0.000951563+0i) * X8X9Y10Y11 + (-0.000951563+0i) * X8Y9Y10X11 + (-0.000951563+0i) * Y8X9X10Y11 + (0.000951563+0i) * Y8Y9X10X11
[Cudaq] Number of terms in the Qubit hamiltonian:  431