um ponto de vista simbólico sobre a simulação de algoritmos quânticos antónio pereira &...
Post on 19-Dec-2015
214 views
TRANSCRIPT
Um ponto de vista simbólico Um ponto de vista simbólico sobre a Simulação de Algoritmos Quânticossobre a Simulação de Algoritmos Quânticos
António Pereira & Rosália Rodrigues
CEOC-UA – CIMA-UE
2006
CEOC – CIMA - 2006 2
Quantum ComputationQuantum Computation
Research in Quantum Computation:Research in Quantum Computation:
• building quantum devices
• designing algorithms for quantum devices
How to Simulate it ?How to Simulate it ?
CEOC – CIMA - 2006 3
Simulating Quantum ComputationSimulating Quantum Computation
Vectorial approach:
state vector on a Hilbert space
evolution matrix products
advantageadvantage: easy to implement and trace
drawbackdrawback: exponential growth in space and time
Symbolic approach:
state linear expression
evolution algebraic rules
advantageadvantage: control over complexity
drawbackdrawback: “convince” Mathematica not to evaluate... yet
Symbolic
Quantum
Computer
Simulator
CEOC – CIMA - 2006 4
qudits & qubitsqudits & qubits
CEOC – CIMA - 2006 5
kets in SQCSkets in SQCS
Basis qudit state
Linear expression of ket objects
Object with head ket
General qudit state
CEOC – CIMA - 2006 6
bras in SQCSbras in SQCS
Riesz Theorem:
CEOC – CIMA - 2006 7
braKets in SQCSbraKets in SQCS
• conjugate linear
in the first argument
• linear in the second
braKet
CEOC – CIMA - 2006 8
Qudit SystemsQudit Systems
………… …………
1 2 3 n
CEOC – CIMA - 2006 9
The Kronecker product in SQCSThe Kronecker product in SQCS
Properties of the Tensor Product (Kronecker Product):
• Associative
• Noncommutative
• Distributive with respect
to linear combinations
CEOC – CIMA - 2006 10
Operators in SQCSOperators in SQCS
Quantum Algorithm
Initial state +
Sequence of unitary operators +
Measurement
op[name_,n_,f_]
Every linear operator is represented in SQCS by an object
where:
• name ― label for the operator
• n ― number of qudits on which the operator acts
• f ― function that defines the action of the operator
on the basis qudits states (set of rules)
The discrete time evolution of a closed quantum system is described by the action of a unitary operator
CEOC – CIMA - 2006 11
Operators in SQCSOperators in SQCS
The Hadamard operator
• Creates a uniform superposition
• Is its own inverse
CEOC – CIMA - 2006 12
Operators in SQCSOperators in SQCS
The Walsh-Hadamard operator
CEOC – CIMA - 2006 13
Operators in SQCSOperators in SQCS
The Outer Product operator
Completeness Relation:
CEOC – CIMA - 2006 14
Simulating Grover’s AlgorithmSimulating Grover’s Algorithm
CEOC – CIMA - 2006 15
Simulating Grover’s AlgorithmSimulating Grover’s Algorithm
Classical Database Case:
ClassicalDatabase
QuantumComputer
f(x)
n 5
k 2^n;
t Table0,i, 0, k 1;pos RandomInteger,0, k 1;Print"POS", postpos 1 1;
fi_: ti 1;numIt RoundPi4 ArcSin1Sqrtk 12;Print"Iterations ", numIt; oraclef, nGrover n20 0n n n 00n1 n0nestedApplyGrover,1, numItTiming
CEOC – CIMA - 2006 16
Simulating Grover’s AlgorithmSimulating Grover’s Algorithm
Quantum Database Case:
QuantumDatabase
QuantumComputer
n 30;
k 2^n;
pos RandomInteger,0, k 1;Print"POSITION ", posnumIt RoundPi4 ArcSin1Sqrtk 12;Print"Number of Iterations ", numIt;posBin IntegerDigitspos, 2, n; n 2 kron #1GSD0,1,2#1GSD0,1,2& posBin
Grover n20 0n n n 00n1 n0nestedApplyGrover,1, numItTiming
CEOC – CIMA - 2006 17
Simulating Grover’s AlgorithmSimulating Grover’s Algorithm
Step by step:
Database of size25=32
Index of the elementto be searched for
Number of steps
The Oracle
Grover’s operator
In[1]:= SQCS`
In[2]:= numericOn;
makeOuterProductRulesGSD0, 1, 2;makeSpecialOuterProductRules;
makeHadamardRulesGSD0, 1, 2;makeHadamardInverseRules;
In[7]:= n 5;
k 2^n;
pos RandomInteger,0, k 1;Print"POSITION ", pos;POSITION 24
In[10]:= numIt RoundPi4 ArcSin1Sqrtk 12;Print"Number of Iterations ", numIt;Number of Iterations 4
In[11]:= posBin IntegerDigitspos, 2, n; n 2
kron #1GSD0,1,2#1GSD0,1,2& posBin
Out[12]= 21 11 10 00 00 0 5
In[13]:= Grover n20 0n n n
Out[13]= 55 2005 5 21 11 10 00 00 0 5
CEOC – CIMA - 2006 18
Simulating Grover’s AlgorithmSimulating Grover’s Algorithm
In[1]:= SQCS`
In[2]:= numericOn;
makeOuterProductRulesGSD0, 1, 2;makeSpecialOuterProductRules;
makeHadamardRulesGSD0, 1, 2;makeHadamardInverseRules;
In[7]:= n 5;
k 2^n;
pos RandomInteger,0, k 1;Print"POSITION ", pos;POSITION 24
In[10]:= numIt RoundPi4 ArcSin1Sqrtk 12;Print"Number of Iterations ", numIt;Number of Iterations 4
In[11]:= posBin IntegerDigitspos, 2, n; n 2
kron #1GSD0,1,2#1GSD0,1,2& posBin
Out[12]= 21 11 10 00 00 0 5
In[13]:= Grover n20 0n n n
Out[13]= 55 2005 5 21 11 10 00 00 0 5
In[14]:=00nOut[14]=05In[15]:=1 n0
Out[15]= 0.176777015In[16]:=2 nestedApplyGrover,1, 1
Out[16]= 0.1767772.11000
0.1250101010101 1.015In[17]:=3 nestedApplyGrover,2, 1
Out[17]= 0.1767773.7511000
0.3593750101010101 1.015In[18]:=4 nestedApplyGrover,3, 1
Out[18]= 0.1767775.0312511000
0.6738280101010101 1.015
Step by step:
CEOC – CIMA - 2006 19
Simulating Grover’s AlgorithmSimulating Grover’s Algorithm
In[14]:=00nOut[14]=05In[15]:=1 n0
Out[15]= 0.176777015In[16]:=2 nestedApplyGrover,1, 1
Out[16]= 0.1767772.11000
0.1250101010101 1.015In[17]:=3 nestedApplyGrover,2, 1
Out[17]= 0.1767773.7511000
0.3593750101010101 1.015In[18]:=4 nestedApplyGrover,3, 1
Out[18]= 0.1767775.0312511000
0.6738280101010101 1.0155 10 15 20 25 30
0.2
0.4
0.6
0.8
1
Probability distribution
Step by step:
CEOC – CIMA - 2006 20
Probability distribution
Simulating Grover’s AlgorithmSimulating Grover’s Algorithm
In[14]:=00nOut[14]=05In[15]:=1 n0
Out[15]= 0.176777015In[16]:=2 nestedApplyGrover,1, 1
Out[16]= 0.1767772.11000
0.1250101010101 1.015In[17]:=3 nestedApplyGrover,2, 1
Out[17]= 0.1767773.7511000
0.3593750101010101 1.015In[18]:=4 nestedApplyGrover,3, 1
Out[18]= 0.1767775.0312511000
0.6738280101010101 1.0155 10 15 20 25 30
0.2
0.4
0.6
0.8
1
Step by step:
CEOC – CIMA - 2006 21
Probability distribution
Simulating Grover’s AlgorithmSimulating Grover’s Algorithm
In[14]:=00nOut[14]=05In[15]:=1 n0
Out[15]= 0.176777015In[16]:=2 nestedApplyGrover,1, 1
Out[16]= 0.1767772.11000
0.1250101010101 1.015In[17]:=3 nestedApplyGrover,2, 1
Out[17]= 0.1767773.7511000
0.3593750101010101 1.015In[18]:=4 nestedApplyGrover,3, 1
Out[18]= 0.1767775.0312511000
0.6738280101010101 1.0155 10 15 20 25 30
0.2
0.4
0.6
0.8
1
Step by step:
CEOC – CIMA - 2006 22
Probability distribution
Simulating Grover’s AlgorithmSimulating Grover’s Algorithm
In[14]:=00nOut[14]=05In[15]:=1 n0
Out[15]= 0.176777015In[16]:=2 nestedApplyGrover,1, 1
Out[16]= 0.1767772.11000
0.1250101010101 1.015In[17]:=3 nestedApplyGrover,2, 1
Out[17]= 0.1767773.7511000
0.3593750101010101 1.015In[18]:=4 nestedApplyGrover,3, 1
Out[18]= 0.1767775.0312511000
0.6738280101010101 1.0155 10 15 20 25 30
0.2
0.4
0.6
0.8
1
Step by step:
CEOC – CIMA - 2006 23
Grover’s Algorithm – Simulation TimesGrover’s Algorithm – Simulation Times
Time × Database sizeTime × Number of qubits
Classical Database Case:
Mathematica 5, Pentium IV, 3.0 GHz, 1GB RAM
CEOC – CIMA - 2006 24
Grover’s Algorithm – Simulation TimesGrover’s Algorithm – Simulation Times
Time × Database sizeTime × Number of qubits
Mathematica 5, Pentium IV, 3.0 GHz, 1GB RAM
Quantum Database Case:
CEOC – CIMA - 2006 25
Conclusions & Further workConclusions & Further work
• Measuring Operators.
• A quantum register address manager.
• Simulate other quantum algorithms: Deutsch-Jozsa, Shor, …
• Use SQCS as a tool for the development of new quantum algorithms.
Symbolic Approach to Quantum Computation: Symbolic Approach to Quantum Computation:
• Provides a suitable environment for testing quantum algorithms.
• Allows for larger problem instances.
• Algorithms can be programmed at high-level.
• Useful tool for the teaching of Quantum Computation.
Conclusions:
Further work:
CEOC – CIMA - 2006 26
1. Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press (2000)
2. Kitaev, A.Y., Shen, A., Vyalyi, M.: Classical and quantum computation. Volume 47 of Graduate Studies in Mathematics. American Mathematical Society (2002)
3. Wolfram, S.: The Mathematica Book, Fifth Edition. Wolfram Media, Inc. (2003)
4. Grover, L.K.: A fast quantum mechanical algorithm for database search. In: Proc. 28th Annual ACM Symposium on the Theory of Computing. (1996) 212-219
5. Biham, E., Biham, O., Biron, D., Grassl, M., Lidar, D.A.: Grover's quantum search algorithm for an arbitrary initial amplitude distribution. Physical Review A 60(1999) 27-42
6. Pereira, António, Rodrigues, Rosália: A Symbolic Approach to Quantum Computation Simulation. Lecture Notes in Computer Science (2006) Vol. 3992. 454 – 461
7. Pereira, António, Rodrigues, Rosália: Symbolic Quantum Computation Simulation with Mathematica. Cadernos de Matemática. Universidade de Aveiro. CM05/I-44 (2005)
ReferencesReferences
Thank You