Surface code is one of types of Quantum error correction code. Also capability of error correction of surface code depends on the code distance. As I know, if surface code's distance is 5, then it can detect up to 'd-1' (4, in this case) and correct up to '(d-1)/2' (2, in this case) errors. Is this error meaning logical-level error (error cause by logical operation applied on surface code) or physical qubit error occurred by physical error chain to apply logical operation?
Also I want to know what is the exact condition for occurring logical operation error on surface code. What I know is, logical operation can be applied to surface code by applying gates to the same number of physical qubits as code distance. What is the condition for occurring error on this logical operator?
If you have any reference (Research paper) please let me know.