In actual quantum computing,qubits and quantum operations exhibit different quality characteristics,which affect the fidelity of quantum computing results.While among the quality characteristics,the error rate of controlled-NOT(CNOT)quantum gate occupies a major position.This research proposes a quantum circuit conversion method that not only satisfies the connectivity constraints but also improves fidelity.The method first finds out the qubit moving path through Floyd algorithm,and constructs a heuristic function based on the success rate of one or more two-qubit gates on the path,then select the high-fidelity switching mode in this circuit.Multiple benchmark experiments show that compared with SabreSwap and StochasticSwap algorithms in IBM Qiskit toolkit,the proposed method improves the quantum line fidelity by 39.29%and 36.06%respectively.