<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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 % L)