I'm trying to see how HHL does on a series of matrices coming from a linear problem I'm interested in. These matrices are always square, real, and symmteric. They are not, however, very often exactly a power of 2. In Qiskit's old HHL implementation, they had a class parameter
truncate_powerdim that seemed to handle this case, but no such option exists in the current source.
As an example, let's consider the case of a 15x15 matrix. Then, of the $2^4$ possible qubit states, one of them is not a valid dimension of our computation. Since we get to construct our mapping to qubits, let's just say that the
1111 state is the one we want to ignore. It seems silly then, to do the standard QPE starting routine of putting an arbitrary superposition over 16 states rather than the 15 states we know will actually be valid. It's not at all obvious to me how to produce a uniform distribution over a (non-power of 2) subset of states. Does anyone have any suggestion for how to do this in Qiskit?
Also, for the matrix and vector defining the linear system, is it a valid operation to just pad them with zeros corresponding to states outside of the dimension of the system?
Ultimately, I'm hoping for a solution that doesn't involve too much re-inventing the wheel and that uses the available resources in qiskit or other qSDKs.
Thanks for the help!