FockMap

FockMap logo

A composable functional framework for symbolic operator algebra, including fermionic and bosonic normal ordering, mixed-sector canonicalization, and fermion-to-qubit encodings.

Build, normalize, and encode operator expressions on Fock space using algebraic data types, pure functions, and zero dependencies.

Install

dotnet add package FockMap

Brand Assets

30-Second Example

open Encodings

// Encode the creation operator a†₂ on 4 modes using Jordan-Wigner
let pauli = jordanWignerTerms Raise 2u 4u
// → ½(ZZXI) − ½i(ZZYI)

// Same operator under Bravyi-Kitaev (O(log n) weight)
let pauliBK = bravyiKitaevTerms Raise 2u 4u

Why This Library?

Feature OpenFermion Qiskit Nature FockMap
Define a new encoding ~200 lines Not supported 3–5 lines
Tree → encoding pipeline
Type-safe operator algebra
Pure functional, zero mutation
Symbolic CAR + CCR normal ordering Partial

Available Encodings

Encoding Worst-Case Weight Function
Jordan-Wigner $O(n)$ jordanWignerTerms
Bravyi-Kitaev $O(\log_2 n)$ bravyiKitaevTerms
Parity $O(n)$ parityTerms
Balanced Binary Tree $O(\log_2 n)$ balancedBinaryTreeTerms
Balanced Ternary Tree $O(\log_3 n)$ ternaryTreeTerms

Cross-Platform

Runs on Windows, macOS, and Linux via .NET 10 (LTS). Written in F#, fully open-source under the F# Software Foundation and the .NET Foundation.

Learn More

Explore the Docs

From Molecules to Qubits

A step-by-step guide using H₂ as a worked example.

Theory

Interactive Labs

Guides