leakage

SimulationResult.leakage(shot='avg', t_idx=-1, basis='product')

Return the leakage from the qubit subspace.

Leakage is defined as the probability that a quantum operation results in the system leaving the qubit subspace.

Parameters:
  • shot (str | int | List[int]) – Specify the shot by its index or indices, or use 'all' or 'avg'.

  • t_idx (str | int | List[int]) – Specify the time by its index or indices, or use 'all'.

  • basis (str) – Specify the basis, must be either 'product' or 'eigen'.

Return type:

ndarray | Array

Returns:

Leakage or leakages.