code: def interface(P: np.ndarray, Q: np.ndarray) -> np.ndarray:
      n = int(P.shape[1])
      S = np.matmul(
          np.linalg.inv(
              np.block(
                  [
                      [P[0:n, 0:n], -Q[0:n, 0:n]],
                      [P[n : 2 * n, 0:n], Q[n : 2 * n, 0:n]],
                  ]
              )
          ),
          np.block(
              [
                  [-P[0:n, 0:n], Q[0:n, 0:n]],
                  [P[n : 2 * n, 0:n], Q[n : 2 * n, 0:n]],
              ]
          ),
      )
      return S
  
file_path: nevergrad/nevergrad/functions/photonics/photonics.py
imports: import typing
  from pathlib import Path
  import numpy
  from scipy.linalg import toeplitz
label_desc: Use image node_id 8 for calling a global function with example usage: interface(P, Q) and returns: S