Skip to content

AasaSingh05/ACM-Quantum-Computing-Task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Making a quantum circuit that adds three qubits together

(i assumed this is like a full adder circuit for three qubits)

By Aasa Singh Bhui ( 23BBS0025 )

Documentation of my process:

  • Started by reading up about qubits and their represenation in a matricular form
  • Went to IBM's website to read up about qiskit
  • Found a lesson on the basics of quantum computing and basic gates with circuits
  • Read up the blogs on each and decided to try making a sample circuit
  • Opened up the circuit lab and played around with the interface finding new gates to read up about
  • Tried making a smaller (half adder) using the CNOT gates
  • Scaled up to the full adder with the CNOT and toffoli gates

FORMULA FOR THE CIRCUIT:

  • SUM = X (xor) Y (xor) Z
  • CARRY = XY (xor) YZ (xor) XZ

LOGIC:

  • We encode each of the inputted values into a 3 digit binary number
  • We use controlled-NOT gates to implement the binary addition logic. The target qubit is the qubit where the result will be stored (qubit 3 in our case), and the control qubits are the qubits representing the bits of the numbers to be added.
  • we apply the same logic but with toffoli gates to take account the carry of the circuit
  • we measure the output to take the value of the SUM and CARRY of the two inputs

Circuit diagram:

Screenshot 2024-03-25 123800

Logic table of the circuit:

x y z Carry Sum
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1

OUTPUT: ( Test Case )

image

sources:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages