Quantum Computing Series -2

Boolean operators and Logic Gates

Basic Math behind quantum computing

Mohana Priya.T
3 min readDec 2, 2024

Quantum programs are ta series of quantum gates on a circuit. Behaviour of these quantum gates are described by matrices of complex numbers.

To understand this properly, we need to discuss the concept of boolean statements, boolean operators and logic gates.

Boolean statements are statements which are TRUE or FALSE. Hence True/False are considered Boolean values. Boolean Algebra Operators allows symbolic manipulation (without thinking about the real world meaning of the statement). These include AND, OR, NOT etc.

Precedence sequence of the operators

  1. NOT — This flips the value of the statements. If statement was true, it becomes false and vice-versa
  2. AND — This can be compared the Multiplication operator in maths
  3. OR — Using the similar analogy, this can be compared to Addition operator

Logic Gates — These are the building blocks for contstructing circuits that evaluate boolean expressions. These can be considered to be the symbolic representation of the above operators.

Here, TRUE = 1 = Circuit ON

FALSE = 0 = Circuit OFF.

Truth tables help us analyse inputs given and their respective outputs. A table listing every possible input and the corresponding output.

Truth Table and representation of NOT Gate . Source
Source
Source

Specific rules for solving

  1. NOT( A OR B) = NOT(A) AND NOT (B)
  2. NOT ( A AND B) = NOT(A) OR NOT (B)
  3. NOT (NOT (A)) = A

This is similar to the De Morgan’s Laws we learn in highschool!

This covers the basic gates used. Now to the weird ones.

NAND GATE

This is an NOT+AND gate. It performs the AND operation then flips the output.

Source :Byjus
Source

The NAND gate is so called the UNIVERSAL GATE. Does this suprisingly hide the secrets to the creation of the universe? No, sadly it doesn’t. What it does have is the capability to change into the other operators by some simple functions.

Example :-

NOT from NAND

Source

AND from NAND

OR from NAND

Source

Hence it the gate to the universe of Logic Gates…

In the next blog we will be talking about another logic gate XOR..So keep your eyes peeled!

--

--

Mohana Priya.T
Mohana Priya.T

Written by Mohana Priya.T

MP. T is a blogger, student and a perpetual day dreamer 😊 Check out her STEM blogs at https://mohanapriyawrites.wixsite.com/newtonsapple

No responses yet