High-Performance Simulation of Quantum Computation using QuIDDs George F. Viamontes, Manoj...
-
date post
20-Dec-2015 -
Category
Documents
-
view
214 -
download
0
Transcript of High-Performance Simulation of Quantum Computation using QuIDDs George F. Viamontes, Manoj...
High-Performance Simulation of Quantum Computation using QuIDDs
George F. Viamontes, Manoj Rajagopalan, Igor L. Markov, and John P. Hayes
Advanced Computer Architecture LaboratoryUniversity of Michigan
Problem
Simulation of quantum computing on a classical computer Requires exponentially growing time
and memory resources using standard linear algebra
Goal: Improve classical simulation Solution: Compress redundancy in
the matrices and vectors used in quantum computing
Redundancy in Quantum Computing
Matrix representation of quantum gates contain block patterns
The Tensor (Kronecker) Product Create state vectors and operators
involving multiple qubits Propagates block patterns in
vectors and matrices
Example of Propagated Block Patterns
2/12/12/12/1
2/12/12/12/1
2/12/12/12/1
2/12/12/12/1
2/12/1
2/12/1
2/12/1
2/12/1
Only TWO distinct blocks!
No Need to Repeat Identical Items
Analogy: ISP automated tech support system
“We’re sorry, you are notsupported under the termsand conditions of service”
“Is it between 8AM and 4:30PM?”
YES NO
“Call back later”“Are you running Windows?”
“Can you reboot the system?”
Tech Support Dept.
YES
NO
YESNO
No Need to haveseparate copies ofthis message foreach path that leadsto it.
Data Structure that Exploits Redundancy
Binary Decision Diagrams (BDDs) exploit repeated sub-structure
BDDs have been used to simulate classical logic circuits efficiently [1,2]
Example: f = a AND b
a
f
b
1 0
Assign value of 1 to variable x
Assign value of 0 to variable x
Some Basic BDD Properties [1]
Number of nodes in BDD A is denoted as |A|
Most BDD operations are based on a recursive procedure called Apply Generally takes two BDDs, A and B, as
arguments Apply(A,B) has space and time
complexity: Apply is an algorithmic form of Boole’s
Expansion
|)||(| BAO
BDDs in Linear Algebra
Variants of BDDs have been used in other problem domains Algebraic Decision Diagrams (ADDs) treat
variable nodes as matrix indices [3] ADDs compress repeated block patterns in
matrices and vectors Linear Algebraic operations exist which
manipulate ADDs in their compressed state
Quantum Information Decision Diagrams
Quantum Information Decision Diagrams (QuIDDs) An application of ADDs to the quantum
computing domain Similar structure to ADDs Three types of nodes
Row Column Terminal
Use modified form of ADD operations
QuIDD Structure
BDD variable ordering Defines the order in which different
node types appear QuIDD variable ordering interleaves
row and column variables Terminal nodes are always last
TCRCRCR nn 1100
Quantum Circuit Simulation Issues Specific to QuIDDs
Use state vector representation Though QuIDDs can also model the
density matrix representation in principle Avoid multiplying operators
together for efficiency Tensor products and matrix-vector
multiplications are done however
QuIDD Vectors
Use column and terminal variables Represent qubit state vectors Some examples:
f
0C
1C
2/1
1 0
1
0
0
0
f
2/1
2/1
2/1
2/100
01
10
11
00
01
10
11
TT
QuIDD Matrices
Use row, column, and terminal variables
Represent gates or operators
Example: 2-Qubit Hadamard QuIDD
f
0R
0C
2/1 2/1
1R
1C
1R
1C
2/12/12/12/1
2/12/12/12/1
2/12/12/12/1
2/12/12/12/1
00
01
10
11
1001 1100
QuIDD Operations
Based on the Apply algorithm [2,4] Construct new QuIDDs by traversing two QuIDD
operands Perform “op” when terminals are reached (op can
be *, +, etc.) The variable ordering directs the traversal General Form: f op g where f and g are QuIDDs,
and x and y are variables in f and g, respectively
ix
ii yx gopfii yx
gopf
iy
iyi gopxiyi gopx
ix
ix yopfi ix
yopfi
ii yx ii yx ii yx
Tensor Product
Given A B Every element of a matrix A is
multiplied by the entire matrix B QuIDD Implementation: Use Apply
Operands are A and B Variables of operand B are shifted “op” is defined to be multiplication
Matrix Multiplication
A modified form of the Apply function Dot-product can be done on QuIDDs without
decompression “Skipped” nodes are counted A factor of is multiplied by dot-
products QuIDD Implementation
Modified ADD matrix multiply algorithm [3] Support complex number terminals Account for row/column variable ordering
skipped#2
Other Operations
Matrix addition Call to Apply with “op” set to addition
Scalar operations A special one-operand version of Apply
Qubit measurement A combination of matrix multiplications,
tensor products, and scalar operations
Simulation of Grover’s Algorithm
QuIDDPro was tested by running instances of Grover’s Algorithm
Results indicate linear memory usage in many cases Any circuit with an oracle whose QuIDD
form is polynomial in # of qubits
Sample Circuit Representation
H
H
H
Oracle
H
H
Conditional Phase Shift
H
H
H
|0>
|0>
|1>
.
.
.
.
.
.
.
.
.
Simulation of Grover’s Algorithm
We used Boyer et al.’s formulation to compute the number of iterations [5] # iterations = Where M=# of solutions, N=# of elements in
data set Exponential runtime even on a real
quantum computer When M=1, the number of iterations is
exponential in the number of qubits
4/NM /
Projected Grover Iterations
SANITY CHECK: Make sure that the number of iterations predicted by Boyer et al. results in the highest probability of measuring the item(s) to be searched
Experimental Results Consistent with Predictions
Simulation Results forGrover’s Algorithm
Growth of QuIDDs in Grover’s algorithm is linear Values expressed in number of nodes
Grover’s Algorithm: Results using Oracle 1
Oracle 1 searches for one element in the data set
Worst-case polynomial oracle Linear memory asymptotics Run-times are extremely low
comparatively
Grover’s Algorithm: Results using Oracle 1
Linear Growth using QuIDDPro
Grover’s Algorithm: Results using Mod 1024 Oracle
Finds elements in the data set whose 10 least significant bits are 1
Useful in demonstrating asymptotics Memory and runtime are governed
purely by the size of the system
Grover’s Algorithm: Results using Mod 1024 Oracle
For data up to 25 qubits, linear least-squares regression shows that memory (MB) varies as 7.5922 + 0.0410n
Linear Growth using QuIDDPro
Conclusions and Future Work
Asymptotic performance close to ideal quantum computers in certain cases E.g. when QuIDD form of oracle is poly-sized
QuIDDPro: Ideal Quantum Computer:
Far more efficient than other classical simulation techniques in every other case MATLAB: Blitz++:
We plan to simulate other algorithms like Shor’s using QuIDDPro
Details in quant-ph/0208003
n66.1n41.1
n2n4
References
[1] C.Y. Lee, “Representation of Switching Circuits by Binary Decision Diagrams”, Bell System Technical Jour., 38:985-999, 1959.
[2] R. Bryant, “Graph-Based Algorithms for Boolean Function Manipulation”, IEEE Trans. On Computers, vol. C-35, pp. 677-691, Aug 1986.
[3] R. I. Bahar et al., Algebraic Decision Diagrams and their Applications”, In Proc. IEEE/ACM ICCAD, pp. 188-191, 1993.
[4] E. Clarke et al., “Multi-Terminal Binary Decision Diagrams and Hybrid Decision Diagrams”, In T. Sasao and M. Fujita, eds, Representations of Discrete Functions, pp. 93-108, Kluwer, 1996.
[5] M. Boyer et al., “Tight Bounds on Quantum Searching”, Fourth Workshop on Physics and Computation, Boston, Nov 1996.