  We proposed a general quantum-computing-based algorithm that harnesses the
exponential power of noisy intermediate-scale quantum (NISQ) devices in solving
partial differential equations (PDE). This variational quantum eigensolver
(VQE)-inspired approach transcends previous idealized model demonstrations
constrained by strict and simplistic boundary conditions. It enables the
imposition of arbitrary boundary conditions, significantly expanding its
potential and adaptability for real-world applications, achieving this "from
ad-hoc to systematic" concept. We have implemented this method using the
fourth-order PDE (the Euler-Bernoulli beam) as example and showcased its
effectiveness with four different boundary conditions. This framework enables
expectation evaluations independent of problem size, harnessing the
exponentially growing state space inherent in quantum computing, resulting in
exceptional scalability. This method paves the way for applying quantum
computing to practical engineering applications.
