<p>Quantum computers much like classical ones can with n bits present 2^n different values. Shor's algorithm at the "Period-finding subroutine" uses two registers, possibly as big as <code>2n + 1</code> where n is number of bits needed to represent the number to factor. In total you need <code>4n + 2</code> qubits to run Shor's algorithm.</p>

<p>There was some work done on <a href="https://arxiv.org/abs/quant-ph/0205095" rel="nofollow noreferrer">lowering the qubit requirements</a>. That implementation works with just <code>2n + 3</code> qubits for general number.</p>

<p>To asnwer your question, you would need 4 classical (or quantum) bits to represent 15 and thus want 62 qubits with the basic algorithm (you would possibly not use some). There are of course some workarounds on this and there were <a href="http://cryptome.org/shor-nature.pdf" rel="nofollow noreferrer">successfull experimental implementations</a> that used as few as 7 qubits because of special properties of 15 known beforehand, but that cannot be used on general number factored with Shor's algorithm.</p>

<p>When you simulate quantum computer on classical one, you usually want to represent it with state space where each base state corresponds with one possible output. This needs <code>2^n</code> dimensional vectors of imaginary numbers, the actual number of bits depends on your implementation of vectors and imaginary numbers.</p>
How many qubits do I need to factor 15 using shor's algorithm?
<p>According to <a href="https://stackoverflow.com/questions/4595156/software-simulation-of-a-quantum-computer">this</a>, I understand we need 4^n bits to simulate an n-qubit quantum computer. I was wondering if it's possible to simulate shor's algorithms on a classical computer to factor 15? How many qubits is required to factor 15 using shor's algorithm?</p>