Bsm

Models for simulating bell state measurement.

This module defines a template bell state measurement (BSM) class, as well as implementations for polarization, time bin, and memory encoding schemes. Also defined is a function to automatically construct a BSM of a specified type.

class sequence.components.bsm.AbsorptiveBSM(name, timeline, phase_error=0, detectors=None)

Class modeling a BSM device for absorptive quantum memories.

Measures photons and manages entanglement state of entangled photons.

name

label for BSM instance

Type:

str

timeline

timeline for simulation

Type:

Timeline

detectors

list of attached photon detection devices (length 2).

Type:

list[Detector]

trigger(detector: Detector, info: dict[str, Any])

See base class.

This method adds additional side effects not present in the base class.

Side Effects:

May send a further message to any attached entities.

class sequence.components.bsm.BSM(name: str, timeline: Timeline, phase_error: float = 0, detectors=None)

Parent class for bell state measurement devices.

name

label for BSM instance.

Type:

str

timeline

timeline for simulation.

Type:

Timeline

phase_error

phase error applied to measurement.

Type:

float

detectors

list of attached photon detection devices.

Type:

list[Detector]

resolution

maximum time resolution achievable with attached detectors.

Type:

int

abstractmethod get(photon, **kwargs)

Method to receive a photon for measurement (abstract).

Parameters:

photon (Photon) – photon to measure.

init()

Implementation of Entity interface (see base class).

notify(info: dict[str, Any])

Method to notify all attached observers of an update.

abstractmethod trigger(detector: Detector, info: dict[str, Any])

Method to receive photon detection events from attached detectors (abstract).

Parameters:
  • detector (Detector) – the source of the detection message.

  • info (dict[str, Any]) – the message from the source detector.

update_detectors_params(arg_name: str, value: Any) None

Updates parameters of attached detectors.

class sequence.components.bsm.PolarizationBSM(name, timeline, phase_error=0, detectors=None)

Class modeling a polarization BSM device.

Measures incoming photons according to polarization and manages entanglement.

name

label for BSM instance.

Type:

str

timeline

timeline for simulation.

Type:

Timeline

phase_error

phase error applied to measurement.

Type:

float

detectors

list of attached photon detection devices.

Type:

list[Detector]

get(photon, **kwargs)

See base class.

This method adds additional side effects not present in the base class.

Side Effects:

May call get method of one or more attached detector(s). May alter the quantum state of photon and any stored photons.

init()

Implementation of Entity interface (see base class).

trigger(detector: Detector, info: dict[str, Any])

See base class.

This method adds additional side effects not present in the base class.

Side Effects:

May send a further message to any attached entities.

class sequence.components.bsm.ShellBSM(name, timeline)
get(photon, **kwargs)

Override of abstract method. This method is intentionally left empty as ShellBSM serves as a placeholder BSM implementation. No action is performed when a photon is received.

trigger(detector: Detector, info: dict[str, Any])

Override of abstract method. This method is intentionally left empty as ShellBSM serves as a placeholder BSM implementation. No action is performed when a detector is triggered.

class sequence.components.bsm.SingleAtomBSM(name, timeline, phase_error=0, detectors=None)

Class modeling a single atom BSM device.

Measures incoming photons and manages entanglement of associated memories.

name

label for BSM instance

Type:

str

timeline

timeline for simulation

Type:

Timeline

phase_error

phase error applied to measurement.

Type:

float

detectors

list of attached photon detection devices

Type:

list[Detector]

resolution

maximum time resolution achievable with attached detectors

Type:

int

get(photon, **kwargs)

See base class.

This method adds additional side effects not present in the base class.

Side Effects:

May call get method of one or more attached detector(s). May alter the quantum state of photon and any stored photons, as well as their corresponding memories.

trigger(detector: Detector, info: dict[str, Any])

See base class.

This method adds additional side effects not present in the base class.

Side Effects:

May send a further message to any attached entities.

class sequence.components.bsm.SingleHeraldedBSM(name: str, timeline: Timeline, phase_error: float = 0, detectors: list[dict] = None, success_rate: float = 0.5)

Class modeling an abstract/simplified BSM device for single-heralded entanglement generation protocols.

We assume that in the single-heralded entanglement generation protocols,

two memories each emit one photon entangled with memory state, EG is successful only if both photons arrive at the BSM, and conditioned on both arrivals there is 1/2 probability (assuming linear optics) that the BSM can give distinguishable output, in the end whether successful EG is heralded still depends on detection (efficiency / dark counts).

In this relatively simplified model, we do not perform explicit measurement and communicate explicit outcome,

but assume that local correction based on classical feedforward is a ``free’’ operation, and successfully generated EPR pair is in Phi+ form.

This is to be aligned with analytical formulae, and note that the 4 BDS elements are in I, Z, X, Y order. The device manages entanglement of associated memories.

name

label for BSM instance.

Type:

str

timeline

timeline for simulation.

Type:

Timeline

detectors

list of attached photon detection devices.

Type:

list[Detector]

resolution

maximum time resolution achievable with attached detectors.

Type:

int

get(photon, **kwargs)

See base class.

This method adds additional side effects not present in the base class. This implementation specifically is based on expectation that if both photons arrive at the BSM simultaneously,

they will trigger both detectors simultaneously as well, if both succeed given detector efficiency, and then we can record both detection events in bsm_res of entanglement generation protocol, when update_memory is invoked at future_start_time both detector triggers should have been recorded.

Side Effects:

May call get method of one or more attached detector(s). May alter the quantum state of memories corresponding to the photons.

trigger(detector: Detector, info: dict[str, Any])

See base class.

This method adds additional side effects not present in the base class.

We assume that the single-heralded EG requires both incoming photons be detected,

thus two detector triggers are needed.

We will thus store the first trigger and see if there will be a second trigger. Only when a trigger happens and there has been a trigger existing do we notify (bsm_update) the EG protocol. TODO: verify that in this way we can record if dark count has happened.

Side Effects:

May send a further message to any attached entities.

class sequence.components.bsm.TimeBinBSM(name, timeline, phase_error=0, detectors=None)

Class modeling a time bin BSM device.

Measures incoming photons according to time bins and manages entanglement.

name

label for BSM instance

Type:

str

timeline

timeline for simulation

Type:

Timeline

detectors

list of attached photon detection devices

Type:

list[Detector]

get(photon, **kwargs)

See base class.

This method adds additional side effects not present in the base class.

Side Effects:

May call get method of one or more attached detector(s). May alter the quantum state of photon and any stored photons.

trigger(detector: Detector, info: dict[str, Any])

See base class.

This method adds additional side effects not present in the base class.

Side Effects:

May send a further message to any attached entities.

sequence.components.bsm.make_bsm(name, timeline: Timeline, encoding_type='time_bin', phase_error=0, detectors=[])

Function to construct BSM of specified type.

Parameters:
  • name (str) – name to be used for BSM instance.

  • timeline (Timeline) – timeline to be used for BSM instance.

  • encoding_type (str) – type of BSM to generate (default “time_bin”).

  • phase_error (float) – error to apply to incoming qubits (default 0).

  • detectors (list[dict[str, any]) – list of detector objects given as dicts (default []).