code: def test_qbitstensor_backward(device):
      weight = random_tensor((10,), dtype=torch.float32).to(device)
      weight.requires_grad = True
      qweight = QBitsTensor.quantize(weight)
      gradient = torch.randn((10,)).to(device)
      # Backpropagate gradient to the inner float weights
      qweight.dequantize().backward(gradient)
      assert torch.equal(weight.grad, gradient)
  
file_path: quanto/test/tensor/test_qbitstensor.py
imports: import io
  import pytest
  import torch
  from helpers import device_eq, q_assert_close, random_tensor
  from quanto import QBitsTensor, int2, int4
label_desc: Use image node_id 6 for calling a global function with example usage: test_qbitstensor_backward(device) without return types