# Visualizing quantum states and dynamics

Visually capturing the evolution of a quantum mechanical system is notoriously difficult, especially when including the effect of noise and imperfections in real hardware. We’ve built fully interactive 3D tools to help you build real intuition for what’s really happening inside a quantum computer.

## The Bloch sphere

One of the most common representations of the state of a qubit is the Bloch Sphere. We can mathematically map an arbitrary qubit state to a point on the surface of a sphere. Our 3D coordinate system is labeled “xyz” and has its origin at the center of the sphere. All Bloch Spheres you see in our products are fully interactive and may be manipulated by clicking and dragging.

The north and south poles (aligned with the “z” axis) represent the “0” and “1” basis states for the qubit, and the equatorial plane corresponds to an infinite set of equal superpositions of these qubit basis states. For instance a state pointing along the x-axis is represented:

\begin{align} \ket{+x} = \frac{1}{\sqrt{2}}\left(\ket{0}+\ket{1}\right) \end{align}

## Control operations

Any operation which changes the qubit’s state - such as those which constitute an algorithm run on a quantum computer - can be represented as a rotation of the Bloch vector on the surface of the sphere.

For instance a Hadamard operation takes one basis state and transforms it into an equal superposition of both basis states.

But there’s more than one way to achieve the same rotation! Here, for instance, is a Hadamard gate implemented using a noise-suppressing Q-CTRL solution. The extra arcs defining this specific control solution are what gives robustness against noise. ## Visualizing the effect of noise

Noise and imperfections are the achilles heel of NISQ-era quantum computers, so understanding what noise does is essential. In our tools you can explore how realistic hardware noise processes can impact quantum logic in quantum computers. Choose to activate control amplitude noise or ambient dephasing and examine how the qubit state’s evolution changes.  The difference between the noisy and noise-free state evolutions show just how much impact simple hardware imperfections can have on real quantum computers!

## Visualizing circuits

In the Visualization workspace you can build circuits from a time sequence of control operations and change the qubit’s starting state to explore how quantum logic operations are manifested as rotations on the Bloch Sphere. ## Visualizing entanglement between qubits

To help you build intuition for entanglement we’ve developed a succinct visual framework in order to efficiently illustrate and animate the dynamic evolution of the state of entangled qubits. Technical details of this representation appear here.

The Bloch sphere is restricted to the single-qubit control setting. For two qubits a pair of Bloch spheres easily represents a “separable” state. But adding non-classical entanglement - believed to be a key resource in quantum computing - renders the Bloch spheres useless by themselves. We therefore add three tetrahedra which capture the presence of correlations between the Cartesian (X-Y-Z) projections of the individual qubit states. The correlations indicate that one cannot describe the state of either qubit independently, only the joint state of both qubits.

In this framework maximally entangled Bell states are represented as states at the extrema of the tetrahedra with Bloch vectors shrinking to zero in the middle of the Bloch sphere. Other states reside in the joint space of the correlation tetrahedra and the Bloch spheres and are manipulated by quantum gates just like in a Bloch sphere

We also include a visual indicator of the presence of entanglement, mathematically representing the Concurrence for the two qubit system. In the above example, as soon as the entangling gates begin this indicator becomes illuminated and represents the degree of entanglement between the two qubits. You can visualize the interaction of two-qubit entangling gates within complex circuits using our new circuit editor tool. Just drag-and-drop controls into the circuit editor, set the input state for each qubit independently, and watch the system evolve in time. You’ll even gain insights into some scenarios where applying entangling gates doesn’t result in entanglement!