Programmable photonic system for quantum simulation in arbitrary topologies | Synapse