Quantum Information Processing: Foundations - Part 3
Introduction Having laid out some mathematical foundations in the [previous part][1], we will proceed to discuss quantum gates and circuits in depth here. As usual, we will drive home the theories with worked examples from [@Rieffel2011] and check their accuracy with qiskit and/or cirq code. Prerequisite Understanding quantum gates and circuits will be greatly aided by the knowledge of classical gates (AND, OR, NOT, XOR and the universal gates: NAND and NOR). Also, some familiarity with the Python programming language will help you understand qiskit and/or cirq code. Classical & Quantum gates A classical computer, possibly the one you're reading this with, is a sophisticated engineering piece, no doubt. However, the underlying "magic" comprises logic gates. The National Institute of Standards and Technology (NIST) gives this incredible analogical description of classical computers in relation to logic gates [@NISTQGATE2026]: Traditional computers are like microscopic cities. The roads of these cities are wires with electricity coursing through them. These roads have lots of gates, known as logic gates, which enable computers to do their job. Like physical gates that allow or block cars, logic gates allow or block electricity. Electricity that goes through the gates represents a “1” of digital data, and blocked electricity is a “0.” When you pick up a motherboard, for instance, you may not see the said gates as they are made of tiny transistors (in modern systems, MOSFETs) in specific combinations. Also, the $0$ and $1$ referred to in the analogy mean low and high voltage ranges, respectively. Their actual voltage values depend on the hardware. :::note All schematics were written in and rendered by @schemd/core . Check it out. ::: Logic Gates refresher Since we will be realizing some classical circuits using quantum gates, it's necessary to get familiar with common logic gates. NOT ($\neg$) Gate This gate takes a single classical bit and flips it. For instance, if $0