Skip to content

Fast, easy and optimised fermion-qubit encodings for quantum simulation.

License

Notifications You must be signed in to change notification settings

UCL-CCS/ferrmion

Repository files navigation

Release CICD Documentation Status DOI

ferrmion

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

Why use ferrmion?

Reduced Circuit Depth

By reducing the average Pauli-weight of operators in the output hamiltonian, circuit depth can be improved without changing the underlying encoding.

Transpiled circuit depth for the qDRIFT algorithm, showing reductions of 25-30% for various qubit encodings.

It's fast!

Hamiltonians up to 40 qubits currently take less than 1 second to optimise.

TOPP-HATT runtime vs number of fermionic modes.

for more detail see our paper.

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.

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 encodings

    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)

Optimizations

Enumeration Scheme

Ternary Trees

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.

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.

Contributors 2

  •  
  •