# Quantum chemistry datasets

Quantum chemistry is one of the most promising directions for research in quantum algorithms. Here you can explore our available quantum chemistry datasets for some common molecular systems.

## Molecules

We provide the electronic structure data for 42 different geometries of the following molecules:

**Linear hydrogen chains:**H_{2}, H_{4}, H_{6}, H_{8}.**Metallic and non-metallic hydrides:**- LiH, BeH_{2}, BH_{3}, NH_{3}, H_{2}O, HF.**Charged species:**HeH^{+}, H3^{+}, OH^{-}.

For the smaller molecules such as H_{2}, HeH^{+}, and H_{3}^{+}, data has been obtained for both the minimal basis-set *STO-3G* and the split-valence double-zeta basis set *6-31G*. For the remaining molecules, data is only available for the former basis-set. The geometries for each molecule are defined by the bond lengths between atoms, with the available bondlengths given as 41 equally spaced values within a range (see the table below). In addition to these, we also include data for the optimal ground-state geometry of each molecule. We summarise all of this information for all the molecules in the table below.

## Accessing chemistry datasets

The quantum chemistry datasets can be downloaded and loaded to memory using the `load()`

function as follows:

```
>>> data = qml.data.load("qchem", molname="H2", basis="STO-3G", bondlength=1.1)[0]
>>> print(data)
<Dataset = description: qchem/H2/STO-3G/1.1, attributes: ['molecule', 'hamiltonian', ...]>
```

Here, the positional argument `"qchem"`

denotes that we are loading a chemistry dataset, while the keyword arguments `molname`

, `basis`

, `lattice`

, and `bondlength`

specify the requested dataset. The possible values for these keyword arguments are included in the table below. For more information on using PennyLane functions please see the PennyLane Documentation.

Molecule | Basis set(s) | #Qubits | Bond length (Å), Bond angle (°) | Optimal geometry (Å, °) |
---|---|---|---|---|

H_{2} |
STO-3G / 6-31G | 4 / 8 | H_{𝐴}−H_{𝐵} ∈ [0.5,2.1] Å |
H_{𝐴}−H_{𝐵} = 0.742 Å |

HeH^{+} |
STO-3G / 6-31G | 4 / 8 | He−H ∈ [0.5,2.1] Å | He−H= 0.775 Å |

H^{+}_{3} |
STO-3G / 6-31G | 6 / 12 | H_{𝐴}−H_{𝐵} ∈ [0.5,2.1] Å, _{∡} HHH = 60° |
H_{𝐴}−H_{𝐵} = 0.874 Å, _{∡} HHH = 60° |

H4 | STO-3G | 8 | H_{𝐴}−H_{𝐵} ∈ [0.5,1.3] Å, _{∡} HHH = 180° |
N/A |

LiH | STO-3G | 12 | Li−H ∈ [0.9,2.1] Å | Li−H = 1.57 Å |

HF | STO-3G | 12 | H−F ∈ [0.5,2.1] Å | H−F = 0.917 Å |

OH^{-} |
STO-3G | 12 | O−H ∈ [0.5,2.1] Å | O−H = 0.964 Å |

H_{6} |
STO-3G | 12 | H_{𝐴}−H_{𝐵} ∈ [0.5,1.3] Å, _{∡} HHH = 180° |
N/A |

BeH_{2} |
STO-3G | 14 | Be−H ∈ [0.5,2.1] Å, _{∡} HBeH = 180° |
Be−H = 1.33 Å, _{∡} HBeH = 180° |

H_{2}O |
STO-3G | 14 | H−O ∈ [0.5,2.1] Å, _{∡} HOH = 104.5° |
H−O = 0.958 Å, _{∡} HOH = 104.5° |

H_{8} |
STO-3G | 16 | H_{𝐴}−H_{𝐵} ∈ [0.5,0.9] Å, _{∡} HHH =180° |
N/A |

