Unifying time evolution and optimization with matrix product states | Synapse