pygsti.tools.optools.bulk_create_elementary_errorgen_nqudit

pygsti.tools.optools.bulk_create_elementary_errorgen_nqudit#

bulk_create_elementary_errorgen_nqudit(typ, basis_element_labels, basis_1q, normalize=False, sparse=False, tensorprod_basis=False)#

Construct the elementary error generator matrices, either in a dense or sparse representation, corresponding to the specified types and list of basis element subscripts.

Parameters:
  • typ (list of str) – List of strings specifying the types of error generator to be constructed. Entries can be ‘H’, ‘S’, ‘C’ or ‘A’.

  • basis_element_labels (list of lists or tuples of str) – A list containing sublists or subtuple of strings corresponding to the basis element labels subscripting the desired elementary error generators. For each sublist, if the corresponding entry of typ is ‘H’ or ‘S’ this should be length-1, and for ‘C’ and ‘A’ length-2.

  • basis_1q (Basis) – A one-qubit Basis object used in the construction of the elementary error generators.

  • normalize (bool, optional (default False)) – If True the elementary error generators are normalized to have unit Frobenius norm.

  • sparse (bool, optional (default False)) – If True the elementary error generators are returned as a sparse array.

  • tensorprod_basis (bool, optional (default False)) – If True, the returned arrays are given in a basis consisting of the appropriate tensor product of single-qubit standard bases, as opposed to the N=2^n dimensional standard basis (the values are the same but this may result in some reordering of entries).

Return type:

list of np.ndarray or Scipy CSR matrix