pennylane_calculquebec.API.retry_decorator.retry

Contents

pennylane_calculquebec.API.retry_decorator.retry#

pennylane_calculquebec.API.retry_decorator.retry(retries: int = 10, initial_delay: float = 0.1, backoff_factor: float = 2.0)#

A decorator to retry a function call with exponential backoff.

Parameters:
  • retries (int) – The maximum number of retries before giving up. Default is 10.

  • initial_delay (float) – The initial delay in seconds before the first retry. Default is 0.1 seconds.

  • backoff_factor (float) – The factor by which the delay increases after each retry. Default is 2.0.

Returns:

The decorated function that will be retried on failure.

Return type:

function