For per channel see https://github.com/pytorch/tutorials/blob/master/advanced_source/static_quantization_tutorial.py 8
and for norm you can use something like the following:
SQNR = []
for i in range(len(ref_output)):
   
    SQNR.append(20*torch.log10(torch.norm(ref_output[i][0])/torch.norm(ref_output[i][0]-qtz_output[i][0])).numpy())

print('SQNR (dB)', SQNR)