quantax.nn.Sequential#
- class quantax.nn.Sequential#
Bases:
ModuleA sequence of
equinox.Moduleapplied 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
holomorphicargument 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 tox, which is the raw input for a full network.
- Returns:
The output of the last layer.