Young's modulus and Poisson's ratio are crucial parameters for reservoir characterization and rock brittleness evaluation. Conventional methods often rely on indirect computation or approximations of the Zoeppritz equations to estimate Young's modulus, which can introduce cumulative errors and reduce the accuracy of inversion results. To address these issues, this paper introduces the analytical solution of the Zoeppritz equation into the inversion process. The equation is re-derived and expressed in terms of Young's modulus, Poisson's ratio, and density. Within the Bayesian framework, we construct an objective function for the joint inversion of PP and PS waves. Traditional gradient-based algorithms often suffer from low precision and the computational complexity. In this study, we address limitations of conventional approaches related to low precision and complicated code by using Circle chaotic mapping, Lévy flights, and Gaussian mutation to optimize the quantum particle swarm optimization (QPSO), named improved quantum particle swarm optimization (IQPSO). The IQPSO demonstrates superior global optimization capabilities. We test the proposed inversion method with both synthetic and field data. The test results demonstrate the proposed method's feasibility and effectiveness, indicating an improvement in inversion accuracy over traditional methods.