Reordering and Partitioning of Distributed Quantum Circuits