  We propose an algorithm to obtain the ground-state energy of a many-electron
system using the variational wave function of a linear combination of
antisymmetrized geminal powers. We optimized this algorithm to obtain the
energy and the other parameters of a many-electron system. Also we clarified
the bottleneck of the total calculation in the tensor contraction and
successfully reduced the computational time. As a result, we can use an
extended number of geminal states to obtain the ground state of the water
molecule and Hubbard models. The result for the water molecule with the Dunning
double-zeta basis is of the sub-milihartree order above the energy of exact
diagonalization. Further, we observe that the result for the one-dimensional
Hubbard model with 14 sites shows good tendency to capture the right ground
state and that for the two-dimensional Hubbard model still lacks some part of
the energy reflecting the large size of the Hilbert space. We conclude that the
required number of terms for geminal states for sufficiently accurate energy is
only moderately affected by the problem size. We further show other technical
details for the numerical algorithms of geminal states in the variation
process. It is expected that with the use of more extended computing resources
and larger sizes of electronic systems, our algorithm can provide improved
results.
