236 lines
7.6 KiB
Plaintext
236 lines
7.6 KiB
Plaintext
---
|
||
title: QMolecule (v0.29)
|
||
description: API reference for qiskit.chemistry.QMolecule in qiskit v0.29
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.chemistry.QMolecule
|
||
---
|
||
|
||
# QMolecule
|
||
|
||
<Class id="qiskit.chemistry.QMolecule" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/chemistry/qmolecule.py" signature="QMolecule(filename=None)" modifiers="class">
|
||
Bases: `object`
|
||
|
||
Molecule data class containing driver result.
|
||
|
||
When one of the chemistry [`drivers`](qiskit.chemistry.drivers#module-qiskit.chemistry.drivers "qiskit.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`](qiskit.chemistry.drivers.PyQuanteDriver "qiskit.chemistry.drivers.PyQuanteDriver").
|
||
|
||
This class provides methods to save it and load it again from an HDF5 file
|
||
|
||
## Methods
|
||
|
||
<span id="qiskit-chemistry-qmolecule-z" />
|
||
|
||
### Z
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.Z" signature="QMolecule.Z(natom)" />
|
||
|
||
<span id="qiskit-chemistry-qmolecule-has-dipole-integrals" />
|
||
|
||
### has\_dipole\_integrals
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.has_dipole_integrals" signature="QMolecule.has_dipole_integrals()">
|
||
Check if dipole integrals are present.
|
||
</Function>
|
||
|
||
<span id="qiskit-chemistry-qmolecule-load" />
|
||
|
||
### load
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.load" signature="QMolecule.load()">
|
||
loads info saved.
|
||
</Function>
|
||
|
||
<span id="qiskit-chemistry-qmolecule-log" />
|
||
|
||
### log
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.log" signature="QMolecule.log()">
|
||
log properties
|
||
</Function>
|
||
|
||
<span id="qiskit-chemistry-qmolecule-onee-to-spin" />
|
||
|
||
### onee\_to\_spin
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.onee_to_spin" signature="QMolecule.onee_to_spin(mohij, mohij_b=None, threshold=1e-12)" modifiers="static">
|
||
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
|
||
</Function>
|
||
|
||
<span id="qiskit-chemistry-qmolecule-oneeints2mo" />
|
||
|
||
### oneeints2mo
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.oneeints2mo" signature="QMolecule.oneeints2mo(ints, moc)" modifiers="static">
|
||
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
|
||
</Function>
|
||
|
||
<span id="qiskit-chemistry-qmolecule-remove-file" />
|
||
|
||
### remove\_file
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.remove_file" signature="QMolecule.remove_file(file_name=None)">
|
||
remove file
|
||
</Function>
|
||
|
||
<span id="qiskit-chemistry-qmolecule-save" />
|
||
|
||
### save
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.save" signature="QMolecule.save(file_name=None)">
|
||
Saves the info from the driver.
|
||
</Function>
|
||
|
||
<span id="qiskit-chemistry-qmolecule-twoe-to-spin" />
|
||
|
||
### twoe\_to\_spin
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.twoe_to_spin" signature="QMolecule.twoe_to_spin(mohijkl, mohijkl_bb=None, mohijkl_ba=None, threshold=1e-12)" modifiers="static">
|
||
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
|
||
</Function>
|
||
|
||
<span id="qiskit-chemistry-qmolecule-twoeints2mo" />
|
||
|
||
### twoeints2mo
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.twoeints2mo" signature="QMolecule.twoeints2mo(ints, moc)" modifiers="static">
|
||
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
|
||
</Function>
|
||
|
||
<span id="qiskit-chemistry-qmolecule-twoeints2mo-general" />
|
||
|
||
### twoeints2mo\_general
|
||
|
||
<Function id="qiskit.chemistry.QMolecule.twoeints2mo_general" signature="QMolecule.twoeints2mo_general(ints, moc1, moc2, moc3, moc4)" modifiers="static" />
|
||
|
||
## Attributes
|
||
|
||
### BOHR
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.BOHR" attributeValue="0.52917721092" />
|
||
|
||
### DEBYE
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.DEBYE" attributeValue="0.393430307" />
|
||
|
||
### QMOLECULE\_VERSION
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.QMOLECULE_VERSION" attributeValue="2" />
|
||
|
||
### core\_orbitals
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.core_orbitals">
|
||
Returns: A list of core orbital indices.
|
||
|
||
**Return type**
|
||
|
||
`List`\[`int`]
|
||
</Attribute>
|
||
|
||
### filename
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.filename">
|
||
returns temp file path
|
||
</Attribute>
|
||
|
||
### one\_body\_integrals
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.one_body_integrals">
|
||
Returns one body electron integrals.
|
||
</Attribute>
|
||
|
||
### symbols
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.symbols" attributeValue="['_', 'H', 'He', 'Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne', 'Na', 'Mg', 'Al', 'Si', 'P', 'S', 'Cl', 'Ar', 'K', 'Ca', 'Sc', 'Ti', 'V', 'Cr', 'Mn', 'Fe', 'Co', 'Ni', 'Cu', 'Zn', 'Ga', 'Ge', 'As', 'Se', 'Br', 'Kr', 'Rb', 'Sr', 'Y', 'Zr', 'Nb', 'Mo', 'Tc', 'Ru', 'Rh', 'Pd', 'Ag', 'Cd', 'In', 'Sn', 'Sb', 'Te', 'I', 'Xe', 'Cs', 'Ba', 'La', 'Ce', 'Pr', 'Nd', 'Pm', 'Sm', 'Eu', 'Gd', 'Tb', 'Dy', 'Ho', 'Er', 'Tm', 'Yb', 'Lu', 'Hf', 'Ta', 'W', 'Re', 'Os', 'Ir', 'Pt', 'Au', 'Hg', 'Tl', 'Pb', 'Bi', 'Po', 'At', 'Rn', 'Fr', 'Ra', 'Ac', 'Th', 'Pa', 'U', 'Np', 'Pu', 'Am', 'Cm', 'Bk', 'Cf', 'Es', 'Fm', 'Md', 'No', 'Lr', 'Rf', 'Db', 'Sg', 'Bh', 'Hs', 'Mt', 'Ds', 'Rg', 'Cn', 'Nh', 'Fl', 'Mc', 'Lv', 'Ts', 'Og']" />
|
||
|
||
### two\_body\_integrals
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.two_body_integrals">
|
||
Returns two body electron integrals.
|
||
</Attribute>
|
||
|
||
### x\_dipole\_integrals
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.x_dipole_integrals">
|
||
returns x\_dipole\_integrals
|
||
</Attribute>
|
||
|
||
### y\_dipole\_integrals
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.y_dipole_integrals">
|
||
returns y\_dipole\_integrals
|
||
</Attribute>
|
||
|
||
### z\_dipole\_integrals
|
||
|
||
<Attribute id="qiskit.chemistry.QMolecule.z_dipole_integrals">
|
||
returns z\_dipole\_integrals
|
||
</Attribute>
|
||
</Class>
|
||
|