FockTruncation

class hybridlane.measurements.base.FockTruncation

Bases: Truncation

Truncation in Fock space up to a desired photon count

For each wire, a size should be provided indicating the dimension of that subsystem. If no size is provided for a wire, it is defaulted to 2 (a qubit).

Note that we allow continuous-variable bases in the schema even though we have a hard system-size cutoff in Fock space. This is because someone might want to simulate position measurements while truncating the maximum energy of a qumode.

basis_schema: BasisMap

Schema holding the basis for each wire

dim_sizes: dict[Hashable, int]

Mapping from wires to their truncated system dimension

dim(wire)

Returns the hilbert dimension of a wire

classmethod all_fock_space(wires, dim_sizes)

Constructs a FockTruncation for all wires in the system

Parameters: