You are on page 1of 6

Neurocle Teleport QCryptoChat

Architecture of Quantum Systems

Oscar Riveros October 12, 2013


In this chapter of the series "Quantum Programming with Quipper " try to discover an cryptographic quantum algorithm that allows Alice and Bob Chat over the Quantum Space (an hypothetical post singularity internet) Crackers Free!!!

1 Introduction
Quantum entanglement is a physical phenomenon that occurs when pairs (or groups) of particles are generated or interact in ways such that the quantum state of each member must subsequently be described relative to each other. Quantum entanglement is a product of quantum superposition. However, the state of each member is indenite in terms of physical properties such as position, momentum, spin, polarization, etc. in a manner distinct from the intrinsic uncertainty of quantum superposition. When a measurement is made on one member of an entangled pair and the outcome is thus known (e.g., clockwise spin), the other member of the pair is at any subsequent time always found (when measured) to have taken the appropriately correlated value (e.g., counterclockwise spin). There is thus a correlation between the results of measurements performed on entangled pairs, and this correlation is observed even though the entangled pair may be separated by arbitrarily large distances. Repeated experiments have veried that this works even when the measurements are performed more quickly than light could travel between the sites of measurement: there is no lightspeed or slower inuence that can pass between the entangled particles. Recent experiments have measured entangled particles within less than one part in 10,000 of the light travel time between them; according to the formalism of quantum theory, the eect of measurement happens instantly. This behavior is consistent with quantum theory, and has been demonstrated experimentally with photons, electrons, molecules the size of buckyballs, and even small diamonds. It is an area of extremely active research by the physics community. However, there is some heated debate about whether a possible classical underlying mechanism could explain entanglement. The dierence in opinion derives from espousal of various interpretations of quantum mechanics. (Wikipedia)

2 Design
The Neurocle is designed to be a hybrid between "Quantum Neuron" and "Oracle", this interface is implemented (identically) for two separate instances "Alice" and "Bob". The output of Neurocle is responsible for producing the strong binding between or incoming messages, and once bound, any attempt to observe it would destroy the message. The message can only be recovered by the partner once it has been received linked counterpart of the message, the receiver observes (measures) and the message appears in the transmision intact. Now you can to make the same operation. Clearly, the encryption is "Interlace" itself, not any key, here are the laws of nature which encrypt the message. The strength of this design is that encode enough classical information to a numerical representation to communicate right through "Quantum Space". Remark 1. This concept is easily extended to an articial neural network based on QDInts.
data N e u r o c l e = N e u r o c l e { i n s : : [ QDInt ] , out : : C i r c QDInt } a l i c e : : [ QDInt ] > N e u r o c l e a l i c e xs = Neurocle { i n s = xs , out = out } where out : : C i r c QDInt out = do a < h_quantum xs qs < q d i n t 2 q u b i t s a qs < map_hadamard qs return a bob : : [ QDInt ] > N e u r o c l e bob xs = Neurocle { i n s = xs , out = out } where out : : C i r c QDInt out = do a < h_quantum xs qs < q d i n t 2 q u b i t s a qs < map_hadamard qs return a

3 Implementation
import import import import import import import import import import import import import import Quipper Quipper . Monad Quipper . G e n e r i c QuipperLib . D y n a m i c L i f t i n g s Libraries . Auxiliary QuipperLib . S i m u l a t i o n QuipperLib . A r i t h C o n t r o l . Monad ( zipWithM ) A l g o r i t h m s . USV . D e f i n i t i o n s A l g o r i t h m s . USV . USV A l g o r i t h m s . CL . A u x i l i a r y ( primes_to ) A l g o r i t h m s . BF . QuantumIf Data . Numbers . Primes System . Random

data N e u r o c l e = N e u r o c l e { i n s : : [ QDInt ] , out : : C i r c QDInt } a l i c e : : [ QDInt ] > N e u r o c l e a l i c e xs = Neurocle { i n s = xs , out = out } where out : : C i r c QDInt out = do a < h_quantum xs qs < q d i n t 2 q u b i t s a qs < map_hadamard qs return a bob : : [ QDInt ] > N e u r o c l e bob xs = Neurocle { i n s = xs , out = out } where out : : C i r c QDInt out = do a < h_quantum xs qs < q d i n t 2 q u b i t s a qs < map_hadamard qs return a i n t 2 b i n : : Int > [ Bool ] i n t 2 b i n 0 = [ False ] i n t 2 b i n n = reverse ( h e l p e r n ) helper 0 = [ ] h e l p e r n | n mod 2 == 1 = True : h e l p e r ( n div 2 ) | n mod 2 == 0 = False : h e l p e r ( n div 2 ) b i n 2 i n t : : [ Bool ] > Int b i n 2 i n t = f o l d r ( \ c s > s 2 + c ) 0 . reverse . map c 2 i where c 2 i c = i f c == False then 0 e l s e 1

