Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qpico

Simulating a Quanutum Computer on Raspberry pi Pico

What you will need

  1. Raspberry pi pico
  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 pico
    1. Refer this Video Here


  3. Install libraries for Qpico
    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 simulator.py from the repository in Thonny and press Ctrl+Shift+s on keyboard
    5. click save on raspberry pi pico
    6. Go in the lib folder
    7. save in the lib folder as qpico.py
    8. Run an example sketch form the repo (Before running the code make the circuit given below)

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

  5. How to simulate on Qpico
    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 Qpico.

About

Simulating a Quantum Computer on Raspberry pi Pico

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages