base_estimator¶
- class cryptographic_estimators.base_estimator.BaseEstimator(alg, prob, **kwargs)¶
Bases:
object
Construct an instance of BaseEstimator.
- Parameters:
alg – Specialized algorithm class (subclass of BaseAlgorithm).
prob – Object of any subclass of BaseProblem.
**kwargs –
Additional keyword arguments.
excluded_algorithms (list or tuple) - A list/tuple of excluded algorithms. Default: None.
memory_access (int) - Specifies the memory access cost model. Default: 0. Choices: 0 - constant, 1 - logarithmic, 2 - square-root, 3 - cube-root or deploy custom function which takes as input the logarithm of the total memory usage.
complexity_type (int) - Complexity type to consider. Default: 0. 0: estimate, 1: tilde O complexity.
bit_complexities (int) - State complexity as bit rather than field operations. Default: 1. Only relevant for complexity_type 0.
include_tildeo (int) - Specifies if tildeO estimation should be included in the outputs. Default: 0. 0: no tildeO estimation.
include_quantum (int) - Specifies if quantum estimation should be included in the outputs. Default: 0. 0: no quantum estimation.
- algorithm_names()¶
Return a list of the name of considered algorithms.
- algorithms()¶
Return a list of considered algorithms.
- property bit_complexities¶
Returns a list of bit_complexities attributes of included algorithms.
- property complexity_type¶
Returns a list of complexity_type attributes of included algorithms.
- estimate(**kwargs)¶
Returns dictionary describing the complexity of each algorithm and its optimal parameters.
- property estimator_type¶
Returns the type of the estimator.
Either problem or scheme
- excluded_algorithms_by_default = []¶
- fastest_algorithm(use_tilde_o_time=False)¶
Return the algorithm with the smallest time complexity.
- Parameters:
use_tilde_o_time (bool) – Use Ō time complexity, i.e., ignore polynomial factors. Default is False.
- property memory_access¶
Returns a list of memory_access attributes of included algorithms.
- nalgorithms()¶
Return the number of considered algorithms.
- reset()¶
Resets the internal states of the estimator and all included algorithms.
- table(show_quantum_complexity=False, show_tilde_o_time=False, show_all_parameters=False, precision=1, truncate=False)¶
Print table describing the complexity of each algorithm and its optimal parameters.
- Parameters:
show_quantum_complexity (bool) – Show quantum time complexity. Defaults to False.
show_tilde_o_time (bool) – Show Ō time complexity. Defaults to False.
show_all_parameters (bool) – Show all optimization parameters. Defaults to False.
precision (int) – Number of decimal digits output. Defaults to 1.
truncate (bool) – Truncate rather than round the output. Defaults to False.