qiskit.chemistry.QMolecule
class QMolecule(filename=None)
Molecule data class containing driver result.
When one of the chemistry drivers
is run and instance of this class is returned. This contains various properties that are made available in a consistent manner across the various drivers.
Note that values here, for the same input molecule to each driver, may be vary across the drivers underlying code implementation. Also some drivers may not provide certain fields such as dipole integrals in the case of PyQuanteDriver
.
This class provides methods to save it and load it again from an HDF5 file
__init__
__init__(filename=None)
Initialize self. See help(type(self)) for accurate signature.
Methods
Z (natom) | |
__init__ ([filename]) | Initialize self. |
has_dipole_integrals () | Check if dipole integrals are present. |
load () | loads info saved. |
log () | log properties |
onee_to_spin (mohij[, mohij_b, threshold]) | Convert one-body MO integrals to spin orbital basis |
oneeints2mo (ints, moc) | Converts one-body integrals from AO to MO basis |
remove_file ([file_name]) | remove file |
save ([file_name]) | Saves the info from the driver. |
twoe_to_spin (mohijkl[, mohijkl_bb, …]) | Convert two-body MO integrals to spin orbital basis |
twoeints2mo (ints, moc) | Converts two-body integrals from AO to MO basis |
twoeints2mo_general (ints, moc1, moc2, moc3, moc4) |
Attributes
BOHR | |
DEBYE | |
QMOLECULE_VERSION | |
core_orbitals | Returns: A list of core orbital indices. |
filename | returns temp file path |
one_body_integrals | Returns one body electron integrals. |
symbols | |
two_body_integrals | Returns two body electron integrals. |
x_dipole_integrals | returns x_dipole_integrals |
y_dipole_integrals | returns y_dipole_integrals |
z_dipole_integrals | returns z_dipole_integrals |
Z
Z(natom)
core_orbitals
Returns: A list of core orbital indices.
Return type
List
[int
]
filename
returns temp file path
has_dipole_integrals
has_dipole_integrals()
Check if dipole integrals are present.
load
load()
loads info saved.
log
log()
log properties
one_body_integrals
Returns one body electron integrals.
onee_to_spin
static onee_to_spin(mohij, mohij_b=None, threshold=1e-12)
Convert one-body MO integrals to spin orbital basis
Takes one body integrals in molecular orbital basis and returns integrals in spin orbitals ready for use as coefficients to one body terms 2nd quantized Hamiltonian.
Parameters
- mohij (numpy.ndarray) – One body orbitals in molecular basis (Alpha)
- mohij_b (numpy.ndarray) – One body orbitals in molecular basis (Beta)
- threshold (float) – Threshold value for assignments
Returns
One body integrals in spin orbitals
Return type
numpy.ndarray
oneeints2mo
static oneeints2mo(ints, moc)
Converts one-body integrals from AO to MO basis
Returns one electron integrals in AO basis converted to given MO basis
Parameters
- ints (numpy.ndarray) – N^2 one electron integrals in AO basis
- moc (numpy.ndarray) – Molecular orbital coefficients
Returns
integrals in MO basis
Return type
numpy.ndarray
remove_file
remove_file(file_name=None)
remove file
save
save(file_name=None)
Saves the info from the driver.
two_body_integrals
Returns two body electron integrals.
twoe_to_spin
static twoe_to_spin(mohijkl, mohijkl_bb=None, mohijkl_ba=None, threshold=1e-12)
Convert two-body MO integrals to spin orbital basis
Takes two body integrals in molecular orbital basis and returns integrals in spin orbitals ready for use as coefficients to two body terms in 2nd quantized Hamiltonian.
Parameters
- mohijkl (numpy.ndarray) – Two body orbitals in molecular basis (AlphaAlpha)
- mohijkl_bb (numpy.ndarray) – Two body orbitals in molecular basis (BetaBeta)
- mohijkl_ba (numpy.ndarray) – Two body orbitals in molecular basis (BetaAlpha)
- threshold (float) – Threshold value for assignments
Returns
Two body integrals in spin orbitals
Return type
numpy.ndarray
twoeints2mo
static twoeints2mo(ints, moc)
Converts two-body integrals from AO to MO basis
Returns two electron integrals in AO basis converted to given MO basis
Parameters
- ints (numpy.ndarray) – N^2 two electron integrals in AO basis
- moc (numpy.ndarray) – Molecular orbital coefficients
Returns
integrals in MO basis
Return type
numpy.ndarray
twoeints2mo_general
static twoeints2mo_general(ints, moc1, moc2, moc3, moc4)
x_dipole_integrals
returns x_dipole_integrals
y_dipole_integrals
returns y_dipole_integrals
z_dipole_integrals
returns z_dipole_integrals