code: def aschannel(self) -> 'Channel':
          
          N = self.qubit_nb
          R = 4
  
          tensor = bk.outer(self.tensor, self.H.tensor)
          tensor = bk.reshape(tensor, [2**N]*R)
          tensor = bk.transpose(tensor, [0, 3, 1, 2])
  
          return Channel(tensor, self.qubits)
docs: Converts a Gate into a Channel