  As the leading candidate of quantum error correction codes, surface code
suffers from significant overhead, such as execution time. Reducing the
circuit's execution time not only enhances its execution efficiency but also
improves fidelity. However, finding the shortest execution time is NP-hard.
  In this work, we study the surface code mapping and scheduling problem. To
reduce the execution time of a quantum circuit, we first introduce two novel
metrics: Circuit Parallelism Degree and Chip Communication Capacity to
quantitatively characterize quantum circuits and chips. Then, we propose a
resource-adaptive mapping and scheduling method, named Ecmas, with customized
initialization of chip resources for each circuit. Ecmas can dramatically
reduce the execution time in both double defect and lattice surgery models.
Furthermore, we provide an additional version Ecmas-ReSu for sufficient qubits,
which is performance-guaranteed and more efficient. Extensive numerical tests
on practical datasets show that Ecmas outperforms the state-of-the-art methods
by reducing the execution time by 51.5% on average for double defect model.
Ecmas can reach the optimal result in most benchmarks, reducing the execution
time by up to 13.9% for lattice surgery model.
