Quantum superposition enables the inherent parallelism of quantum computing, which demonstrates great potential for solving specific problems, but its practical implementation is hindered by high susceptibility to noise. Therefore, encoding logical qubits with quantum error-correcting codes and implementing universal quantum operations on these logical qubits is a feasible way toward fault-tolerant quantum computing. Because its stabilizers involve only neighboring qubits, the surface code achieves a high fault-tolerance threshold, making it a leading class of topological quantum error-correcting codes. The 2D surface code is well-suited for implementing Clifford-group gates, whereas the 3D surface code natively supports transversal non-Clifford gates such as CCZ and CZ. In this work, to fully leverage the transversal gates of both 2D and 3D surface codes, we present a scheme for implementing fault-tolerant quantum computation via code conversion.
By studying the structure and stabilizers of the 3D surface code, this paper designs encoding circuits through stabilizer implementation, followed by time-slot optimization to reduce circuit depth and improve fidelity. Simulation results confirm the correctness and superiority of the encoding circuit design. We demonstrate the realization of a transversal CZ gate and, building on the respective transversal gates of the two surface codes, propose a fault-tolerant universal quantum computation framework based on code conversion. During quantum circuit design, frequent alternation between CCZ gates, H gates, and CNOT gates across differently-colored surface codes should be avoided. Throughout fault-tolerant computation, quantum operations should be executed as extensively as possible within a single surface code. A switch to another surface code should only occur when encountering an operation that cannot be executed transversally. Furthermore, we present a code conversion scheme that enables dynamic switching between 2D and 3D encodings during computation. This scheme, based on lattice merging and splitting operations, is illustrated with a code distance of 3. In this process, two surface codes are first merged through the initialization of data qubits along with the measurement and correction of auxiliary stabilizers. Subsequently, the logical information is transferred to the target surface code via logical measurements performed on the original surface code and correcting operations applied to the target surface code.
Limited by the qubit availability in the Qiskit platform, the proposed schemes were validated through simulations of distance-2 codes, which successfully demonstrated correct encoding and bidirectional conversion between 2D and 3D logical states. Our results indicate that the hybrid approach leverages the efficiency of 2D codes for Clifford operations and the transversal capabilities of 3D codes for non-Clifford gates. This work provides a new pathway toward fault-tolerant universal quantum computation.