mic_s
Posts: 92
Joined: Sun Oct 26, 2014 4:15 pm

Build your own Quantum Circuit with your Pi Zero (and IBM)

Thu Mar 09, 2017 8:39 pm

Build your own Quantum Processor with your Pi Zero (with some help from IBM)

Sounds crazy ??

Not at all. Not at all.

You only need a „5 US$ - Rasperry Pi zero“ (or a "10 US$ - Pi 0-W") to design your own Quantum Circuit. The raw power of a Pi3 is not needed. Send your Design to IBM. They will test your circuit and send you the results.

How does it work ??

Step 1:
If you are new to Quantum computing, here are some basics:
https://www.research.ibm.com/ibm-q/quantum-primer/

Step 2:
To get familar with the subject :
https://quantumexperience.ng.bluemix.ne ... user-guide
2a: „Beginner's User Guide“
2b: „Full User Guide“
(sorry, basic knowladge of linear algebra is required)

Step 3:
Examples and Open QASM-spec (Apache License 2.0):
https://github.com/IBM/qiskit-openqasm
(QASM is a DSL to describe your quantum-circuit-netlist)

Step 4:
Build your own Quantum Circuit (with QASM Editor and/or Composer, registering required):
https://quantumexperience.ng.bluemix.ne ... /community

Step 5:
Simulate your Quantum Circuit.

Step 6:
Bonus:
If you follow some technical restrictions you may get a „Real Quantum Processor“, IBM will test your Quantum Processing Unit and send you the results.
(This may take some time)

So … it becomes real … you design your own Quantum Processing Unit with your „5 US$ - Raspberry Pi Zero“ ... send the design („Netlist“) to IBM ... and IBM will test your Processing Unit and send you the results. It works this way, I have done so with my „Walsh-Processing-Unit“.

