iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 18
1
自我挑戰組

About Quantum Computing系列 第 18

Day 18 Quantum Protocols and Quantum Algorithms

  • 分享至 

  • xImage
  •  

Deutsch-Jozsa Algorithm

  • hidden Boolean function f
  • input - a string of bits
  • output - either 0 or 1

Constant function returns all 0's or all 1's
Balanced function returns 0's for exactly half and 1's for the other half

Classical Solution

  • if both f(0,0,0,...) -> 0 and f(1,0,0,...) -> 1, then the function is balanced

Quantum Solution

  1. Prepare two quantum registers
  • first - n-qubit register(initialised to |0⟩)
  • second - one-qubit register(initialised to |1⟩)
  1. Apply Hadamard gate to each qubit
  2. Apply quantum oracle |x⟩|y⟩ to |x⟩|y⊕f(x)⟩
  3. Ignore second single qubit register and apply Hadamard gate to each qubit in first register
  4. Measure first register

上一篇
Day 17 Quantum Protocols and Quantum Algorithms
下一篇
Day 19 Quantum Protocols and Quantum Algorithms
系列文
About Quantum Computing31
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言