Once the matrix \(A\)  is decomposed, a parameterized quantum state \(| \psi (\theta ) \rangle \)  is prepared using an ansatz represented by a sequence of quantum gates \(U(\theta )\)  parameterized by \(\theta \)  applied to a basis state \(| 0 \rangle ^{\otimes n}\) , such that \(| \psi (\theta ) \rangle  = U(\theta ) | 0 \rangle ^{\otimes n}\) . Here, we use a hardware-efficient ansatz consisting of multiple layers of \(R_Y\)  gates across \(n\)  qubits entangled by controlled-\(X\)  gates (see fig:hardwareefficientansatz). For the source term \(f\)  in (REF ), a quantum state \(| b \rangle \)  is prepared by encoding a real vector with the unitary \(U_b\) , such that \(| b \rangle  = U_b | 0 \rangle ^{\otimes n}\) . Depending on the actual input, conventional amplitude encoding methods [1]}, [2]} may introduce a global phase that must be corrected by its complex argument for computing in the real space.
<FIGURE>