|
|
|
|
|
by Walther
2426 days ago
|
|
Thank you for feedback! Going to read the paper to improve my understanding. I'm writing this blog series in part to learn more - both about quantum computing as well as Rust. As some people say, teaching is a great way to learn (or at least check your knowledge). What do you think would be a good correction or disclaimer to add? Would it be sufficient to e.g. say that in this first part, we only implement a two-component ket? Generalizing the ket type to an arbitrary-size vector while keeping type constraints, perhaps briefly mentioning const generics (an upcoming language feature), etc could easily make for another part in this series. Making the ket into an actual vector could then give way to doing proper linear algebra on them, cleaning up some of the manually implemented operations here, as their teaching purpose has been fulfilled already. Thoughts? |
|
|s> = p|0> + q|1>
where p and q are complex, and |p|^2 + |q|^2 = 1. The ket is the notation |s>, |1>, and |0>, which could also be written purely as column vectors.
At the end it all depends on what you want to present. What will be the climax? Unitary evolution of a pure state? Superoperators on a mixed state? An introduction to linear algebra used in quantum computation and its notation?
In any case I’d present what a quantum state is on N qubits, which requires 2^N-element complex vectors that satisfy a few properties.