You're reading the documentation of the 0.3. For the latest released version, please have a look at 0.4.

merlin.core.computation_space module

Computation space definitions controlling logical basis selection.

class merlin.core.computation_space.ComputationSpace(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: str, Enum

Enumeration of supported computational subspaces.

DUAL_RAIL = 'dual_rail'
FOCK = 'fock'
UNBUNCHED = 'unbunched'
classmethod coerce(value)

Normalize user-provided values (enum instances or case-insensitive strings).

Parameters:

value (ComputationSpace | str) – Enum instance or case-insensitive string value.

Returns:

Normalized computation space value.

Return type:

ComputationSpace

Raises:

ValueError – If value does not match a supported computation space.

classmethod default(*, no_bunching)

Derive the default computation space from the legacy flag.

Parameters:

no_bunching (bool) – Legacy flag indicating whether bunching should be disallowed.

Returns:

Default computation space matching the legacy behavior.

Return type:

ComputationSpace