where J i j describes the disorder (for spin glasses, it describes the nature of magnetic interaction between each of the individual sites i and j ) and we are taking the average over all values of the couplings described in J , weighted with a given distribution. To perform the averaging over the logarithm function, the replica trick comes in handy, in replacing the logarithm with its limit form mentioned above. In this case, the quantity Z n represents the joint partition function of n identical systems.