I've been trying to learn a little bit of quantum computing, but I'm having a hard time understanding the concept of superposition, and how quantum computers use the concept to create more complicated code. For example in a normal computer one bit can be represented by a 1 or 0 at the machine code level, so once you write your code you will use logic such as: if( true or false) ....
How does that apply with quantum computers though? Apparently one quantum bit can be BOTH 0 and 1 at the same time? How does that translate to code?
Good question
Here at some operations that are built into the "OS" of quantum computers.
Quantum logic gate - Wikipedia
These are the equivalent of logical operations on standard computers.
You use these to build algorithms/
There is a list here:
Quantum Algorithm Zoo
How does that help general computing? If you can map your problem to a QC solution you can take advantage of the speedup.
Algorithm:
Transform your original problem to QC inputs
Init qubit(s)
Do calc (without measuring qubit(s)) - use an Oracle function
Measure qubit(s)
Verify (if possible)
Transform to solution of original classic problem
Verify (if cheap - e.g. NP)
By doing your calc in superposition you move the complexity of the solution further up this table.
-
This is a Hello World QC program
How To Solve A Problem With Quantum Computing
This is a good lecture:
-
DWAVE used quantum properties to implement a QC low point landscape function, which could theoretically be used for NP+ hard problems. I'm not sure if they used the above logical QC "instruction set".
-
Like back in the 60's with classical computers, with current QC's you need to understand physics, engineering, math(s) and comp sci
