Skip to main content
IBM Quantum Platform

Mapper Library

This module provides the boson-to-qubit mappers.

occupation_encoding() maps a BosonOperator in the occupation (Fock) basis, truncating each mode and laying its levels out on qubits as a LevelSpec describes.

A bosonic encoding is not an algebra isomorphism: a bosonic mode’s Fock space is infinite-dimensional and must be truncated first, which breaks the canonical commutation relation on the highest retained level. See occupation_encoding() for the exact statement and its consequences.

Column 1
Column 2
occupation_encoding(op, spec[, num_qubits])Map a BosonOperator to a SparseObservable.
Was this page helpful?
Report a bug, typo, or request content on GitHub.