def to_01(samples):
    """Converts a tensor of spins from the :math:`\\sigma_i = -1, +1` convention
    to the :math:`\\sigma_i = 0, 1` convention.
    :param samples: A tensor of spins to convert.
                    Must be using the :math:`\\sigma_i = -1, +1` convention.
    :type samples: torch.Tensor
    """
    return samples.add(1.0).div(2.0)
