BosonicEncoding Module
Bosonic-to-qubit encodings: Unary, Binary, and Gray code.
Maps bosonic ladder operators (b†, b) acting on truncated Fock spaces to qubit Pauli strings. Each bosonic mode is truncated to d occupation levels (n ∈ {0, 1, …, d−1}) and encoded into qubits using one of three strategies:
Unary (one-hot): d qubits per mode, Pauli weight ≤ 2. Standard binary: ⌈log₂ d⌉ qubits per mode, Pauli weight ≤ ⌈log₂ d⌉. Gray code: ⌈log₂ d⌉ qubits per mode, improved average Pauli weight.
Reference: Sawaya, Menke, Kyaw, Johri, Aspuru-Guzik, Guerreschi — "Resource-efficient digital quantum simulation of d-level systems for photonic, vibrational, and spin-s Hamiltonians" (arXiv:1909.05820).
Types
| Type | Description |
|
A function that encodes a single bosonic ladder operator into qubit Pauli strings. |
Functions and values
| Function or value |
Description
|
|
Standard binary bosonic encoding.
Uses ⌈log₂ d⌉ qubits per bosonic mode. Fock state |n⟩ maps to the standard binary representation of n. The operator matrix is decomposed into Pauli strings via O = Σ_P (Tr(PO) / 2^q) P. Maximum Pauli weight: ⌈log₂ d⌉.
|
Full Usage:
binaryQubitsPerMode d
Parameters:
int
Returns: int
|
Number of qubits used by the binary or Gray code encoding for a given cutoff d.
|
|
Gray code bosonic encoding.
Uses ⌈log₂ d⌉ qubits per bosonic mode. Fock state |n⟩ maps to the reflected Gray code G(n) = n ⊕ (n ≫ 1). Consecutive Fock states differ in exactly one qubit, reducing the average Pauli weight of transition operators. Maximum Pauli weight: ⌈log₂ d⌉.
|
Full Usage:
unaryBosonTerms op j numModes d
Parameters:
LadderOperatorUnit
j : uint32
numModes : uint32
d : uint32
Returns: PauliRegisterSequence
|
Unary (one-hot) bosonic encoding.
Uses d qubits per bosonic mode. Fock state |n⟩ is mapped to the qubit state with exactly one qubit (qubit n) in |1⟩. The creation operator is decomposed algebraically as: b† = Σₙ √(n+1) σ⁺_{n+1} σ⁻_n, giving weight-2 Pauli terms. Total Pauli terms per operator: 4(d−1). Maximum Pauli weight: 2.
|
Full Usage:
unaryQubitsPerMode d
Parameters:
int
Returns: int
|
Number of qubits used by the unary encoding for a given cutoff d.
|