Running diagnostics with the state vector simulator
In this recipe, we will explore the state vector simulator and see how you can use it to run diagnostics on your circuits to see how your qubits are behaving. The state vector simulator is not a quantum computer simulator per se, but a tool that runs through your quantum circuit with one shot and returns the qubit state vector that results. As these are simulators, you can actually use them to do diagnostic tests of your circuits without disturbing them and breaking the quantum state.
You will notice that we have used the state vector simulator before, when displaying the qubits as Bloch spheres, but we did not go into any great detail at that point. Using Bloch sphere visualization works well with single or multiple qubit visualization when each qubit has a definite simple state that can be projected on a Bloch sphere.
There is a different output—actually, several—that we will touch on. Each of these lets you...