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
sourcesthat generate a superset oftarget.This function try to find a set of Pauli strings from
sourcesthat includestarget(i.e., on every qubit wheretargetis non-trivial, the product of each of the returned Pauli strings should commute withtarget).If multiple valid covers exist, the covers involving the lowest number of
PauliStringinstances fromsourcesare listed, and a random cover is picked from that list.The differences with
find_cover_sat()are:this function does not restrict the output of the product of each of the returned Pauli string on qubits where
targetacts trivially (i.e. “I”). So in practice, on qubits wheretarget[qubit] == "I", the value of the returned Pauli string can be anything.this function does not restrict the output of the product of each of the returned Pauli string to exactly match
targeton qubits where it acts non-trivially, but rather requires the output to commute withtargeton 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, orNoneif such a list could not be found.