Programming correlated magnetic states with gate-controlled moiré geometry | Synapse