With the advent of quantum computers, many quantum computing algorithms are being developed. Solving linear systems is one of the most fundamental problems in almost all of science and engineering. Harrow-Hassidim-Lloyd algorithm, a monumental quantum algorithm for solving linear systems on the gate model quantum computers, was invented and several advanced variations have been developed. For a given square matrix A∈R(n×n) and a vector b∈R(n), we will find unconstrained binary optimization (QUBO) models for a vector x∈R(n) that satisfies Ax=b. To formulate QUBO models for a linear system solving problem, we make use of a linear least-square problem with binary representation of the solution. We validate those QUBO models on the D-Wave system and discuss the results. For a simple system, We provide a python code to calculate the matrix characterizing the relationship between the variables and to print the test code that can be used directly in D-Wave system.