Lemma:
Build your own QASM-editor … e.g. with eclipse/xtext, so you get your own QASM-IDE for free … start with the QASM grammar (https://github.com/IBM/qiskit-openqasm/ ... /qasm2.pdf, page 20) … please note: QASM is a moving target, current version is 2.0

Have fun … build your own quantum processor – with your „5 US$ - Pi zero“ and some help from IBM.

.

User avatar
Gavinmc42
Posts: 4284
Joined: Wed Aug 28, 2013 3:31 am

Re: Build your own Quantum Circuit with your Pi Zero (and IB

Sat Mar 11, 2017 12:21 pm

Checked date, it is not April 1st.
IBM asking for help from Raspbians?
I feel more brain stretching, will it hurt?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

mic_s
Posts: 92
Joined: Sun Oct 26, 2014 4:15 pm

Re: Build your own Quantum Circuit with your Pi Zero (and IB

Sat Mar 11, 2017 6:03 pm

Gavinmc42 wrote:IBM asking for help from Raspbians?
The other way around.
IBM dosn't need your help. IBM is offering help for you. When it comes to take some practice in quantum computing only a „5US$-Zero“ is needed (with the help from IBM). Ok, any other machine with a browser will do it … but this way we get the crazy headline (IBMs machine is a 5 qubit machine):

„One US$ for one qubit“

This is by very far the lowest cost entry to get some practice in quantum processing.

What is it all about ?
It is about education.

Extract from "Full User Guide":
IBM wrote:...
Our goal with the IBM Quantum Experience is to introduce this world through a set of short tutorials in our User Guide, and by providing the hands-on opportunity to experiment with operations on a real quantum computing processor. This way, we hope to foster a quantum intuition in the greater community, and spark further interest in those who are curious. By making quantum concepts more widely understood—even on a general level— we can more deeply explore all the possibilities quantum computing offers, and more rapidly bring its exciting power to a world whose perspective is limited by classical physics.
...
How to get there ?
Extract from "Full User Guide" (Section I, page 1):
IBM wrote:The IBM Quantum Experience consists of:
...
access to an actual quantum processor running in an IBM Quantum Computing lab, where your quantum scores will be executed

To make sure everyone has a chance to use the real device in our lab via the Cloud, we have established a Units currency system. If you have joined the IBM Quantum Experience as a Standard User, you have full access to our simulation capabilities and to previously-run cached results from the real device and a small number of Units to run real experiments on the quantum processor hardware. Once you have read through the User Guide you will be rewarded with extra Units to run more real-time experiments. This system allows our experiment queue to run smoothly. When your Units are used up, you will be replenished once you have viewed the results of the completed execution.
Have fun … build your own quantum-gate-netlist (quantum-“program“) for the „real quantum processor“ – with your „5 US$ - Pi zero“ ... and some help from IBM.

mic_s
.

User avatar
Burngate
Posts: 6181
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Build your own Quantum Circuit with your Pi Zero (and IB

Sat Mar 11, 2017 7:20 pm

So the title of this thread is wrong.
We don't build a Quantum machine - we just build an interface to IBM's machine.

mic_s
Posts: 92
Joined: Sun Oct 26, 2014 4:15 pm

Re: Build your own Quantum Circuit with your Pi Zero (and IB

Sat Mar 11, 2017 11:07 pm

Burngate wrote:So the title of this thread is wrong.
We don't build a Quantum machine - we just build an interface to IBM's machine.
You are using (not building) the interface to IBM's „5 qubit machine“. QASM-editor and/or the Composer are the tools to do this. Both tools are ready to use. QASM is a textual language … a very simple language … if you like, you can write your own QASM-editor … but this is not required … you can use the one from IBM … QASM is a description language … to describe wich quantum-gates to use and how this quantum-gates are connected … in other words: You build a quantum-circuit out of connected quantum-gates. This is your design. This is your quantum-processing-unit.

Example ( quantum ripple-carry adder, from https://github.com/IBM/qiskit-openqasm ) :

Code: Select all

// quantum ripple-carry adder from Cuccaro et al, quant-ph/0410184
OPENQASM 2.0;
include "qelib1.inc";
gate majority a,b,c 
{ 
  cx c,b;  
  cx c,a; 
  ccx a,b,c; 
}
gate unmaj a,b,c 
{ 
  ccx a,b,c; 
  cx c,a; 
  cx a,b; 
}
qreg cin[1];
qreg a[4];
qreg b[4];
qreg cout[1];
creg ans[5];
// set input states
x a[0]; // a = 0001
x b;    // b = 1111
// add a to b, storing result in b
majority cin[0],b[0],a[0];
majority a[0],b[1],a[1];
majority a[1],b[2],a[2];
majority a[2],b[3],a[3];
cx a[3],cout[0];
unmaj a[2],b[3],a[3];
unmaj a[1],b[2],a[2];
unmaj a[0],b[1],a[1];
unmaj cin[0],b[0],a[0];
measure b[0] -> ans[0];
measure b[1] -> ans[1];
measure b[2] -> ans[2];
measure b[3] -> ans[3];
measure cout[0] -> ans[4];
If you prefer, you can use the composer (kind of a 'graphical entry tool') to place the quantum gates and to describe how to connect this gates.

Very, very roughly speaking : QASM is kind of a Hardware Description Language. (like verilog or vhdl), there are something like inputs, a bunch of gates and outputs. In this analogy IBM provides you a "fpga" and you describe with your Pi-zero where to place the "gates" and how they are connected.

Now it commes to your point :
Burngate wrote:We don't build a Quantum machine
IBM provides the expensive lab-technology (vacuum, krypto, …) … you provide your „netlist“ ( your design)

I am reading not often in this forum, but every time I have to read something like this: "pi-zero is a toy" or "I require at least 8 GB of RAM, 4 Ghz, 16 cores, USB 3.1 class 2 ... for a maximum of 5 USD" .
This has led me to give an example of "high tech" with "pi-zero".

Have fun … build your own quantum-gate-netlist (quantum-“program“) for the „real quantum processor“ – with your „5 US$ - Pi zero“ ... and some help from IBM.

mic_s
.

User avatar
Gavinmc42
Posts: 4284
Joined: Wed Aug 28, 2013 3:31 am

Re: Build your own Quantum Circuit with your Pi Zero (and IB

Sun Mar 12, 2017 12:46 am

Ok, sort of a cross between asm and vhdl.
Then we send it off to be run on IBM's magic box.
Brings back memory of computing centers before desktops.

But can it solve problems with 5 Qubits?
The "program" is broken down into steps, qubit is run and then next bit of program is feed results from previous run?

Could not a qubit be emulated, 0, 1 and some fuzzy number in between.
Deep learning stuff can give results with 8 bit data ie 0-255.
5 qubits could be emulated?
The qubits + entanglement would be similar to fuzzy logic plus neural network connectivity.

Or we could just wait a bit till qubits are on every chip.
http://newatlas.com/silicon-quantum-computer/39711/

Any experiment must run multiple time for a statistical answer.
A bunch of qubit cores running in parallel for solution confirmation.

http://www.pcworld.com/article/3065654/ ... iding.html

I think I might be getting too old for this stuff.
Any paper that has formulas in it looses me.
Any cloud solution is just experiments for QASM learning?

D-wave is up to 2000 qubits, we get access to IBM's old 5 qubit box.

Building circuits and logic gates for me is sticking wires into springs connected to transistors.
The Quantum circuit is not real just a virtual one?
Might have to go back to those pages again, must be missing the point.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “General discussion”