# qml.qchem.optimal_sector¶

optimal_sector(qubit_op, generators, active_electrons)[source]

Get the optimal sector which contains the ground state.

To obtain the optimal sector, we need to choose the right eigenvalues for the symmetry generators $$\bm{\tau}$$. We can do so by using the following relation between the Pauli-Z qubit operator and the occupation number under a Jordan-Wigner transform.

$\sigma_{i}^{z} = I - 2a_{i}^{\dagger}a_{i}$

According to this relation, the occupied and unoccupied fermionic modes correspond to the -1 and +1 eigenvalues of the Pauli-Z operator, respectively. Since all of the generators $$\bm{\tau}$$ consist only of $$I$$ and Pauli-Z operators, the correct eigenvalue for each $$\tau$$ operator can be simply obtained by applying it on the reference Hartree-Fock (HF) state, and looking at the overlap between the wires on which the Pauli-Z operators act and the wires that correspond to occupied orbitals in the HF state.

Parameters
• qubit_op (Hamiltonian) – Hamiltonian for which symmetries are being generated

• generators (list[Hamiltonian]) – list of symmetry generators for the Hamiltonian

• active_electrons (int) – The number of active electrons in the system

Returns

eigenvalues corresponding to the optimal sector which contains the ground state

Return type

list[int]

Example

>>> symbols = ["H", "H"]
>>> geometry = np.array([[0.0, 0.0, -0.69440367], [0.0, 0.0, 0.69440367]])
>>> H, qubits = qml.qchem.molecular_hamiltonian(symbols, geometry)
>>> generators = qml.qchem.symmetry_generators(H)
>>> qml.qchem.optimal_sector(H, generators, 2)
[1, -1, -1]


Using PennyLane

Development

API