Skip to content

Devices

A device pairs a TransmissionAlgorithm or a ReceptionAlgorithm with other physical characteristics.

Device

The base Device class consists of a SpatialDistribution that is sampled whenever the device is placed in an environment.

spatial_distribution: SpatialDistribution property

Get the device's spatial distribution.

Returns The device's spatial distribution.

__init__(spatial_distribution=None)

Create a new device with a spatial_distribution.

Parameters:

Name Type Description Default
spatial_distribution SpatialDistribution | None

A Callable that randomly samples Positions. Defaults to None. If None, a null SpatialDistribution is used, which always returns Position(x=0, y=0, z=0).

None

place()

Sample a Position from the device's spatial distribution.

Returns A Position randomly sampled according to the device's spatial distribution.

Receiver

Bases: Device

A Device that receives signals from the environment.

__call__(signal)

Invoke the underlying ReceptionAlgorithm to produce a Reception dictionary.

Parameters:

Name Type Description Default
signal Tensor

Input signal from the environment.

required

Returns:

Type Description
Reception

A dictionary the summarizes various aspects of the received signal. Common keys for reconstructive receivers include 'bit_probabilities' and 'bits'.

__init__(algorithm, spatial_distribution=None)

Create a new Receiver from an algorithm and a spatial distribution.

Parameters:

Name Type Description Default
algorithm ReceptionAlgorithm

A Callable that produces Receptionss.

required
spatial_distribution SpatialDistribution | None

A Callable that randomly samples Positions. Defaults to None. If None, a null SpatialDistribution is used, which always returns Position(x=0, y=0, z=0).

None

parameters()

Get the receiver's trainable parameters.

Returns The receiver's trainable parameters. An empty iterator is returned if the receiever does not have trainable parameters.

Transmitter

Bases: Device

A Device that transmits signals into the environment.

__call__(n_timesteps, batch_size=1)

Invoke the underlying TransmissionAlgorithm to produce a Tranmission.

Parameters:

Name Type Description Default
n_timesteps int

Number of timesteps to transmit for.

required
batch_size int

How many simulations to conduct in parallel.

1

Returns:

Type Description
Transmission

A Transmission with a complex-valued signal with shape [batch_size, n_timesteps].

__init__(algorithm, spatial_distribution=None, max_gain=None)

Create a new Transmitter from an algorithm and a spatial distribution.

Parameters:

Name Type Description Default
algorithm TransmissionAlgorithm

A Callable that produces Transmissions.

required
spatial_distribution SpatialDistribution | None

A Callable that randomly samples Positions. Defaults to None. If None, a null SpatialDistribution is used, which always returns Position(x=0, y=0, z=0).

None
max_gain float | None

A saturation limit on transmissions. The real and imaginary components of transmitted signals are capped to max_gain.

None

parameters()

Get the transmitter's trainable parameters.

Returns The transmitter's trainable parameters. An empty iterator is returned if the transmitter does not have trainable parameters.