kaira.modulations.IdentityModulator

Inheritance diagram of IdentityModulator

Inheritance diagram for IdentityModulator

class kaira.modulations.IdentityModulator(*args, **kwargs)[source]

Bases: BaseModulator

Identity modulator that passes input data through unchanged.

This modulator implements the BaseModulator interface but doesn’t perform any actual modulation. It’s useful as a no-op placeholder in pipelines or for testing.

constellation

Trivial constellation points [0, 1]

Type:

torch.Tensor

Methods

__init__

Initialize the identity modulator.

forward

Modulate bits to symbols as required by BaseModulator.

modulate

Pass input bits through unchanged.

plot_constellation

Plot the constellation diagram.

reset_state

Reset any stateful components.

Attributes

bits_per_symbol

Number of bits per symbol.

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

Initialize the identity modulator.

Parameters:
  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

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

Modulate bits to symbols as required by BaseModulator.

Parameters:
  • x – Input tensor of bits with shape (…, N)

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

Returns:

The same tensor, unchanged, with shape (…, N)

modulate(bits: Tensor) Tensor[source]

Pass input bits through unchanged.

Parameters:

bits – Input tensor of bits with any shape

Returns:

The same tensor, unchanged

plot_constellation(**kwargs)[source]

Plot the constellation diagram.

Parameters:

**kwargs – Additional arguments for plotting

Returns:

Matplotlib figure object

property bits_per_symbol: int

Number of bits per symbol.

reset_state() None

Reset any stateful components.

For modulators with memory (like differential schemes).