class_docstr: Hybrid quantum - classical function definition 
class_docstr_tok: ["Hybrid","quantum","-","classical","function","definition"]
docstr: Backward pass computation 
docstr_tok: ["Backward","pass","computation"]
code: def backward(ctx, grad_output):
      """Backward pass computation"""
      input, expectation_z = ctx.saved_tensors
      input_list = np.array(input.tolist())
  
      shift_right = input_list + np.ones(input_list.shape) * ctx.shift
      shift_left = input_list - np.ones(input_list.shape) * ctx.shift
  
      expectation_left = ctx.quantum_circuit.run(shift_left)
      expectation_right = ctx.quantum_circuit.run(shift_right)
      gradients = torch.tensor([expectation_right]) - torch.tensor(
          [expectation_left]
      )
      gradients = np.array(gradients).T
      return (
          torch.tensor(gradients).float() * grad_output.float(),
          None,
          None,
      )
  
imports: import torch
  import qiskit
  import numpy
  from lightwood.mixer.helpers.default_net import DefaultNet
  from lightwood.helpers.torch import LightwoodAutocast
label_desc: Use image node_id 2 for calling the HybridSingleFunction obj's underlying member method code with example usage: obj.backward(ctx, grad_output) and returns: unknown,  None,  None