# Converting a qubit's state to a binary value in Q#

In Q#, How do I store a qubits state in a binary-based disk / hard drive for use by regular digital programs? Is this even possible?

• Are you asking for an exact representation not an approximation? – AHusain Jun 4 '19 at 20:17
• Exact representation – AJ_4real Jun 4 '19 at 20:48

No, it is not possible. Consider simply counting the number of possibilities. You have N bits so can only differentiate $$2^N$$ possibilities. How many possible states are there for 1 qubit if you don't do any approximation?
If you do some approximation, then you may want to store the circuit that produced the given state starting from $$| 0 \rangle$$. But that would have had gates like rotation by some angle $$\theta$$ in which case storing $$\theta$$ would be using the floating point approximation of real numbers in order to turn it into something representable with finite amount of bits.