  Quantum process tomography is a critical task for characterizing the dynamics
of quantum systems and achieving precise quantum control. In this paper, we
propose a two-stage solution for both trace-preserving and non-trace-preserving
quantum process tomography. Utilizing a tensor structure, our algorithm
exhibits a computational complexity of $O(MLd^2)$ where $d$ is the dimension of
the quantum system and $ M $, $ L $ represent the numbers of different input
states and measurement operators, respectively. We establish an analytical
error upper bound and then design the optimal input states and the optimal
measurement operators, which are both based on minimizing the error upper bound
and maximizing the robustness characterized by the condition number. Numerical
examples and testing on IBM quantum devices are presented to demonstrate the
performance and efficiency of our algorithm.
