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 oftarget
.This function try to find a set of Pauli strings from
sources
that includestarget
(i.e., on every qubit wheretarget
is 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
PauliString
instances fromsources
are 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
target
acts 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
target
on qubits where it acts non-trivially, but rather requires the output to commute withtarget
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
, orNone
if such a list could not be found.