BH_{3} |
STO-3G | 16 | B−H ∈ [0.5,2.1] Å, _{∡} HBH = 120° |
B−H = 1.189 Å, _{∡} HBH = 120° |

NH_{3} |
STO-3G | 16 | N−H ∈ [0.5,2.1] Å, _{∡} HNH =106.8° |
N−H = 1.11 Å, _{∡} HNH = 106.8° |

## Data features

For each of the molecules mentioned above, the following characteristics can be extracted for each geometry:

### Molecular data

Information regarding the molecule, including its complete classical description and the Hartree Fock state.

Name | Type | Description |
---|---|---|

`molecule` |
`Molecule` |
PennyLane Molecule object containing description for the system and basis set |

`hf_state` |
`numpy.ndarray` |
Hartree-Fock state of the chemical system represented by a binary vector |

### Hamiltonian data

Hamiltonian for the molecular system under Jordan-Wigner transformation and its properties.

Name | Type | Description |
---|---|---|

`hamiltonian` |
`Hamiltonian` |
Hamiltonian of the system in the Pauli basis |

`sparse_hamiltonian` |
`scipy.sparse.csr_array` |
Sparse matrix representation of a Hamiltonian in the computational basis |

`meas_groupings` |
list[list[list[`Operator` ]], list[`tensor_like` ]] |
List of grouped qubit-wise commuting Hamiltonian terms |

`fci_energy` |
`float` |
Ground state energy of the molecule obtained from exact diagonalization |

`fci_spectrum` |
`numpy.ndarray` |
First 2× |

#qubits eigenvalues obtained from exact diagonalization |

### Auxiliary observables

The supplementary operators required to obtain additional properties of the molecule such as its dipole moment, spin, etc.

Name | Type | Description |
---|---|---|

`dipole_op` |
`Hamiltonian` |
Qubit dipole moment operators for the chemical system |

`number_op` |
`Hamiltonian` |
Qubit particle number operator for the chemical system |

`spin2_op` |
`Hamiltonian` |
Qubit operator for computing total spin 𝑆^{2} for the chemical system |

`spinz_op` |
`Hamiltonian` |
Qubit operator for computing total spin’s projection in 𝑍 direction |

### Tapering data

Features based on 𝑍_{2} symmetries of the molecular Hamiltonian for performing tapering.

Name | Type | Description |
---|---|---|

`symmetries` |
list[`Hamiltonian` ] |
Symmetries required for tapering molecular Hamiltonian |

`paulix_ops` |
list[`PauliX` ] |
Supporting PauliX ops required to build Clifford 𝑈 for tapering |

`optimal_sector` |
`numpy.ndarray` |
Eigensector of the tapered qubits that would contain the ground state |

### Tapered observables data

Tapered observables and Hartree-Fock state based on the on 𝑍_{2} symmetries of the molecular Hamiltonian.

Name | Type | Description |
---|---|---|

`tapered_hamiltonian` |
`Hamiltonian` |
Tapered Hamiltonian |

`tapered_hf_state` |
`numpy.ndarray` |
Tapered Hartree-Fock state of the molecule |

`tapered_dipole_op` |
`Hamiltonian` |
Tapered dipole moment operator |

`tapered_num_op` |
`Hamiltonian` |
Tapered number operator |

`tapered_spin2_op` |
`Hamiltonian` |
Tapered total spin operator |

`tapered_spinz_op` |
`Hamiltonian` |
Tapered spin projection operator |

### VQE data

Variational data obtained by using `AdaptiveOptimizer`

to minimize ground state energy.

Name | Type | Description |
---|---|---|

`vqe_gates` |
list[`Operation` ] |
`SingleExcitation` and `DoubleExcitation` gates for the optimized circuit |

`vqe_params` |
`numpy.ndarray` |
Optimal parameters for the gates that prepares ground state |

`vqe_energy` |
`float` |
Energy obtained from the state prepared by the optimized circuit |