Consider the modified version of the Traveling Salesman Problem where you are searching for a path of length less than some $k$. We can solve this problem using Grover's search where we encode each one of the possible paths as a quantum state and then search for the ones that have length less than $k$.
The oracle for this problem is supposed to add the weights of the edges in the given path, check if the total weight is less than $k$ and output 1 if it is the case. How can one construct an oracle for this problem? Is there a practical implementation? How and where to encode the weights of the edges?