Practical Graph Algorithms With Applications In Near-Term Quantum Computing.