Today I will be demonstrating the Hello Multiverse programme for a quantum computer using the D-wave toolkit. You will need the following things: D-wave toolkit: www.dwavesys.com (these are the instructions in order to get the D-wave toolkit) Python 2.6: www.python.org NOTE: You will need some experience of the python programming language and some knowledge of quantum theory. D-wave tutorials are here: www.dwavesys.com Tutorial: Step 1 : Download python 2.6 and the d-wave toolkit (once you a login to the d-wave portal) Step 2: install python Step 3: install d-wave toolkit (current version is 1.4.0-alpha1) Step 4: Open up python 2.6 and enter the following script: # Import D-Wave’s Python API from dwave_sapi import * conn = LocalConnection() # Using the emulator solver = conn.get_solver(‘c4-sw_sample’) # mimics a Rainier system with 128 qubits #define the problem h = [0]*128 # Emulating a Rainier 128 qubit processor J = dict() h[48] = -1 # The qubits with their current energy levels h[53] = -1 h[52] = -1 h[49] = -1 J[(48,53)] = -0.5 # The energy levels between the qubits J[(48,52)] = 0.2 J[(49,52)] = -0.3 J[(49,53)] = 0.8 # This means the computer will run this 100 times and ask for the solutions answer = solver.solve_ising(h,J,num_reads = 100)['solutions'][0] # How the output should be structured print ’48 = ‘, answer[48] # Answers will be the final state of the qubit print ’49 = ‘, answer[49] print ’52 = ‘, answer[52] print ’53 = ‘, answer[53] input(“nnPress the enter …
Read this article:
How to program a quantum computer #1: hello multiverse demonstration