i n t 2 q d i n t : : Int > C i r c QDInt i n t 2 q d i n t i n t = do q u b i t s < ( q i n i t _ l i s t ( i n t 2 b i n i n t ) ) let qdints = ( qdint_of_qulist_lh qubits ) return q d i n t s q d i n t 2 q u b i t s : : QDInt > C i r c [ Qubit ] q d i n t 2 q u b i t s x = do let a = qulist_of_qdint_lh x return a i 2 q : : Int > C i r c [ Qubit ] i 2 q i n t = do q u b i t s < ( q i n i t _ l i s t ( i n t 2 b i n i n t ) ) return q u b i t s q 2 i : : [ Qubit ] > C i r c Int q 2 i qs = do bt < (mmap d y n a m i c _ l i f t $ i o < (mmap b i n 2 i n t $ bt ) return i o o b s e r v e r : : QDInt > C i r c Int o b s e r v e r message = do out < q d i n t 2 q u b i t s message out < q 2 i out return out neurocle_teleport_chat : : C i r c Int n e u r o c l e _ t e l e p o r t _ c h a t = do message < i n t 2 q d i n t 11 qmessage < ( out ( a l i c e [ message ] ) ) ( out ( bob [ qmessage ] ) ) message < i n t 2 q d i n t 19 qmessage < ( out ( bob [ message ] ) ) ( out ( a l i c e [ qmessage ] ) ) message < i n t 2 q d i n t 32 qmessage < ( out ( a l i c e [ message ] ) ) ( out ( bob [ qmessage ] ) ) message < i n t 2 q d i n t 97 qmessage < ( out ( bob [ message ] ) ) ( out ( a l i c e [ qmessage ] ) ) egassem < o b s e r v e r message return egassem main : : IO ( ) main = do out < r u n _ g e n e r i c _ i o db ( n e u r o c l e _ t e l e p o r t _ c h a t ) putStrLn ( " N u r o c l e T e l e p o r t > " ++ show out ) where db : : Double db = undefined

measure qs )

4 Alice & Bob an QCryptoChat Session


START Message p r e p a r e d from A l i c e message = 11 Haking message , i n t e n t 1 , 2 and 3 N u r o c l e T e l e p o r t > 9 [ F i n i s h e d in 2 . 5 s ] N u r o c l e T e l e p o r t > 6 [ F i n i s h e d in 1 . 5 s ] N u r o c l e T e l e p o r t > 10 [ F i n i s h e d in 1 . 5 s ] Message r e a d f o r N u r o c l e T e l e p o r t > N u r o c l e T e l e p o r t > N u r o c l e T e l e p o r t > bob , i n t e n t 1 , 2 and 3 11 11 11

Message p r e p a r e d from bob message = 19 Haking message , i n t e n t 1 , 2 and 3 N u r o c l e T e l e p o r t > 18 [ F i n i s h e d in 2 . 8 s ] N u r o c l e T e l e p o r t > 20 [ F i n i s h e d in 1 . 5 s ] N u r o c l e T e l e p o r t > 31 [ F i n i s h e d in 1 . 6 s ] Message r e a d f o r N u r o c l e T e l e p o r t > N u r o c l e T e l e p o r t > N u r o c l e T e l e p o r t > a l i c e , i n t e n t 1 , 2 and 3 19 [ F i n i s h e d in 2 . 6 s ] 19 [ F i n i s h e d in 2 . 6 s ] 19 [ F i n i s h e d in 2 . 6 s ]

Message p r e p a r e d from A l i c e message = 32 Haking message , i n t e n t 1 , 2 and 3 N u r o c l e T e l e p o r t > 48 [ F i n i s h e d in 3 . 0 s ] N u r o c l e T e l e p o r t > 54 [ F i n i s h e d in 1 . 7 s ] N u r o c l e T e l e p o r t > 42 [ F i n i s h e d in 1 . 7 s ] Message r e a d f o r N u r o c l e T e l e p o r t > N u r o c l e T e l e p o r t > N u r o c l e T e l e p o r t > bob , i n t e n t 1 , 2 and 3 32 32 32

Message p r e p a r e d from bob message = 97 Haking message , i n t e n t 1 , 2 and 3 N u r o c l e T e l e p o r t > 116 [ F i n i s h e d in 8 . 4 s ] N u r o c l e T e l e p o r t > 90 [ F i n i s h e d in 7 . 5 s ] N u r o c l e T e l e p o r t > 94 [ F i n i s h e d in 7 . 4 s ] Message r e a d f o r N u r o c l e T e l e p o r t > N u r o c l e T e l e p o r t > N u r o c l e T e l e p o r t > END a l i c e , i n t e n t 1 , 2 and 3 97 [ F i n i s h e d in 1 9 . 9 s ] 97 [ F i n i s h e d in 1 9 . 3 s ] 97 [ F i n i s h e d in 1 9 . 8 s ]

5 Licence
Copyright Oscar Riveros, 2013, Todos los derechos reservados. oscar.riveros@gmail.com http://mx-clojure.blogspot.com/