You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new pauli targets for OBSERVABLE_INCLUDE only works with stim.target_pauli but not stim.target_combiner or stim.PauliString. Instead I would have expected stim.target_combiner or stim.PauliString to be supported and not stim.target_pauli alone since it is a pauli product being included into the observable.
For example:
import stim
circuit = stim.Circuit()
obs_pauli = stim.PauliString("IXYZIIXYZ")
# Works fine
circuit.append("MPP", targets=[obs_pauli])
# ValueError: Gate OBSERVABLE_INCLUDE only takes measurement record targets and Pauli targets (rec[-k], Xk, Yk, Zk).
circuit.append("OBSERVABLE_INCLUDE", targets=[obs_pauli], arg=0)
# ValueError: Gate OBSERVABLE_INCLUDE only takes measurement record targets and Pauli targets (rec[-k], Xk, Yk, Zk).
circuit.append(
"OBSERVABLE_INCLUDE", targets=[*stim.target_combined_paulis(obs_pauli)], arg=1
)
obs_pauli_targets = []
for i in range(len(obs_pauli)):
if obs_pauli[i] != 0:
obs_pauli_targets.append(stim.target_pauli(i, obs_pauli[i]))
# Works fine
circuit.append("OBSERVABLE_INCLUDE", targets=obs_pauli_targets, arg=1)
The text was updated successfully, but these errors were encountered:
The new pauli targets for OBSERVABLE_INCLUDE only works with
stim.target_pauli
but notstim.target_combiner
orstim.PauliString
. Instead I would have expectedstim.target_combiner
orstim.PauliString
to be supported and notstim.target_pauli
alone since it is a pauli product being included into the observable.For example:
The text was updated successfully, but these errors were encountered: