  With the steady progress in quantum computing over recent years, roadmaps for
upscaling quantum processors have relied heavily on the targeted qubit
architectures. So far, similarly to the early age of classical computing, these
designs have been crafted by human experts. These general-purpose
architectures, however, leave room for customization and optimization,
especially when targeting popular near-term QC applications. In classical
computing, customized architectures have demonstrated significant performance
and energy efficiency gains over general-purpose counterparts. In this paper,
we present a framework for optimizing quantum architectures, specifically
through customizing qubit connectivity. It is the first work that (1) provides
performance guarantees by integrating architecture optimization with an optimal
compiler, (2) evaluates the impact of connectivity customization under a
realistic crosstalk error model, and (3) benchmarks on realistic circuits of
near-term interest, such as the quantum approximate optimization algorithm
(QAOA) and quantum convolutional neural network (QCNN). We demonstrate up to
59% fidelity improvement in simulation by optimizing the heavy-hexagon
architecture for QAOA circuits, and up to 14% improvement on the grid
architecture. For the QCNN circuit, architecture optimization improves fidelity
by 11% on the heavy-hexagon architecture and 605% on the grid architecture.
