# mqt.ionshuttler.linear.validation

Checks for groups of transports that start together in a Linear schedule.

## Module Contents

### is_transport_layer_valid(state: [State](../state/index.html.md#mqt.ionshuttler.linear.state.State), actions: [Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)[[TransportAction](../actions/index.html.md#mqt.ionshuttler.linear.actions.TransportAction)], architecture: [LinearArchitecture](../architecture/index.html.md#mqt.ionshuttler.linear.architecture.LinearArchitecture)) → [bool](https://docs.python.org/3/builtins/functions.html#bool)

Return whether several transports can safely happen together.

An ion may enter a site that another ion leaves in the same group, provided
every ion ends at a different valid site. Two shuttles may not exchange
their sites; a physical swap describes that operation.

* **Raises:**
  [**TypeError**](https://docs.python.org/3/builtins/exceptions.html#TypeError) – If an action is not a Linear shuttle or physical swap.

### is_transport_valid_in_layer(state: [State](../state/index.html.md#mqt.ionshuttler.linear.state.State), action: [TransportAction](../actions/index.html.md#mqt.ionshuttler.linear.actions.TransportAction), actions: [Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)[[TransportAction](../actions/index.html.md#mqt.ionshuttler.linear.actions.TransportAction)], architecture: [LinearArchitecture](../architecture/index.html.md#mqt.ionshuttler.linear.architecture.LinearArchitecture)) → [bool](https://docs.python.org/3/builtins/functions.html#bool)

Return whether one transport of a layer can start in a state.

The other ions that act in the layer do not block the transport, so it may
enter a site that one of these ions leaves. Use
[`is_transport_layer_valid()`](#mqt.ionshuttler.linear.validation.is_transport_layer_valid) to check the layer as a whole.

* **Parameters:**
  * **state** – State in which the transport starts.
  * **action** – Transport to check.
  * **actions** – Every transport of the layer, including `action`.
  * **architecture** – Hardware model that defines the transport rules.
* **Returns:**
  Whether the transport can start.
