parameters: (
          self,
          lindbladian,
          optimizer,
          *args,
          variational_state: MCMixedState = None,
          preconditioner: PreconditionerT = None,
          sr: PreconditionerT = None,
          sr_restart: bool = None,
          **kwargs,
      )
docstring: Initializes the driver class.
  
          Args:
              lindbladian: The Lindbladian of the system.
              optimizer: Determines how optimization steps are performed given the
                  bare energy gradient.
              preconditioner: Determines which preconditioner to use for the loss gradient.
                  This must be a tuple of `(object, solver)` as documented in the section
                  `preconditioners` in the documentation. The standard preconditioner
                  included with NetKet is Stochastic Reconfiguration. By default, no preconditioner
                  is used and the bare gradient is passed to the optimizer.
docstring_summary: Initializes the driver class.
docstring_tokens: Initializes the driver class .
function: def __init__(
          self,
          lindbladian,
          optimizer,
          *args,
          variational_state: MCMixedState = None,
          preconditioner: PreconditionerT = None,
          sr: PreconditionerT = None,
          sr_restart: bool = None,
          **kwargs,
      ):
          """
          Initializes the driver class.
  
          Args:
              lindbladian: The Lindbladian of the system.
              optimizer: Determines how optimization steps are performed given the
                  bare energy gradient.
              preconditioner: Determines which preconditioner to use for the loss gradient.
                  This must be a tuple of `(object, solver)` as documented in the section
                  `preconditioners` in the documentation. The standard preconditioner
                  included with NetKet is Stochastic Reconfiguration. By default, no preconditioner
                  is used and the bare gradient is passed to the optimizer.
          """
          if variational_state is None:
              variational_state = MCMixedState(*args, **kwargs)
  
          if not isinstance(lindbladian, AbstractSuperOperator):
              raise TypeError("The first argument must be a super-operator")
  
          if sr is not None:
              if preconditioner is not None:
                  raise ValueError(
                      "sr is deprecated in favour of preconditioner kwarg. You should not pass both"
                  )
              else:
                  preconditioner = sr
                  warn_deprecation(
                      (
                          "The `sr` keyword argument is deprecated in favour of `preconditioner`."
                          "Please update your code to `SteadyState(.., precondioner=your_sr)`"
                      )
                  )
  
          if sr_restart is not None:
              if preconditioner is None:
                  raise ValueError(
                      "sr_restart only makes sense if you have a preconditioner/SR."
                  )
              else:
                  preconditioner.solver_restart = sr_restart
                  warn_deprecation(
                      (
                          "The `sr_restart` keyword argument is deprecated in favour of specifiying "
                          "`solver_restart` in the constructor of the SR object."
                          "Please update your code to `SteadyState(.., preconditioner=nk.optimizer.SR(..., solver_restart=True/False))`"
                      )
                  )
  
          # move as kwarg once deprecations are removed
          if preconditioner is None:
              preconditioner = identity_preconditioner
  
          super().__init__(variational_state, optimizer, minimized_quantity_name="LdagL")
  
          self._lind = lindbladian
          self._ldag_l = Squared(lindbladian)
  
          self.preconditioner = preconditioner
  
          self._dp = None
          self._S = None
          self._sr_info = None
function_tokens: def __init__ ( self , lindbladian , optimizer , * args , variational_state : MCMixedState = None , preconditioner : PreconditionerT = None , sr : PreconditionerT = None , sr_restart : bool = None , * * kwargs , ) : if variational_state is None : variational_state = MCMixedState ( * args , * * kwargs ) if not isinstance ( lindbladian , AbstractSuperOperator ) : raise TypeError ( "The first argument must be a super-operator" ) if sr is not None : if preconditioner is not None : raise ValueError ( "sr is deprecated in favour of preconditioner kwarg. You should not pass both" ) else : preconditioner = sr warn_deprecation ( ( "The `sr` keyword argument is deprecated in favour of `preconditioner`." "Please update your code to `SteadyState(.., precondioner=your_sr)`" ) ) if sr_restart is not None : if preconditioner is None : raise ValueError ( "sr_restart only makes sense if you have a preconditioner/SR." ) else : preconditioner . solver_restart = sr_restart warn_deprecation ( ( "The `sr_restart` keyword argument is deprecated in favour of specifiying " "`solver_restart` in the constructor of the SR object." "Please update your code to `SteadyState(.., preconditioner=nk.optimizer.SR(..., solver_restart=True/False))`" ) ) # move as kwarg once deprecations are removed if preconditioner is None : preconditioner = identity_preconditioner super ( ) . __init__ ( variational_state , optimizer , minimized_quantity_name = "LdagL" ) self . _lind = lindbladian self . _ldag_l = Squared ( lindbladian ) self . preconditioner = preconditioner self . _dp = None self . _S = None self . _sr_info = None