class_docstr: Version using (complex) diagonal state matrix (S4D).
class_docstr_tok: ["Version","using","(","complex",")","diagonal","state","matrix","(","S4D",")","."]
code: def step(self, u, state):
      next_state = contract(
          "h n, b h n -> b h n", self.dA, state
      ) + contract("h n, b h -> b h n", self.dB, u)
      y = contract("c h n, b h n -> b c h", self.dC, next_state)
      return 2 * y.real, next_state
  
imports: import logging
  import math
  import os
  from functools import wraps
  from typing import Any, Callable, Optional
  import numpy
  import opt_einsum
  import torch
  import torch.nn
  import torch.nn.functional
  from einops import rearrange, repeat
  from espnet2.asr.state_spaces.components import Activation, DropoutNd, LinearActivation
label_desc: Use image node_id 7 for calling the SSKernelDiag obj's underlying member method code with example usage: obj.step(u, state) and returns: unknown,  next_state