Assume we have an n qubit system and $K \subset \{1,...,2^n\}, K \neq \emptyset $ I want to describe a circuit that takes the input $|0\rangle....|0\rangle$ to the state $|\psi\rangle = \frac{1}{\sqrt{|K|}}\sum_{k\in K} |k\rangle$
I was thinking of using Grover search to estimate $|\psi\rangle$. I believe it will work fine but this does not require us to know all of $K$ which we do. So I assume there is a better way of doing this. I hope to find a generic process that will work for every subset $K$ without any assumptions.