localuf.sim.latency

Functions

frugal(ds, noise_levels, n, code_class, noise)

Make latency data Snowflake.

localuf.sim.latency.frugal(ds, noise_levels, n, code_class, noise, time_only='merging', get_commit_height=None, get_buffer_height=None, **kwargs_for_Snowflake)[source]

Make latency data Snowflake.

Parameters:
  • ds (Iterable[int]) – an iterable of surface code distances.

  • noise_levels (Iterable[float]) – an iterable of noise levels.

  • n (int) – sample count.

  • code_class (Type[Code]) – the class of the code.

  • noise (Literal['phenomenological', 'circuit-level']) – the noise model.

  • time_only (Literal['all', 'merging', 'unrooting']) – whether runtime includes a timestep for each drop, each grow, and each merging step (‘all’); each merging step only (‘merging’); or each unrooting step only (‘unrooting’).

  • get_commit_height (Callable[[int], int] | None) – a function with input d that outputs commit height. If None, commit height is 1.

  • get_buffer_height (Callable[[int], int] | None) – a function with input d that outputs buffer height. If None, buffer height is 2*(d//2).

  • kwargs_for_Snowflake – passed to Snowflake e.g. merger decides whether Snowflake’s nodes flood before syncing (fast) or vice versa (slow) in a merging step.

Output: data a DataFrame where each column a (distance, probability); row, a latency sample.