BosonicEncoderFn Type
A function that encodes a single bosonic ladder operator into qubit Pauli strings.
Argument order: op → modeIndex j → numModes → truncation d
→ PauliRegisterSequence. That is:
op -> j -> numModes -> d -> PauliRegisterSequence.
op : the ladder operator,Raise (b†) orLower (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).
// op j numModes d
unaryBosonTerms Raise 0u 2u 4u