qkd_key_rate.base.message module

Base class for Message object.

class qkd_key_rate.base.message.Message(message)[source]

Bases: object

Message object

apply_permutation(permutation)[source]

Apply a permutation to the message

Parameters:

permutation (List[int]) – The permutation that is applied

property length: int

Length of message

Return type:

int

message: Union[List[int], List[str], str]
pop(index=-1)[source]

Remove bit at a specific index from message

Return type:

int

classmethod random_message(message_length)[source]

Generate a random message

Parameters:

message_length (int) – Length of random message

Return type:

Message

Returns:

random message