quiche.chemistry#

Chemistry#

Quantum chemistry related methods and transformations.

get_hf_state(num_spin_orbitals, num_electrons)#

Get the occupation basis state for a given number of electrons and spin orbitals.

Parameters:
  • num_spin_orbitals (int) – Number of spin orbitals (and hence length) of the final state.

  • num_electrons (int) – Number of electrons, and thus number of orbitals occupied in the final state.

Returns:

The HF state with the lowest num_electron number of orbitals occupied.

Return type:

NDArray[np.int_]

get_jw_state(occupation)#

Transform an occupation state to qubit basis with the Jordan-Wigner mapping.

Parameters:

occupation (NDArray[np.int_]) – Occupation basis state to convert.

Returns:

The qubit basis state resulting from the fermion-to-qubit mapping.

Return type:

NDArray[np.int_]

get_parity_state(occupation)#

Transform an occupation state to qubit basis with the Parity mapping.

Parameters:

occupation (NDArray[np.int_]) – Occupation basis state to convert.

Returns:

The qubit basis state resulting from the fermion-to-qubit mapping.

Return type:

NDArray[np.int_]

get_bk_state(occupation)#

Transform an occupation state to qubit basis with the Bravyi-Kitaev mapping.

Parameters:

occupation (NDArray[np.int_]) – Occupation basis state to convert.

Returns:

The qubit basis state resulting from the fermion-to-qubit mapping.

Return type:

NDArray[np.int_]

class HartreeFockState(occupation)#

Dataclass representing a single Hartree-Fock state.

classmethod closed_shell(electrons, spin_orbitals)#

Initialise the Hartree-Fock state for a closed-shell system.

Return type:

Self

property num_electrons: int#

Get number of electrons of Hartree-Fock state.

property num_spin_orbitals: int#

Get number of spin orbitals of Hartree-Fock state.