You could directly assign the tensors as desired, e.g.:
x = torch.randn(4, 4)
x[1, 2] = x[0, 1]

Note, that you might need to wrap it in a with torch.no_grad() guard, in case you are manipulating parameters of a model.