Efficient QUBO transformation for Higher Degree Pseudo Boolean Functions