Header menu logo Encodings

Terms Module

Core algebraic types for representing quantum operator expressions.

This module defines a three-level algebraic hierarchy for building Hamiltonian expressions:

  • A coefficient-operator pair representing a complex scalar times a single operator unit. For example: 0.5 × a†₂ (half times creation operator on mode 2).
  • A product of coefficient-operator pairs, representing an ordered sequence of operators. For example: a†₁ a₂ a†₃ a₄ (a string of creation/annihilation operators).
  • A sum of products, representing a full Hamiltonian: H = Σᵢ hᵢ Pᵢ. This is the standard form for quantum chemistry Hamiltonians.

The type parameter 'unit represents the atomic operator type—either LadderOperatorUnit for fermionic second-quantized operators (a†, a) or PauliRegister for qubit Pauli strings (I, X, Y, Z).

Operators support tensor product (*) and sum (+) operations to build complex expressions.

Types

Type Description

C<'unit>

A coefficient-operator pair: a complex coefficient times a single operator unit.

P<'unit>

A product of coefficient-operator pairs: an ordered sequence of operators with an overall coefficient.

S<'unit>

A sum of products: the standard form for expressing quantum Hamiltonians.

Type something to start searching.