for scientific computing
play

for Scientific Computing Anargyros Papageorgiou Department of - PowerPoint PPT Presentation

Quantum Algorithms & Circuits for Scientific Computing Anargyros Papageorgiou Department of Computer Science Columbia University Joint work with: M. Bhaskar, S. Hadfield and I. Petras Overview Why quantum algorithms for scientific


  1. Quantum Algorithms & Circuits for Scientific Computing Anargyros Papageorgiou Department of Computer Science Columbia University Joint work with: M. Bhaskar, S. Hadfield and I. Petras

  2. Overview • Why quantum algorithms for scientific computing • Requirements • Quantum algorithms & circuits for fundamental functions, e.g., 𝑥, ln 𝑥 etc. – Algorithms by combining elementary modules – Applications – Tests • Summary

  3. Why quantum circuits for scientific computing • Scientific computing applications can benefit from fast quantum algorithms – e.g., numerical linear algebra problems • Typically we need to compute fundamental functions such as 𝑦, ln 𝑦 , sin 𝑦 • Classical computation: IEEE standard for floating point arithmetic – Comprehensive math. libraries • Quantum computation: – No standard for numerical computations – No general purpose quantum circuits implementing fundamental functions – Details about numerical calculations have been avoided in a way

  4. Requirements – quantum circuit model • Develop a standard for numerical computations – Reversible computation • Fixed precision representation of numbers • Quantum algorithms for scientific computing with performance guarantees – error & cost

  5. Quantum algorithms &circuits for fundamental functions • Library of elementary quantum circuit templates implementing – Arithmetic expressions – Shifts – Initial approximations for iterative methods – New circuits are added to the library as they are derived • Elementary quantum circuits are modules with known error and cost characteristics • New algorithms are implemented by combining modules

  6. Algorithms Input: 𝑜 +1 qubit register 𝑥 = 𝑥 𝑡 ⊗ 𝑥 (𝑛−1) ⊗ ⋯ ⊗ 𝑥 (0) ⊗ 𝑥 −1 ⊗ ⋯ ⊗ |𝑥 (𝑛−𝑜) ⟩ sign integer part fractional part 𝑛−1 𝑥 𝑡 , 𝑥 (𝑘) ∈ {0,1}, 𝑥 𝑘 2 𝑘 𝑥 = −1 𝑥 𝑡 𝑘=𝑛−𝑜 • Register length may be different for intermediate calculations.

  7. Elementary quantum circuit template examples 1. |𝑦⟩ |𝑠𝑓𝑡⟩ |𝑧⟩ |𝑧⟩ 𝑠𝑓𝑡 = 𝑦𝑧 + 𝑨 |𝑨⟩ |𝑨⟩ • Addition and multiplication imply that the format of 𝑠𝑓𝑡 is known given the format of the inputs • 𝑜 bit inputs: 𝑠𝑓𝑡 can be represented exactly using 2𝑜 + 1 bits (qubits) (plus sign) of which 2(𝑜 − 𝑛) hold the fractional part • Any desired number 𝑐 of significant bits after the decimal point in 𝑠𝑓𝑡 can be passed on to the next stage

  8. 2. 0 = 2 −𝑞 for 𝑞 such Quantum circuit which on input 𝑥 ≥ 1 computes 𝑦 that 2 𝑞 > 𝑥 ≥ 2 𝑞−1 . Initial approximation for Newton iteration computing 𝑥 −1 , 𝑥 ≥ 1 Other similar circuits are also included

  9. Applications We have derived quantum algorithms for: • 𝑥 −1 Earlier work [Cao, P, Petras, Traub, Kais] • sin 𝑥 , cos 𝑥 Poisson equation • Inverse trigonometric 𝑥 • • 𝑥 1/2 𝑗 , 𝑗 = 1, … , 𝑙 • ln 𝑥 • 𝑥 𝑔 , 𝑔 ∈ 0,1

  10. Square root - 𝑥, w ≥ 1 Use Newton iteration Selection of function whose zero is 𝑥 is important e.g., 𝑔 𝑦 = 𝑦 2 − 𝑥 is not a good choice 2 Iterative step 𝑦 𝑗 = 𝑦 𝑗−1 − (𝑦 𝑗−1 − 𝑥)/(2𝑦 𝑗−1 ) requires division Need extra circuitry to keep track of location of decimal point in result

  11. We use: 1. One iteration 𝑦 𝑗 → 𝑥 −1 2 𝑦 𝑗 = 𝑕 1 𝑦 𝑗−1 ≔ −𝑥 𝑦 𝑗−1 + 2 𝑦 𝑗−1 , 𝑗 = 1, … , 𝑡 1 1 2. Second iteration 𝑧 𝑘 → 𝑦 𝑡1 ≈ 𝑥 3 3 𝑧 𝑘−1 − 𝑦 𝑡 1 𝑧 𝑘−1 𝑧 𝑘 = 𝑕 2 𝑧 𝑘−1 ≔ , 𝑘 = 1, … , 𝑡 2 2

  12. Quantum circuit for 𝑥 , 𝑥 = 𝑛 bits 𝑜 − 𝑛 bits . • 𝑧 0 , 𝑦 0 init. approx. • In each stage calculations are exact • Results are truncated to 𝑐 bits (qubits) after the decimal point and passed on to the next stage

  13. Thm. 𝑐−2𝑛 3 𝑧 𝑡 − 𝑥 ≤ 2 + 𝑐 + log 2 𝑐 , 𝑐 ≥ max 2𝑛, 4 4 Cost: • # iterative steps: 𝑡 ≔ 𝑡 1 = 𝑡 2 = 𝑃(log 2 𝑐) • # qubits per step: 𝑃 𝑜 + 𝑐 • # quantum ops. per step: low degree poly in 𝑜 + 𝑐

  14. Logarithm - ln 𝑥 , 𝑥 > 1 Algorithm: 1. Shift right 𝑥 to obtain 𝑥 𝑞 = 2 1−𝑞 𝑥 ∈ (1,2) , with 2 𝑞 > 𝑥 ≥ 2 𝑞−1 1/2 ℓ . Note 𝑢 𝑞 = 1 + 𝜀 , with 𝜀 ≈ 2 −ℓ 2. Compute 𝑢 𝑞 = 𝑥 𝑞 𝜀 2 3. Approximate ln 𝑢 𝑞 ≈ 𝜀 − 2 𝜀 2 4. ln 𝑥 ≈ (𝑞 − 1) ln 2 + 2 ℓ 𝜀 − 2

  15. Quantum circuit for ln 𝑥 2 𝑢 𝑞 −1 𝑧 𝑞 = 𝑔 𝑢 𝑞 = 𝑢 𝑞 − 1 − ≈ ln 𝑢 𝑞 (step 3 of alg.) 2 𝑨 𝑞 = 2 ℓ 𝑧 𝑞 (step 4 of alg.)

  16. Thm. 5ℓ/2 3 3 𝑛 + 32 9 + 2 32 9 + 𝑜 [ 𝑞 − 1 ln 2 + 𝑨 𝑞 ] − ln 𝑥 ≤ 4 ln 2 where ℓ ≥ log 2 8𝑜 , 𝑐 ≥ max 5ℓ, 25 Cost: Total # qubits is proportional to ℓ 𝑜 + 𝑐 log 2 𝑐 Total # of quantum operations is proportional to ℓ times a poly in 𝑜 + 𝑐

  17. Tests 𝑥 : Comparison between our algorithm and Matlab

  18. ln 𝑥 : Comparison between our algorithm and Matlab

  19. Summary • Quantum algorithms & circuits for fundamental functions • Performance guarantees (accuracy, cost) • Modular design • Easy to derive error bounds • Easy to derive resource estimates • Internal implementation details can be changed transparently

Recommend


More recommend