# 2018-06-13

Okay, a week or so but some interesting stuff.

I've started a collection of the interview problems I've been given. I've
gotten through *most* of them (I think) in the interviews but they're fun to
polish up and have around to think about. I'm doing them in both C++ and Go,
I've got the first one done (and fixed a bug my interviewer and I didn't
realize I had), so that's cool.

On to the more interesting stuff: *quantum computing*. I'm reading Quantum
Computing for Computer
Scientists;
the nice thing about this book is that it opens with two chapters on the
pre-requisite math. Between that and Maths for
ML, I'm
getting a good handle on the linear algebra I need to move forward with my
skills. My quantum computing book shelf is slowly growing...

As for programming quantum... things..., I've been toying with the Microsoft Quantum SDK and pyQuil simulators, though I've only written a simple entanglement demo:

```
program bell is
ones, zeroes, agree ← 0
repeat 1000x:
qubits[2]
H(qubits[0])
CNOT(qubits[0], qubits[1])
measure(qubits)
increment ones if qubits[0] is 1 otherwise increment zeroes
increment agree if qubits[0] == qubits[1]
expectations:
ones ≈ zeroes
agree = ones + zeroes
```

I think I understand how this works:

- the Hadamard gate puts the first qubit into a state of superposition
- the second qubit is initialised to zero
- the CNOT gate toggles the second qubit only if the first qubit is 1

This is sort of a weak entanglement, but it *does* tie the value of the second
qubit to the first.

I'm still on the second chapter of the QC for CS book ("Complex Vector Spaces"), but I'm making steady progress.

Still ahead on the CS course, too --- I was able to get a lecture or two in Monday morning, and I anticipate getting some done tonight. Or maybe I'll do more maths. Probably maths, if I'm being honest... I will say that the CS course was surprisingly useful during some of my interview questions, so I'm interested to see how it makes me a better programmer and engineer overall.