quantax.nn.Sequential#

class quantax.nn.Sequential#

Bases: Module

A sequence of equinox.Module applied in order similar to Sequential in Equinox.

__init__(layers: Sequence[Callable], holomorphic: bool = False)#
Parameters:
  • layers – A sequence of equinox.Module.

  • holomorphic – Whether the whole network is a complex holomorphic function, default to False.

Note

The users are responsible to ensure the given holomorphic argument is correct.

__call__(x: Any, *, s: Array | None = None) → NDArray | Array | LogArray | ScaleArray#

The forward pass applying all layers in order.

Parameters:
  • x – The input passed to the first layer.

  • s – The raw input basis state forwarded to every RawInputLayer. Defaults to x, which is the raw input for a full network.

Returns:

The output of the last layer.