progress.hardware.ep_source

This module implements a source of entangled bell pairs which generates pairs according to the stochastic generation process of Midpoint Source Protocol.

class progress.hardware.ep_source.MPSSourceNode(name, p_left, p_right, num_positions, p_mid, t_clock, rng=None)[source]

Bases: Node

This node simulates the whole Midpoint source (MPS) protocols stochastic generation of entanglement. It keeps into account all the loss probabilities and only generates a pair when MPS would succeed in generating one. It is a way to implement the MPS protocol in a lightweight fashion, while maintaining all of its stochastic properties.

Parameters:
namestr

The name of this node.

p_leftfloat

The probability of successfully latching the emitted qubit on the left with the components on that side. It should keep into account the loss probability on the link and the probability of failure at the components, which is due to frequency conversion and partial BSA in the case of standard MS, or due to imperfect nDPD and absorption in the case of AFC-enhanced MS.

p_rightfloat, optional

The probability of successfully latching the emitted qubit on the right with the components on that side. If None, it is set equal to p_left. Defaults to None.

num_positionsint, optional

The number of modes of the repeaters’ quantum memories attached to the link. Defaults to 1.

p_midfloat, optional

The probability that the midpoint entangled pair source successfully emits a pair at a given clock cycle. Defaults to 1.

t_clockint or float, optional

The clock period of the MS protocols. Defaults to 1. [ns]

rngRandomState, optional

The rng used in the stochastic generation of entangled pairs.

reset(and_restart=True)[source]

Reset the status of the inner source. Should be called while the inner source is OFF.

Parameters:
and_restartbool, optional

If True, also restarts the inner source, i.e. it sets its status to INTERNAL. Defaults to True.

start()[source]

Set the status of the inner source to INTERNAL so that it starts producing entanglement.

property status

The status of the internal entangling quantum source.

Returns:
netsquid.components.qsource.SourceStatus

The status of the source

stop()[source]

Set the status of the inner source to OFF so that it stops producing entanglement.