Practical design and demonstration of algorithms for quantum devices