Quantum logic gates

Introduction

Quantum mechanics in a nutshell

Classic logic gates and circuits

NAND gate
XOR gate
OR gate
AND gate
Flip-flop using AND and NOR gates; each individual gate can be implemented using NAND gates

Qubits, quantum gates and quantum circuits

void processInput(int data) {//do some classic stuff then:   initQubits(data);
applyHadamard();

for (int i = 0; i < 3; i++) {

applyPauli(i);
}
...
}
Quantum circuit for Shor’s algorithm (Bender2k14 / CC BY-SA (https://creativecommons.org/licenses/by-sa/4.0))

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store