  Recently J. M. Arrazola et al. [Phys. Rev. A 100, 032306 (2019)] proposed a
quantum algorithm for solving nonhomogeneous linear partial differential
equations of the form $A\psi(\textbf{r})=f(\textbf{r})$. Its nonhomogeneous
solution is obtained by inverting the operator $A$ along with the preparation
and measurement of special ancillary modes. In this work we suggest
modifications in its structure to reduce the costs of preparing the initial
ancillary states and improve the precision of the algorithm for a specific set
of inputs. These achievements enable easier experimental implementation of the
quantum algorithm based on nowadays technology.
