Optical Channel
Models for simulation of optical fiber channels.
This module introduces the abstract OpticalChannel class for general optical fibers. It also defines the QuantumChannel class for transmission of qubits/photons and the ClassicalChannel class for transmission of classical control messages. OpticalChannels must be attached to nodes on both ends.
- class sequence.components.optical_channel.ClassicalChannel(name: str, timeline: Timeline, distance: float, delay: int = -1)
Optical channel for transmission of classical messages.
Classical message transmission is assumed to be lossless.
- name
label for channel instance.
- Type:
str
- receiver
name of the node at receiving end of optical channel.
- Type:
str
- distance
length of the fiber (in m).
- Type:
float
- delay
delay (in ps) of message transmission (default distance / light_speed).
- Type:
float
- set_ends(sender: Node, receiver: str) None
Method to set endpoints for the classical channel.
This must be performed before transmission.
- Parameters:
sender (Node) – node sending classical messages.
receiver (str) – name of node receiving classical messages.
- class sequence.components.optical_channel.OpticalChannel(name: str, timeline: Timeline, attenuation: float, distance: float, polarization_fidelity: float, light_speed: float)
Parent class for optical fibers.
- name
label for channel instance.
- Type:
str
- receiver
name of the node at receiving end of optical channel.
- Type:
str
- attenuation
attenuation of the fiber (in dB/m).
- Type:
float
- distance
length of the fiber (in m).
- Type:
float
- polarization_fidelity
probability of no polarization error for a transmitted qubit.
- Type:
float
- light_speed
speed of light within the fiber (in m/ps).
- Type:
float
- init() None
Method to initialize entity (abstract).
Entity init methods are invoked for all timeline entities when the timeline is initialized. This method can be used to perform any necessary functions before simulation.
- class sequence.components.optical_channel.QuantumChannel(name: str, timeline: Timeline, attenuation: float, distance: float, polarization_fidelity: float = 1.0, light_speed: float = 0.0002, frequency: float = 80000000.0)
Optical channel for transmission of photons/qubits.
- name
label for channel instance.
- Type:
str
- receiver
name of the node at receiving end of optical channel.
- Type:
str
- attenuation
attenuation of the fiber (in dB/m).
- Type:
float
- distance
length of the fiber (in m).
- Type:
float
- polarization_fidelity
probability of no polarization error for a transmitted qubit.
- Type:
float
- light_speed
speed of light within the fiber (in m/ps).
- Type:
float
- loss
loss rate for transmitted photons (determined by attenuation).
- Type:
float
- delay
delay (in ps) of photon transmission (determined by light speed, distance).
- Type:
int
- frequency
maximum frequency of qubit transmission (in Hz).
- Type:
float
- init() None
Implementation of Entity interface (see base class).
- schedule_transmit(min_time: int) int
Method to schedule a time for photon transmission.
Quantum Channels are limited by a frequency of transmission. This method returns the next available time for transmitting a photon.
- Parameters:
min_time (int) – minimum simulation time for transmission.
- Returns:
simulation time for next available transmission window.
- Return type:
int
- set_ends(sender: Node, receiver: str) None
Method to set endpoints for the quantum channel.
This must be performed before transmission.
- Parameters:
sender (Node) – node sending qubits.
receiver (str) – name of node receiving qubits.
- time_to_timebin(time: int, frequency: float) int
- Convert simulation time to time bin.
Use the gmpy2.mpfr for high precision floating points. The precision is set to 200 bits, equivalent to around 54 significant decimal digits. The float in Python is 64 bits, equivalent to around 16 significant decimal digits.
- Parameters:
time (int) – simulation time (picoseconds) to convert.
frequency (float) – frequency of the channel.
- Returns:
time bin corresponding to the given simulation time.
- Return type:
int
- timebin_to_time(time_bin: int, frequency: float) int
- Convert time bin to simulation time (picoseconds).
Use the gmpy2.mpz for high precision integers. Use the gmpy2.mpfr for high precision floating points.
- Parameters:
time_bin (int) – time bin to convert.
frequency (float) – frequency of the channel.
- Returns:
simulation time (picoseconds) corresponding to the given time bin.
- Return type:
int