  Variational quantum algorithms have found success in the NISQ era owing to
their hybrid quantum-classical approach which mitigate the problems of noise in
quantum computers. In our study we introduce the dynamic ansatz in the
Variational Quantum Linear Solver for a system of linear algebraic equations.
In this improved algorithm, the number of layers in the hardware efficient
ansatz circuit is evolved, starting from a small and gradually increasing until
convergence of the solution is reached. We demonstrate the algorithm advantage
in comparison to the standard, static ansatz by utilizing fewer quantum
resources and with a smaller quantum depth on average, in presence and absence
of quantum noise, and in cases when the number of qubits or condition number of
the system matrix are increased. The numbers of iterations and layers can be
altered by a switching parameter. The performance of the algorithm in using
quantum resources is quantified by a newly defined metric.
