The parity check matrix is 5x13. I run a distance three surface code with 3 rounds for each shot.

The syndrome measurement results are as follows for the first shot:

x_syndrome_1st_round = [0, 0, 0, 1, 1, 1]
x_syndrome_2nd_round = [1, 1, 0, 1, 1, 1]
x_syndrome_3rd_round = [1, 1, 1, 0, 1, 0]

So, the detection events are:

detection1 = [1, 1, 0, 0, 0, 0]
detection2 = [0, 0, 1, 1, 0, 1]

The error rate is 0.08.

I simply start coding with following script: matching = Matching.from_check_matrix(H_d3x, weights=np.log((1 - p) / p)) # H_d3x is the x parity check matrix where H_d3x is the parity_check matrix for x stabilizer in distance-3 surface code

We have a function in pymatching called decode_batch, and we can provide syndrome measurements for each shot as a 2D array input to decode_batch. However, for each shot, I am taking multiple syndrome measurements, and I do not know how to input this into pymatching.

Thank you in advance.

P.S. I have edited the question since I have understood the language conflict. I believe now the question is in better shape.

  • $\begingroup$ Why do you only have 6 bits of detection event data? A distance-3 3-round rotated X-basis surface code memory experiment has 4*4 X basis detectors including time boundaries and 2*4 Z basis detectors. So shouldn't there be 24 bits or more of detection event data in a shot? $\endgroup$ Jun 7, 2023 at 17:46
  • $\begingroup$ I defined the detection events as a change of subsequent parity check measurement, i.e at first round, I got [0,0,0,1,1,1] stabilizers measurement result and in the second round I got [1,1,0,1,1,1] so the detection events are [1,1,0,0,0,0] . 1 means the result of the measurement of the stabilizer has changed and 0 means it stayed same. I also do that for Z stabilizers too. I am using unrotated surface code $\endgroup$
    – quest
    Jun 7, 2023 at 23:21
  • $\begingroup$ should my detection even include both x and z stabilizers change? and should it be list of list? i.e [[1,1,0,0,0,0],[1,0,1,0,1,0]] first list is for detectors of X stabilizer and the second list is detector of z stabilizers? $\endgroup$
    – quest
    Jun 7, 2023 at 23:27
  • 1
    $\begingroup$ You can't do decoding one round at a time. That can't handle measurement errors. You have to present the whole problem as one big block in order for it to be fault tolerant. And although you can omit the Z detectors when correcting X, I strongly recommend against doing so because (1) it destroys correlated error information from Y errors that the decoder could have used and (2) in real situations the logical qubit is always entangled or unknown in which case you need all the stabilizers, so removing the stabilizers is highly artificial and misleading on e.g. timing benchmarks. $\endgroup$ Jun 7, 2023 at 23:36
  • $\begingroup$ So are you saying to make stabilizer measurement with a number of shot i.e 500 at each round and make decoding between number of shots of stabilizers? and then do the same for other rounds? Is that what you have said? Then the decoding events will be for those number of shots which defines the change of stabilizer measurement in one round? I am also wondering if it is possible to give stabilizer directly to the decoding function, i.e imagine that I have stabilizer result [1,0,0,0,0,0] and 500 them of the list, can I give directly to the decoding function as matching.decoding( [1,0,0,0,0,0] ) $\endgroup$
    – quest
    Jun 7, 2023 at 23:44


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.