kaira.channels.PerfectChannel

Inheritance diagram of PerfectChannel

Inheritance diagram for PerfectChannel

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

Bases: BaseChannel

Identity channel that passes signals through unchanged.

This channel represents an ideal communication medium with no distortion, noise, or interference. It simply returns the input signal as is. Perfect channels establish theoretical upper bounds on communication performance [Cover and Thomas, 2006] and serve as baselines in channel analysis [Shannon, 1948].

Mathematical Model:

y = x

Example

>>> channel = PerfectChannel()
>>> x = torch.randn(10, 1)
>>> y = channel(x)  # y is identical to x

Methods

__init__

Initialize the Perfect Channel.

forward

Transmit signal without modification (identity operation).

get_config

Get a dictionary of the channel's configuration.

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

Initialize the Perfect Channel.

Parameters:
  • *args – Variable length argument list passed to the base class.

  • **kwargs – Arbitrary keyword arguments passed to the base class.

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

Transmit signal without modification (identity operation).

Implements an ideal noiseless, distortionless channel that perfectly preserves the input signal.

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

  • *args – Additional positional arguments (unused).

  • **kwargs – Additional keyword arguments (unused).

Returns:

The input tensor without any modification.

Return type:

torch.Tensor

get_config() Dict[str, Any]

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]