## Go Quantum - Talk Overview

This is the video for the October 2023 London Gophers meetup, where I delivered my talk, *Go Quantum*.

The talk is a 20-minute introduction to quantum computing and how to simulate quantum computing algorithms on classical architecture in Go. These are the main areas covered:

### Intro to Quantum Computing Theory

Quantum computers leverage the complexity of quantum mechanics to perform calculations. A qubit (basically any particle that must have one of two contradictory properties) can be expressed as a probability of being in one state, and the probability of it being in the other:

$$ \ket{\Psi} = \alpha\ket0 + \beta\ket1 $$Measuring the state of a qubit collapses its quantum superposition, and it results in a simple binary value.

Quantum logic gates perform operations on qubits. Quantum Computing is like logic gate circuit design, except with more
complicated gates. One of the things you can do with quantum logic gates is *entangle* qubits, meaning that their fates
are mathematically intertwined. Measuring a single entangled qubit affects its cousins. This allows for interactions
between bits which are so complex that the normal relationship between the time taken to solve a maths problem and the
size of the problem instance breaks down. Different rules of Complexity Theory apply. There are implications in a number
of fields, including cryptanalysis.

### Quantum Computing in Practice

IBM Qiskit provides a simulator written in Python. It can also integrate with real quantum hardware. Google has a similar tool called Cirq. A variety of companies including IBM, IonQ and D-Wave offer quantum computing as a service. Implementations include:

- Trapped ions - atoms kept prisoner in a magnetic field
- Supercooled superconductors - tiny electrical circuits at absolute zero. Electricity moving clockwise vs anti-clockwise ‘means’ 0 or 1
- Photonics - getting photons to do cool stuff in tiny fibre optics.

### Quantum Computing Simulation in Go

The talk ends with an overview of the itsubaki/q library on Github, which is for simulating quantum computing algorithms on normal classical hardware. The library is written in Go. It lets you design a quantum circuit implementing any algorithm:

```
qsim := q.New()
// generate qubits of |0>|0>
q0 := qsim.Zero()
q1 := qsim.Zero()
// apply quantum circuit
qsim.H(q0).CNOT(q0, q1)
for _, s := range qsim.State() {
fmt.Println(s)
}
// [00][ 0]( 0.7071 0.0000i): 0.5000
// [11][ 3]( 0.7071 0.0000i): 0.5000
m0 := qsim.Measure(q0)
m1 := qsim.Measure(q1)
fmt.Println(m0.IsZero() == m1.IsZero()) // always true
for _, s := range qsim.State() {
fmt.Println(s)
}
// [00][ 0]( 1.0000 0.0000i): 1.0000
// or
// [11][ 3]( 1.0000 0.0000i): 1.0000
```

## Summary

Overall it was a little nerve wracking, giving a talk about quantum computing. It required several months of study to produce about 25 minutes of content. London Gophers is a wonderful usergroup with great organisers and a very welcoming atmosphere, however, which made for a pleasant experience. I’m hoping to go back sometime soon.