kaira.channels.BaseChannel

Inheritance diagram of BaseChannel

Inheritance diagram for BaseChannel

class kaira.channels.BaseChannel(*args: Any, **kwargs: Any)[source]

Bases: Module, ABC

Base abstract class for communication channel models.

In communications theory, a channel refers to the medium through which information is transmitted from a sender to a receiver. This class provides a foundation for implementing various channel models that simulate real-world effects like noise, fading, distortion, and interference.

All channel implementations should inherit from this base class and implement the forward method, which applies the channel effects to the input signal.

Channel models are implemented as PyTorch modules, allowing them to be: - Used in computational graphs - Combined with neural networks - Run on GPUs when available - Included in larger end-to-end communications system models

Methods

__init__

Initialize the base channel.

forward

Transform input signal according to channel characteristics.

get_config

Get a dictionary of the channel's configuration.

__init__(*args: Any, **kwargs: Any)[source]

Initialize the base channel.

Parameters:
  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

abstractmethod forward(x: Tensor, *args: Any, **kwargs: Any) Tensor[source]

Transform input signal according to channel characteristics.

This method defines how the channel transforms an input signal, which may include adding noise, applying fading, introducing hardware impairments, or other effects specific to the channel model.

Parameters:
  • x (torch.Tensor) – The input signal.

  • *args – Additional positional arguments.

  • **kwargs – Additional keyword arguments.

Returns:

The output signal after passing through the channel.

Return type:

torch.Tensor

get_config() Dict[str, Any][source]

Get a dictionary of the channel’s configuration.

This method returns a dictionary containing the channel’s parameters, which can be used to recreate the channel instance.

Returns:

Dictionary of parameter names and values

Return type:

Dict[str, Any]