Improved quantum algorithm for A-optimal projection