qkd_key_rate.utils.required_linktime module
Util functions for calculating the efficiency and communication of the two error correction protocols Winnow and Cascade.
- qkd_key_rate.utils.required_linktime.get_efficiency(method, error_rate)[source]
Calculate the efficiency of the error correction protocol.
- Parameters:
method (
str
) – the error correction protocol ('Winnow'
or'Cascade'
)error_rate (
float
) – estimated error rate
- Return type:
float
- Returns:
Efficiency of the error correction protocol
- qkd_key_rate.utils.required_linktime.get_estimate_on_communication(method, error_rate, message_length=None)[source]
Estimate on the number of communication rounds.
- Parameters:
method (
str
) – the error correction protocol ('Winnow'
or'Cascade'
)error_rate (
float
) – the error ratemessage_length (
Optional
[int
]) – Length of the message, only required for cascade protocol
- Return type:
int
- Returns:
number of communication rounds. For the Cascade only a rough upper bound can be provided.