Hey I created this simple example, slicing seems to propagate the gradients:
a = torch.tensor([2., 3, 3], requires_grad = True)
b = torch.tensor([6., 4, 2], requires_grad = True)
Q = 3*a**3 - b**2
# slice and assign
x = Q[1:3]
# call backward
x.sum().backward()
print(a.grad)
print(b.grad)

Output is:
tensor([ 0., 81., 81.])
tensor([-0., -8., -4.])

which shows that gradients have been computed