# How do you build a circuit to make an equal superposition of $n$ outcomes?

Suppose we start with $$|00...0\rangle$$. We want to build an equal superposition over $$|0\rangle + ... + |n-1\rangle$$.

When $$n=2^m$$ for some $$m$$, I know I can do this using $$H^{\otimes m}$$.

What is the general circuit for this (i.e. in case $$n$$ is not power of 2)?