Teleportation

Teleportation Protocol Implementation This module implements the teleportation protocol for quantum communication. It includes the core logic for Alice’s and Bob’s sides of the teleportation process, handling entangled states, and applying corrections based on classical messages.

class sequence.entanglement_management.teleportation.TeleportMessage(msg_type: TeleportMsgType, **kwargs)

Classical message used to convey the Pauli corrections (x, z) from sender to receiver during teleportation.

reservation

The reservation object associated with this teleportation message.

Type:

Reservation

bob_comm_memory_name

Name of the memory on Bob’s side to be corrected.

Type:

str

x_flip

MEASUREMENT_RESULT only, whether to apply X correction (1 for yes, 0 for no).

Type:

int

z_flip

MEASUREMENT_RESULT only, whether to apply Z correction (1 for yes, 0 for no).

Type:

int

class sequence.entanglement_management.teleportation.TeleportMsgType(*values)

Enumeration for different types of teleportation messages.

class sequence.entanglement_management.teleportation.TeleportProtocol(owner: DQCNode, alice: bool = False, data_memory_index: int = None, remote_node_name: str = None)
Core teleportation logic:
  • handle_entangled(): invoked when a comm-memory becomes ENTANGLED

  • handle_correction(): invoked when Bob receives Alice’s classical bits

NOTE: the teleport protocol is not generated by the Rule system

Can it be? Seems pretty hard to be generated by the Rule system

NOTE: this protocol is asymmetric, alice and bob behave very differently

owner

The node that owns this protocol.

Type:

DQCNode

data_memory

The name of the data memory to teleport on Alice’s side.

Type:

str

alice

Whether this protocol plays the Alice role.

Type:

bool

name

The name of the teleport protocol.

Type:

str

remote_node_name

The name of the remote node (Bob) involved in the teleportation.

Type:

str

alice_comm_memory_name

The name of the communication memory on Alice’s side.

Type:

str

alice_comm_memory

The communication memory on Alice’s side.

Type:

Memory

bob_comm_memory_name

The name of the communication memory on Bob’s side.

Type:

str

bob_comm_memory

The communication memory on Bob’s side.

Type:

Memory

alice_bell_measurement(reservation: Reservation)

Perform Bell measurement on the entangled memory and send corrections to Bob.

bob_acknowledge_complete(reservation: Reservation)

Acknowledge the completion of the teleportation process.

Parameters:

reservation (Reservation) – The reservation object associated with the teleportation.

bob_handle_correction(msg: TeleportMessage)

Handle the classical correction message from Alice. Applies the corrections to the entangled memory and notifies the app.

Parameters:

msg (TeleportMessage) – The message containing the correction bits.

received_message(src: str, msg: TeleportMessage)

Handle incoming messages, specifically teleportation corrections.

Parameters:
  • src (str) – Source of the message.

  • msg (TeleportMessage) – The teleportation message containing corrections.

set_alice_comm_memory(memory: Memory)

Set the communication memory for Alice.

Parameters:

memory (Memory) – The communication memory.

set_alice_comm_memory_name(memory_name: str)

Set the communication memory for Alice.

Parameters:

memory_name (str) – The name of the communication memory.

set_bob_comm_memory(memory: Memory)

Set the communication memory for Bob.

Parameters:

memory (Memory) – The communication memory.

set_bob_comm_memory_name(memory_name: str)

Set the communication memory for Bob.

Parameters:

memory_name (str) – The name of the communication memory.