  Equivalence checking of quantum circuits is an essential element in quantum
program compilation, in which a quantum program can be synthesized into
different quantum circuits that may vary in the number of qubits,
initialization requirements, and output states. Verifying the equivalences
among the implementation variants requires proper generality. Although
different notions of quantum circuit equivalence have been defined, prior
methods cannot check observational equivalence between two quantum circuits
whose qubits are partially initialized, which is referred to as partial
equivalence. In this work, we prove a necessary and sufficient condition for
two circuits to be partially equivalent. Based on the condition, we devise
algorithms for checking quantum circuits whose partial equivalence cannot be
verified by prior approaches. Experiment results confirm the generality and
demonstrate the efficiency and effectiveness of our method. Our result may
unleash the optimization power of quantum program compilation to take more
aggressive steps.
