Menu

Experiments in quantum computing

2023-09-24
2023-09-24
  • Edward A Soard

    Edward A Soard - 2023-09-24

    Still very much a work in progress and this is just the test output of the python front end, but I'm a little under 1200 lines of GC Basic code into this project. The next step is to test entangleent which will involve getting two devices to communicate with each other. The code is written. Just need to test it.

    Quantum machine state:
    GateID: 0, I2C Address: 0x3f, Gate Type: Hadamard, Vector: α|0.70703>, β|0.70703>

    Obtaining box and inserting cat and radioactive device...
    Quantum machine state:
    GateID: 0, I2C Address: 0x3f, Gate Type: Init, Vector: α|0.00000>, β|1.00000>

    Closing box...
    Quantum machine state:
    GateID: 0, I2C Address: 0x3f, Gate Type: Hadamard, Vector: α|0.70703>, β|0.70703>

    Superposition achieved...
    Opening box...
    0: Dead cat.
    0: Dead cat.
    0: Dead cat.
    0: Dead cat.
    1: Safe cat.
    1: Safe cat.
    1: Safe cat.
    0: Dead cat.
    Adding output Gate 19, I2C Address: 0x36
    Quantum machine state:
    GateID: 0, I2C Address: 0x3f, Gate Type: Hadamard, Vector: α|0.70703>, β|0.70703>
    Outputs:
    ID: 54, Type: 160
    Removing output Gate 19, I2C Address: 0x36
    Quantum machine state:
    GateID: 0, I2C Address: 0x3f, Gate Type: Hadamard, Vector: α|0.70703>, β|0.70703>

     
  • Edward A Soard

    Edward A Soard - 2023-09-24

    I wanted to show how I was handling the complex number math on this.

    The number format is signed 16bit fixed 3/12 which is the reason for the 12 bit shift at the end of FixedMult. To compensate for the decimal.

    Function FixedMult(multiple1 as Integer, multiple2 as Integer) as Integer
      FixedMult = FnLSR(multiple1 * multiple2,12)
    end Function
    
    Sub FOIL(in left1 As Integer, in left2 As Integer, in right1 As Integer, in right2 As Integer, real as Integer, imaginary as Integer)
      Dim first as Integer
      Dim outter as Integer
      Dim inner as Integer
      Dim last as Integer
    
      first = FixedMult(left1, right1)
      outter = FixedMult(left1, right2)
      inner = FixedMult(left2, right1)
      last = FixedMult(left2, right2)
    
      real = first - last
      imaginary = outter + inner
    End Sub
    
     

    Last edit: Edward A Soard 2023-09-24
    • Anobium

      Anobium - 2023-09-24

      Thank you for sharing. The complex number management.

      Do you have any good reference material/URL for the use of this research?

       
      • Edward A Soard

        Edward A Soard - 2023-09-24

        As for my own website, not as of yet. I just woke up one morning and decided that I wanted to build a quantum computer and thought that using microcontrollers to emulate the gates would be an effective way to do it. For my research, I started here and then watched a lot of youtube videos and took some courses on quantum mechanics

        https://en.wikipedia.org/wiki/Quantum_logic_gate

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.