Header menu logo Encodings

BosonicEncoderFn Type

A function that encodes a single bosonic ladder operator into qubit Pauli strings.

Argument order: opmodeIndex jnumModestruncation dPauliRegisterSequence. That is: op -> j -> numModes -> d -> PauliRegisterSequence.

  • op: the ladder operator, Raise (b†) or Lower (b).
  • j: the 0-based bosonic mode index (0 ≤ j < numModes).
  • numModes: the total number of bosonic modes.
  • d: the Fock-space truncation (occupation levels per mode).

The result has width numModes × (qubits per mode).

Encode b†₀ (mode 0) in a 2-mode system truncated to d = 4 levels: // op j numModes d unaryBosonTerms Raise 0u 2u 4u

Type something to start searching.