  Non-Abelian geometric phases acquired in cyclic quantum evolution can be
utilized as natural resources for constructing robust holonomic gates for
quantum information processing. Recently, an extensible holonomic quantum
computation (HQC) was proposed and demonstrated in a recent superconducting
experiment [T. Yan et al., Phys. Rev. Lett. 122, 080501 (2019)]. However, for
the weakly anharmonic system, this HQC was given of low gate fidelity due to
leakage to states outside of the computational subspace. Here, we propose a
scheme that to construct nonadiabatic holonomic gates via dynamical invariant
using resonant interaction of three-level superconducting quantum systems.
Furthermore, the proposed scheme can be compatible with optimal control
technology for maximizing the gate fidelity against leakage error. For
benchmarking, we provide a thorough analysis on the performance of our scheme
under experimental conditions, which shows that the gate error can be reduced
by as much as 91.7\% compared with the conventional HQC. Moreover, the leakage
rates can be reduced to $10^{-3}$ level by numerically choosing suitable
control parameter. Therefore, our scheme provides a promising way towards
fault-tolerant quantum computation in a weakly anharmonic solid-state system.
