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.
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
backendpackage, e.g.fermionic.py. This module will be similar in form withbackend.grammar,backend.tensorandbackend.quantum, and will include:backend.fermionic.Diagramwhich will inherit frombackend.quantum.Diagramand override any parts that are specific to fermionic circuits. Parts that remain the same can come from the base class unaltered.backend.fermionic.Box) and types (backend.fermionic.Ty), inheriting from the corresponding quantum classes, if required.eval()method, if required.to_tn(),to_tk(), andto_pennylane()methods, to make training with all available training backends possible.