qml.qchem

The PennyLane quantum chemistry library.

Note

To access the qml.qchem package, pennylane-qchem must be installed via pip:

pip install pennylane-qchem

The PennyLane quantum chemistry package. Supports OpenFermion, PySCF, and Psi4 for quantum chemistry calculations using PennyLane.

Functions

read_structure(filepath[, outpath])

Reads the molecular structure from a file and creates a list containing the symbol and Cartesian coordinates of the atomic species.

meanfield_data(mol_name, geometry, charge, …)

Launches the meanfield (Hartree-Fock) electronic structure calculation.

active_space(mol_name, hf_data[, …])

Builds the active space by partitioning the set of Hartree-Fock molecular orbitals.

decompose_hamiltonian(mol_name, hf_data[, …])

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

_qubit_operator_to_terms(qubit_operator)

Converts OpenFermion QubitOperator to a 2-tuple of coefficients and PennyLane Pauli observables.

_terms_to_qubit_operator(coeffs, ops)

Converts a 2-tuple of complex coefficients and PennyLane operations to OpenFermion QubitOperator.

_qubit_operators_equivalent(…)

Checks equivalence between OpenFermion QubitOperator and Pennylane VQE Hamiltonian (Tensor product of Pauli matrices).

convert_hamiltonian(qubit_hamiltonian)

Converts OpenFermion QubitOperator Hamiltonian to Pennylane VQE Hamiltonian

generate_hamiltonian(mol_name, mol_geo_file, …)

Generates the qubit Hamiltonian based on geometry and mean field electronic structure.

Contents