  Partial differential equations (PDEs) are crucial for modeling various
physical phenomena such as heat transfer, fluid flow, and electromagnetic
waves. In computer-aided engineering (CAE), the ability to handle fine
resolutions and large computational models is essential for improving product
performance and reducing development costs. However, solving large-scale PDEs,
particularly for systems with spatially varying material properties, poses
significant computational challenges. In this paper, we propose a quantum
algorithm for solving second-order linear PDEs of non-conservative systems with
spatially varying parameters, using the linear combination of Hamiltonian
simulation (LCHS) method. Our approach transforms those PDEs into ordinary
differential equations represented by qubit operators, through spatial
discretization using the finite difference method. Then, we provide an
algorithm that efficiently constructs the operator corresponding to the
spatially varying parameters of PDEs via a logic minimization technique, which
reduces the number of terms and subsequently the circuit depth. We also develop
a scalable method for realizing a quantum circuit for LCHS, using a
tensor-network-based technique, specifically a matrix product state (MPS). We
validate our method with applications to the acoustic equation with spatially
varying parameters and the dissipative heat equation. Our approach includes a
detailed recipe for constructing quantum circuits for PDEs, leveraging
efficient encoding of spatially varying parameters of PDEs and scalable
implementation of LCHS, which we believe marks a significant step towards
advancing quantum computing's role in solving practical engineering problems.
