Quantum sampling algorithms for quantum state preparation and matrix block-encoding | Synapse