neuralqx.hilbert.utils.index.dispatch module

Abstract plum-dispatch entry points for state enumeration.

Dispatch model

  1. Public calls use the core object:

    states_to_numbers(core, states, …) numbers_to_states(core, numbers, …)

  2. The core overload forwards to core.index.

  3. Concrete implementations dispatch on (index_class, core_class).

states_to_numbers(space, states, **kwargs)

Public wrapper: dispatch via space.index.

This overload intentionally avoids importing any concrete/abstract core classes to keep the dispatch layer independent of core module import order.

states_to_numbers(index: neuralqx.hilbert.utils.index._abstract.HilbertStateEnumerator, space: object, states: Any, *args, **kwargs: Any) Any

Abstract fallback for (index, core, states) dispatch.

states_to_numbers(index: neuralqx.hilbert.u1.index.enumerator.U1UnconstrainedStateEnumerator, space: neuralqx.hilbert.u1.unconstrained_core.UnconstrainedHilbertU1Core, states: Any, *args, **kwargs: Any) Any

Dispatch overload: unconstrained U(1) states -> numbers.

states_to_numbers(index: neuralqx.hilbert.u1.index.enumerator.U1ConstrainedStateEnumerator, space: neuralqx.hilbert.u1.constrained_core.ConstrainedHilbertU1Core, states: Any, *args, **kwargs: Any) Any

Dispatch overload: constrained U(1) states -> numbers.

Return type:

Any

numbers_to_states(space, numbers, **kwargs)

Public wrapper: dispatch via space.index.

This overload intentionally avoids importing any concrete/abstract core classes to keep the dispatch layer independent of core module import order.

numbers_to_states(index: neuralqx.hilbert.utils.index._abstract.HilbertStateEnumerator, space: object, numbers: Any, *args, **kwargs: Any) Any

Abstract fallback for (index, core, numbers) dispatch.

numbers_to_states(index: neuralqx.hilbert.u1.index.enumerator.U1UnconstrainedStateEnumerator, space: neuralqx.hilbert.u1.unconstrained_core.UnconstrainedHilbertU1Core, numbers: Any, *args, **kwargs: Any) Any

Dispatch overload: unconstrained U(1) numbers -> states.

numbers_to_states(index: neuralqx.hilbert.u1.index.enumerator.U1ConstrainedStateEnumerator, space: neuralqx.hilbert.u1.constrained_core.ConstrainedHilbertU1Core, numbers: Any, *args, **kwargs: Any) Any

Dispatch overload: constrained U(1) numbers -> states.

Return type:

Any