class_docstr: Version using (complex) diagonal state matrix (S4D).
class_docstr_tok: ["Version","using","(","complex",")","diagonal","state","matrix","(","S4D",")","."]
code: def forward_state(self, u, state):
      self._setup_step()
      AL = self.dA ** u.size(-1)
      u = u.flip(-1).to(self.dA).contiguous()  # (B H L)
      v = log_vandermonde_transpose(
          u, self.dB, self.dA.log(), u.size(-1)
      )
      next_state = AL * state + v
      return 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 8 for calling the SSKernelDiag obj's underlying member method code with example usage: obj.forward_state(u, state) and returns: next_state