A state vector simulator represents every amplitude in a quantum program’s state as a vector of complex numbers. Applying gates or measurements updates this vector, potentially requiring work across all of its elements. section 9.3
Use full-state simulation with these performance considerations:
- Expect simulation time to depend heavily on the number of allocated qubits because the state-vector size grows exponentially. section 9.3
- Compare simulator timings cautiously: classical simulation work does not predict execution time on a quantum computer, where gates act physically on a few qubits. section 9.3
- Distinguish full-state behavior from sparse simulation, whose cost depends primarily on the manipulated basis states. section 9.3
Table 9.1 Simulation times for different solutions to the N queens puzzle
| Algorithm | Qiskit run time | Q# run time |
| Section 8.2 | 137 sec | 16 sec |
| Section 8.3 | < 1 sec | 20 sec |
Compare Qiskit and Q# simulation times for two implementations of the N queens puzzle. section 9.3
