jsqis, at its core, is a quantum computer simulator written in Javascript. It allows initialization of quantum registers and their manipulation by means of quantum gates.
Additionally, when used in the browser, jsqis provides a lucid visual representation of a system of quantum bits (qubits). This representation is mathematically precise, allowing people to reason about quantum computing without having mastered any topics in mathematics.
In the language of mathematics, we do this by enumerating all the computational basis states and, beside each basis state, displaying its amplitude (which is a complex number) using a simple graphical representation.
A single bit can be in either of two classical states, zero or one.
A quantum bit can also be in an equal superposition of those two states.
Not only that, but the states can have a relative phase difference.
And they can of course have different amplitudes as well.
When a quantum bit is measured, it will assume a definite value (either zero or one). The probability that the bit will be measured in a given state is proportional to the area of the corresponding box.
In addition to the arrow representing the relative phase, we color code it as well, choosing a continuous hue based on an amplitude's phase. This is redundant (as the arrow already encodes the full information), but stresses the fact that phase information is incredibly important in quantum mechanics.
Just as in the mathematical representation of quantum mechanics, our states are invariant up to a change in overall magnitude and global phase. In other words, it is the relative difference between the sizes and the directions of the arrows that matter. For instance, the following states are all equivalent.
The various states of a single qubit can be understood in terms of photon polarization. Unfortunately, these animations can take quite a bit of CPU time, so this page only enables them when you hover the mouse over a given element.
We define the states 0 and 1 to be represented by vertically- and horizontally-polarized photons, respectively.
A an equal weighted superposition can then be in many different states. If the phases point in parallel directions, we will get diagonal polarization.
Other possibilities include left and right circular polarization.
Elliptical polarization is also possible.
Any other one-qubit quantum state can be represented this way as well.