Skip to content

UCL-CCS/ferrmion

Repository files navigation

Release CICD Documentation Status DOI

ferrmion

This codebase contains methods to generate optimised qubit Hamiltonians from fermionic Hamiltonians.

Encodings

Majorana-string Encodings

  • Ternary Tree encodings

    Any ternary tree can be generated by adding nodes to a tree structure, and functions exist to easily create standard encodings including: Jordan-Wigner, Parity, Bravyi-Kitaev and JKMN

  • MaxNTO encoding

    A non-ternary-tree majorana string encoding with the maximal non-trivial overlap possible. Only works for systems with even numbers of modes (i.e. all spin-orbit Hamiltonians)

Linear Combinations of Fock States

Given a MajoranaStringEncoding, you can construct its equivalent representation as a linear combination of Fock states.

Encoding Optimizations

Ternary Trees

Majorana-string Encodings

Hamiltonians

Arbitrary fermionic Hamiltonians can be built with the FermionHamiltonian class in ferrmion.hamiltonians. Additionally there are named functions for:

  • Molecular Hamiltonian (Born-Oppenheimer Approximation)
  • Hubbard Hamiltonian (3D Square lattice)

See the example notebook for more information.

Pauli Hamiltonian Optimization

Interop

Most quantum SDKs will have methods to convert common python types to native objects, so it's usually possible to create an operator using the .edge_operator and number_operator functions of a FermionQubitEncoding.

Please open an issue or pull request on github if you would like to suggest a documented interop.

Qiskit

ferrmion provides a method to convert its narive encoding class FermionQubitencoding to a qiskit_nature.QubitMapper.

To use this feature, you'll need to install optional dependencies with:

pip install ferrmion[qiskit]

For more details, see the interop documentation.

Development

For information on development, check out the project documentation.

If you find an error in the code or documentation, please raise an issue on the GitHub Repo.