An efficient quantum algorithm for computing S-units and its applications | Synapse