I built a complex time-space dependent error model with Qiskit, and I am simulating surface codes with such error model to test their error correction capabilities. Qiskit supplies measurement data as a dictionary of counts for each bitstring that has been observed at least once.
By reading the documentation, I noted that PyMatching can be easily interfaced with Stim to test a plethora of pre-buit surface codes, however I am reluctant to switch to that simulator, since stabiliser-based simulation does not fit my needs.
How can I extract the error syndromes from Qiskit measurement data and create a syndrome graph compatible with matching algorithms such as PyMatching?