Skip to content

aman983/QEsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QEsp

Simulating a Quanutum Computer on Esp32

What you will need

  1. Esp32
  2. SSD1306 Display module
  3. Jumper wires
  4. Bread board

How to get started!

  1. Install Thonny python IDE
    1. For Linux
      sudo apt-get install thonny
    2. For Windows/Mac Download setup from --> Here

  2. Install micro python on Esp32
    1. Refer this Video Here


  3. Install libraries for QEsp
    1. Click on tools -> manage packages
    2. Search for ssd 1306 library. Download micropython-ssd1306 library.
    3. A lib folder will be created containing ssd1306.py
    4. open the QEsp.py from the repository in Thonny and press Ctrl+Shift+s on keyboard
    5. click save on Micropython Device
    6. Go in the lib folder
    7. save in the lib folder as QEsp.py
    8. Your lib folder should look like this
    9. Run an example sketch form the repo (Before running the code make the circuit given below)

  4. Circuit connections
    1. Pin 21 to SDA
    2. Pin 22 to SCL
    3. 3.3v to VCC
    4. GND to GND

  5. How to simulate on QEsp
    1. create a circuit qc = QuantumCircuit(Number_of_qubits)

    2. Apply Quantum Gates to the Circuit
      • Pauli-X Gate : qc.x(Index_of_Qubit)
      • Hadamard Gate : qc.h(Index_of_Qubit)
      • Pauli-Z : qc.z(Index_of_Qubit)
      • Rotation Gate : qc.r(Angle_in_radians,Index_of_Qubit)
      • Controll-X Gate : qc.cx(Controll_Index,Target_Index)
      • Controll-Z Gate : qc.cz(Controll_Index,Target_Index)
      • Controll-R Gate : qc.cr(Controll_Index,Target_Index)
      • Controll-Controll-X Gate : qc.ccx(Controll_Index1,Controll_Index2,Target_Index)

    3. To measure Qubits : qc.execute()
    4. Prints a single unitary matrix : qc.unitary()
    5. Prints the current quantum state of the circuit : qc.state
    6. Prints the probability of the states : qc.prob()

*Currently You can simulate upto 5 Qubits on QEsp.

Releases

No releases published

Packages

No packages published

Languages