tqecd.match_utils.cover.find_commuting_cover_on_target_qubits_sat#

find_commuting_cover_on_target_qubits_sat(target: PauliString, sources: list[PauliString]) list[int] | None[source]#

Try to find a set of boundary stabilizers from sources that generate a superset of target.

This function try to find a set of Pauli strings from sources that includes target (i.e., on every qubit where target is non-trivial, the product of each of the returned Pauli strings should commute with target).

If multiple valid covers exist, the covers involving the lowest number of PauliString instances from sources are listed, and a random cover is picked from that list.

The differences with find_cover_sat() are:

  1. this function does not restrict the output of the product of each of the returned Pauli string on qubits where target acts trivially (i.e. “I”). So in practice, on qubits where target[qubit] == "I", the value of the returned Pauli string can be anything.

  2. this function does not restrict the output of the product of each of the returned Pauli string to exactly match target on qubits where it acts non-trivially, but rather requires the output to commute with target on those qubits.

Parameters:
  • target – the stabilizers to cover with stabilizers from sources.

  • sources – stabilizers that can be used to cover target.

Returns:

Either a list of a stabilizers that, when combined, commute with the provided target, or None if such a list could not be found.