code: def _to_chimera(M, N, L, q):
      "Converts a qubit's linear index to chimera coordinates."
      return (q // N // L // 2, (q // L // 2) % N, (q // L) % 2, q % Lf _to_chimera(M, N, L, q):
      "Converts a qubit's linear index to chimera coordinates."
      return (q // N // L // 2, (q // L // 2) % N, (q // L) % 2, q % L)
docs: Converts a qubit's linear index to chimera coordinates.