I'm trying to simulate error correction with the Floquet Color Code. On the torus, this code has two logical qubits. For efficiency, I'm want to simulate two commuting logical operators at the same time - a product of Pauli Xs along the x direction of the torus and along the y direction. However, I find that the logical error rate for the x direction is different when I simulate the y logical at the same time compared to when I simulate the x logical alone.
The two stim files are available here - note they are identical up to the logical measurement of the y operator at the end and OBSERVABLE_INCLUDE instructions for y. This is the code I'm using to determine the logical error rates:
import stim
import pymatching
import numpy as np
filename = 'x_y_logical.stim' # or 'x_logical.stim'
circ = stim.Circuit.from_file(filename)
shots = 1000000
model = circ.detector_error_model(decompose_errors=True)
matching = pymatching.Matching.from_detector_error_model(model)
sampler = circ.compile_detector_sampler()
syndrome, actual_observables = sampler.sample(shots=shots, separate_observables=True)
predicted_observables = matching.decode_batch(syndrome)
num_errors = np.sum(predicted_observables != actual_observables, axis=0)
log_err_rate = num_errors / shots
print("logical error_rate", log_err_rate)
When run on x_y together the result is approximately [0.189516 0.207379], and for x alone it is [0.197398].