code: def _create_kraus_pragmas(name, qubit_indices, kraus_ops):
      
  
      pragmas = [Pragma("ADD-KRAUS",
                        [name] + list(qubit_indices),
                        "({})".format(" ".join(map(format_parameter, np.ravel(k)))))
                 for k in kraus_ops]
      return pragmas
docs: Generate the pragmas to define a Kraus map for a specific gate on some qubits.
  
      :param str name: The name of the gate.
      :param list|tuple qubit_indices: The qubits
      :param list|tuple kraus_ops: The Kraus operators as matrices.
      :return: A QUIL string with PRAGMA ADD-KRAUS ... statements.
      :rtype: str