Git Product home page Git Product logo

hand-qubits's Introduction

Handheld Qubits

Work in progress

This project contains code and instructions for making simulated toy qubits that you can hold.

The basic concept is to have a bunch of balls with Arduinos and other electronics inside. The Arduinos record motion data and report it over bluetooth to a hub computer doing the quantum simulation. Simple ball movements (turning, knocking, and pressing together) are thereby translated into quantum operations (single-qubit rotations, measurement, controlled rotations).

The main things left to do are:

  • Better debugging and testing of the Arduino code. Something is causing the contact detection to go flaky when the Arduinos are reset.
  • Correcting gyrometer drift with accelerometer data.
  • Correctly turning the motion into quantum rotations.
  • Make a demo video demonstrating quantum teleportation.

Demo

[[[work in progress]]]

How To Use

  • Each ball is a qubit.
  • A nearby computer acts as a hub handling the quantum simulation and talking to the balls over bluetooth.
  • When you turn a ball, its qubit is correspondingly rotated around the Bloch sphere.
  • When you knock a ball against a surface, its qubit is measured. The measurement axis is always vertical, and the result is indicated by a buzzer going "Beep beep beep!" for DOWN or "Riiiiiiiing!" for UP.
  • When you press two balls together, rotations become controlled. Turning one ball will only affect the parts of the state space where the other ball's qubit is UP.

Making Your Own

  1. Clone the repository.

    git clone https://github.com/Strilanc/Hand-Qubits.git

  2. Get the necessary parts.

  3. Configure parts.

    • Open Hand-Qubits/qubit-microcontroller/qubit-microcontroller.ino with the Arduino IDE
    • Upload to the Arduino
    • Also Configure the HC-05 Bluetooth Modules.
    • Change the addresses and pins in Hand-Qubits/hub/src/config/KnownBoards.cs to match.
    • Pair your computer with the Bluetooth modules.
  4. Run the server.

    • Open Hand-Qubits/hub/HandQubitServer.sln with Visual Studio.
    • Run the project on a computer with bluetooth enabled.
    • Once you've assembled things, the powered Arduinos can connect and start feeding in data.
  5. Assemble electronics.

    Connect vcc and ground pins appropriately. The MPU-6050's SDA and SCL pins go to A5 and A6 respectively. The HC-06's RX and TX pins go to D4 and D3 respectively. The buzzer goes from A3 to ground. A0 will go to the conductive paint or copper tape wrapping around the ball. Also, connect the battery and switch.

    A diagram of the pin connections:

    layout

    Once the electronics are ready, test that the powered Arduino connects and feeds motion data to the server.

  6. Assemble balls.

    First, paint over the polystyrene ball with an acrlyic paint. This stops the polystyrene from shedding constantly when touched. After the acrylic has dried, add conductive paint traced in tangled lines all over the surface. Once the conductive paint has dried, cut the ball in half.

    Make a hole for the electronics to sit in by carving into the insides of each half-ball using a butter knife or scissors. Try to make the fit snug, and positioned so that the switch just barely pokes out the side. Once the hole is carved, paint it and the rest of the insides with acrylic so they don't shed.

    After placing the electronics inside, and somehow connecting A0 to the conductive paint traces, close up the halves and use an office stapler to staple them together. You can position the staples so they act as a conductive path from conductive paint on the top half to conductive paint on the the bottom half.

    Here are some pictures of balls in progress:

    guts

    Staples can be pulled out easily, if you need to make changes. If you want a more permanent connection, such as a hinge between the backs of the two halves, I recommend sewing them together with needle and thread.

  7. Play with your qubits!

hand-qubits's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

silky b-rich 00mjk

hand-qubits's Issues

Improve rotation-to-operation flow

Feels really clunky. Easy to miss operations when not watching the screen. Hard to undo an operation sequence. Hard to hit Hadamard without hitting something in between. No correction of yaw drift.

Ideas:

  • Only do "what's that operation?" inference when parked.
  • Only do non-Pauli operations when parked.
  • Don't ever infer an operation until an interaction with another qubit.
  • Drift yaw towards rounded operation when parked.
  • Beep?
  • Handle axes separately.

Figure out mechanism for making qubits interact

Ideally, it would be as simple as just touching them together.

  • What axis is being conditioned on? Gravity axis? Touch point axis?
  • How to determine touching? Voltage changes through conductive skin? But then how does wireless data escape?
  • What happens when both qubits are being rotated at the same time? General user confusion at the not-a-proper-gate result? Perhaps do everything in full precision then drop down to known gates if nearby at the end of the interaction?

Test sound output for feedback

Don't really know how well piezo speakers work, or what sounds would work well for "up!" and "down!" messages. Probably also want "still in contact..." indicator sound.

Make bumps trigger measurement

  • How should the result be communicated back? Beeping? Vibration?
  • Might need a history of sensor readings, since the shake is likely to jump the gyrometer. We want the state before the shock.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.