Variational-quantum-eigensolver–inspired optimization for spin-chain work extraction | Synapse