SlideShare a Scribd company logo
1 of 8
IBM quantum challenge 2020 week2-a
Lightsアウ
ト
Lightsアウトのルール:ボタンを押すとそのボタン自身と隣り
合っているボタンの明暗が変化する。最終的にすべて
の
ライトを消したら、クリア。
この状態だったら、0のボタンを押したら、すべて
のライトが消える。
この回路でどのボタンを押せばよいか
わかる。なぜこの回路でできるかを説明
する。
ライツアウトのルールを回路に変えるとすると、どうすれば良いか。
左のような2×2のライツを考える。
光っている状態を|1> , 消えている状態を|0>とする
と、
最初の状態は、[1,1,1,0]となる。
① ボタンを押すという操作をどう表現する
か。
ボタン操作を左図のABCDの回路で表し、
押す→|1>,押さない→|0> とする。
EFGHはライツの状態を表す。ABCDで|1>
だったときに、EFGHの適切なものを反転
させればよい。
|1>で反転→CNOTゲートを使う。
どのボタンを
押すか
(上から0,1,2,3)
入力(各ライトの
明暗の状態。上
から、0,1,2,3)。
ここでは、初期
状態は[1,1,1,0]
を表す。
A
B
C
D
E
F
H
G
例)0(A)を押したとき、
0,1,2(E,F,G)を反転
①
左のように、for文、if文をつかえ
ば、ライトの初期状態に応じた押
すべきボタンが分かる回路が作れ
る。これによってライツアウトを
とくことができる。
ここの状態を
様々に変えら
れる
どのボタンを
押すか
(上から0,1,2,3)
入力(各ライトの
明暗の状態。上
から、0,1,2,3)。
ここでは、初期
状態は[1,1,1,0]
を表す。
A
B
C
D
E
F
H
G
どのボタンを押せばよいか確かめる
回路を作る。
② すべてのライトの状態が0にな
ればよいから、全て0になるものを
増幅する。
すべて0のとき反転
巻き戻すことで、余計なもの
をなくす。
平均値周りの回転
②
0だけを押せばよいという結果を出すことができた。
このように、3×3のもの
でも同様に作れる。

More Related Content

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Quantum circuit rights-out solution.pptx