Skip to main content

3 posts tagged with "Quantum"

View All Tags

· 13 min read
  1. Quantum Programming by abstracting ourselves from Quantum Mechanics: Abstraction level 0
  2. Quantum Programming - Abstraction level 1: Logic Gates
  3. Quantum Programming - Abstraction level 2: State Machine and Algorithms (this)

We have been on quite the adventure so far. Let's recap our progress.

  • We've shown that by encoding information onto n qubits in superposition, we can manipulate the whole system of 2n states by only changing the state of one qubit.
  • We represented the state of each qubit as a simple 2D vector.
  • We've established that we can change the state of a single qubit (or two) by applying different logic gates to it, similarly to a classical logic gate.
  • We can now visualise the superposed state of the qubit (indeed of the whole system) on the Bloch sphere.
  • We know how to entangle two qubits, so that their states are correlated.

Now the time has come to start putting it all together. Wouldn't it be nice to actually string some gates together, and see what happens?

Well, in order to see what happens, we might want to be able to visualise the flow of our qubits' states, so we can see how each gate manipulates each qubit at each step.

Unit circle State machine

· 14 min read
  1. Quantum Programming by abstracting ourselves from Quantum Mechanics: Abstraction level 0
  2. Quantum Programming - Abstraction level 1: Logic Gates (this)
  3. Quantum Programming - Abstraction level 2: State Machine and Algorithms

We have previously worked out that a quantum computer operates logically on qubits, which are the quantum counterparts of classical bits. We've learned that a qubit can stay in a superposition while we operate on it, and then we can collapse it into a definite state upon measurement. So, for the majority of our time spent programming on the quantum computer, we will be thinking of the qubits in their state of superposition.

What would be extremely useful for our intuition now, would be to have a way to visualise this superposition. Enter the Bloch Sphere. This tool allows us to represent the whole state-space of a single qubit in one (very simple) geometric shape - the unit sphere. Think of it as the unit circle in trigonometry.

· 10 min read
  1. Quantum Programming by abstracting ourselves from Quantum Mechanics: Abstraction level 0 (this)
  2. Quantum Programming - Abstraction level 1: Logic Gates
  3. Quantum Programming - Abstraction level 2: State Machine and Algorithms

The invention of the personal computer, and the further development of the hundreds of programming languages which utilise it has allowed us programmers to completely abstract ourselves from the world of electrons flowing through solid matter, and further from the low level programming of turning gates and transistors on and off to produce binary data.