Skip to content

Add free fermions support to lambeq circuits #244

@dimkart

Description

@dimkart

In a free-fermionic circuit, each box is replaced by a matchgate under the Jordan-Wigner transformation. This allows us to efficiently evaluate the diagram using covariance matrices and quadratic Hamiltonians.

See "Fermionic Gaussian states: an introduction to numerical approaches"

The natural place to add fermionic circuits support in lambeq is a new module in the backend package, e.g. fermionic.py. This module will be similar in form with backend.grammar, backend.tensor and backend.quantum, and will include:

  • A new class backend.fermionic.Diagram which will inherit from backend.quantum.Diagram and override any parts that are specific to fermionic circuits. Parts that remain the same can come from the base class unaltered.
  • New definitions for boxes (backend.fermionic.Box) and types (backend.fermionic.Ty), inheriting from the corresponding quantum classes, if required.
  • New definitions for all quantum gates that change in the fermionic backend.
  • New definitions for special boxes such as cups, caps, spiders, and swaps, when required.
  • New eval() method, if required.
  • New to_tn(), to_tk(), and to_pennylane() methods, to make training with all available training backends possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions