This does not present the correct definition of a ket. More specifically, it doesn’t present a reasonably general definition of a ket. It would be like asking “What is a list?” and implementing a data structure that can store only one element.<p>In quantum computation, a ket is a vector in a Hilbert space. A Hilbert space is just a fancy way to describe a typical space you find in linear algebra, where the space allows you to compute lengths and angles. When discussing kets, the usual vector space is the set of complex-element vectors with unit length (or “norm”). The vectors can have any number of elements (or “dimension”), but when discussing qubits, they are 2^n-dimensional for n qubits.<p>(It’s important to note that a ket is not distinguishable from a vector. It’s actually called so because of a notational convention, not because it has deeper underlying meaning. However, physicists will still use the word “ket” instead of “vector” or “quantum state” even if they’re not emphasizing notation.)<p>More interesting, though, is how kets combine with other kets via tensor products. This ingredient is as essential to QC as flour is to cake.<p>This article [0] informally presents a fully general definition of a ket along with the tensor product with an emphasis on why a representation and notation was chosen. But it does require a good understanding of linear algebra already.<p>[0] “Someone shouts |01000>! Who’s excited?” <a href="https://arxiv.org/abs/1711.02086" rel="nofollow">https://arxiv.org/abs/1711.02086</a>