I am currently trying to decompose a hessian to a sum of unitaries $H=\sum a_i U_i$.
The papers VQLS and Black-box Hamiltonian Simulation state that it can be done, but requires the use of an oracle acting as
$$O_F \left| j, k \right> = \left| j, f(j, k)\right>$$ for any $j \in \{1,... N\}$ and $k \in \{1, ..., D\}$, where $f(j,k)$ gives the row index of the $k$th nonzero element of column $j$.
It is also stated in the paper that this is generally not hard to contruct, yet I don't have a clue how to do that.
So, is it that trivial to implement this oracle?