Understanding Deutch's AlgorithmHow would I implement the quantum oracle in Deutsch's algorithm?Deutsch Algorithm on a Quantum Turing MachineHow is the Deutsch-Jozsa algorithm faster than classical for practical implementation?Deutsch algorithm with equal input bitsWhy doesn't Deutsch-Jozsa Algorithm show that P ≠ BQP?How to understand Deutsch-Jozsa algorithm from an adiabatic perspective?Deutsch–Jozsa algorithm: why is $f$ constant?How does an oracle function in Grover's algorithm actually work?What can be a mini research project based on Grover's algorithm or the Deutsch Jozsa algorithm?Deutsch-Jozsa algorithm as a generalization of Bernstein-Vazirani
Why did the UK remove the 'European Union' from its passport?
Using chord iii in a chord progression (major key)
Why is Drogon so much better in battle than Rhaegal and Viserion?
Could there be something like aerobatic smoke trails in the vacuum of space?
Why can't I share a one use code with anyone else?
Promotion comes with unexpected 24/7/365 on-call
c++ conditional uni-directional iterator
Windows 10 lock screen - display my own random images
Cuban Primes
Can anyone give me examples of the relative-determinative 'which'?
Can I say: "When was your train leaving?" if the train leaves in the future?
Why are lawsuits between the President and Congress not automatically sent to the Supreme Court
Is the seat-belt sign activation when a pilot goes to the lavatory standard procedure?
Does addError() work outside of triggers?
What dog breeds survive the apocalypse for generations?
Will the volt, ampere, ohm or other electrical units change on May 20th, 2019?
How to redirect stdout to a file, and stdout+stderr to another one?
Why did the metro bus stop at each railway crossing, despite no warning indicating a train was coming?
Can my American children re-enter the USA by International flight with a passport card? Being that their passport book has expired
Would life always name the light from their sun "white"
Network latencies between opposite ends of the Earth
Why doesn't Iron Man's action affect this person in Endgame?
It is as easy as A B C, Figure out U V C from the given relationship
the correct order of manual install WP and SSL on server
Understanding Deutch's Algorithm
How would I implement the quantum oracle in Deutsch's algorithm?Deutsch Algorithm on a Quantum Turing MachineHow is the Deutsch-Jozsa algorithm faster than classical for practical implementation?Deutsch algorithm with equal input bitsWhy doesn't Deutsch-Jozsa Algorithm show that P ≠ BQP?How to understand Deutsch-Jozsa algorithm from an adiabatic perspective?Deutsch–Jozsa algorithm: why is $f$ constant?How does an oracle function in Grover's algorithm actually work?What can be a mini research project based on Grover's algorithm or the Deutsch Jozsa algorithm?Deutsch-Jozsa algorithm as a generalization of Bernstein-Vazirani
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
I am reading John Waltrous notes from his course CPSC 519 on quantum computing. In a pre-discussion before presenting Deutsch's algorithm to determine whether a function is constant or not, the author presents a function $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $, and the diagram:
The inital state is $|0 rangle |1 rangle$, and after the first two Hadamard transforms, will be $big(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1ranglebig)big(frac 1 sqrt 2 |0rangle-frac 1 sqrt 2 |1ranglebig) $.
Up to this far I understand. The author then writes: "After performing the $B_f$ operation the state is transformed to :
$frac 1 2 |0 rangle big(|0 oplus f(0)rangle - |1 oplus f(0)ranglebig) + frac 1 2 |1 rangle big(|0 oplus f(1)rangle) - |1 oplus f(1) ranglebig)$ ".
I am not sure how this was obtained, from what I understand, the operation should be
$frac 1 sqrt 2 big( |0rangle + |1ranglebig) otimes big|(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle) oplus f(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle) bigrangle$ (simply subbing in $x,y$ to $B_f$). Any insights appreciated as this subject is completely new to me, although I have a decent mathematics and computer science background.
deutsch-jozsa-algorithm
New contributor
$endgroup$
add a comment |
$begingroup$
I am reading John Waltrous notes from his course CPSC 519 on quantum computing. In a pre-discussion before presenting Deutsch's algorithm to determine whether a function is constant or not, the author presents a function $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $, and the diagram:
The inital state is $|0 rangle |1 rangle$, and after the first two Hadamard transforms, will be $big(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1ranglebig)big(frac 1 sqrt 2 |0rangle-frac 1 sqrt 2 |1ranglebig) $.
Up to this far I understand. The author then writes: "After performing the $B_f$ operation the state is transformed to :
$frac 1 2 |0 rangle big(|0 oplus f(0)rangle - |1 oplus f(0)ranglebig) + frac 1 2 |1 rangle big(|0 oplus f(1)rangle) - |1 oplus f(1) ranglebig)$ ".
I am not sure how this was obtained, from what I understand, the operation should be
$frac 1 sqrt 2 big( |0rangle + |1ranglebig) otimes big|(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle) oplus f(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle) bigrangle$ (simply subbing in $x,y$ to $B_f$). Any insights appreciated as this subject is completely new to me, although I have a decent mathematics and computer science background.
deutsch-jozsa-algorithm
New contributor
$endgroup$
add a comment |
$begingroup$
I am reading John Waltrous notes from his course CPSC 519 on quantum computing. In a pre-discussion before presenting Deutsch's algorithm to determine whether a function is constant or not, the author presents a function $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $, and the diagram:
The inital state is $|0 rangle |1 rangle$, and after the first two Hadamard transforms, will be $big(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1ranglebig)big(frac 1 sqrt 2 |0rangle-frac 1 sqrt 2 |1ranglebig) $.
Up to this far I understand. The author then writes: "After performing the $B_f$ operation the state is transformed to :
$frac 1 2 |0 rangle big(|0 oplus f(0)rangle - |1 oplus f(0)ranglebig) + frac 1 2 |1 rangle big(|0 oplus f(1)rangle) - |1 oplus f(1) ranglebig)$ ".
I am not sure how this was obtained, from what I understand, the operation should be
$frac 1 sqrt 2 big( |0rangle + |1ranglebig) otimes big|(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle) oplus f(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle) bigrangle$ (simply subbing in $x,y$ to $B_f$). Any insights appreciated as this subject is completely new to me, although I have a decent mathematics and computer science background.
deutsch-jozsa-algorithm
New contributor
$endgroup$
I am reading John Waltrous notes from his course CPSC 519 on quantum computing. In a pre-discussion before presenting Deutsch's algorithm to determine whether a function is constant or not, the author presents a function $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $, and the diagram:
The inital state is $|0 rangle |1 rangle$, and after the first two Hadamard transforms, will be $big(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1ranglebig)big(frac 1 sqrt 2 |0rangle-frac 1 sqrt 2 |1ranglebig) $.
Up to this far I understand. The author then writes: "After performing the $B_f$ operation the state is transformed to :
$frac 1 2 |0 rangle big(|0 oplus f(0)rangle - |1 oplus f(0)ranglebig) + frac 1 2 |1 rangle big(|0 oplus f(1)rangle) - |1 oplus f(1) ranglebig)$ ".
I am not sure how this was obtained, from what I understand, the operation should be
$frac 1 sqrt 2 big( |0rangle + |1ranglebig) otimes big|(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle) oplus f(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle) bigrangle$ (simply subbing in $x,y$ to $B_f$). Any insights appreciated as this subject is completely new to me, although I have a decent mathematics and computer science background.
deutsch-jozsa-algorithm
deutsch-jozsa-algorithm
New contributor
New contributor
edited 3 hours ago
Mariia Mykhailova
2,0751212
2,0751212
New contributor
asked 4 hours ago
IntegrateThisIntegrateThis
1084
1084
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Remember that when you define the oracle effect as $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $, $f(x)$ is a classical function of a classical 1-bit argument, so you do not have a way to compute $f(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle)$ (a function of a quantum state).
The quantum oracles that implement classical functions are defined as follows:
Define the effect of the oracle on all basis states for $|xrangle$ and $|yrangle$: $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $.
This will automatically define the effect of the oracle on all superposition states: the oracle is a quantum operation and has to be linear in the state on which it acts. So if you start with a state $frac12 (|00rangle + |10rangle - |01rangle - |11rangle)$ (which is the state after applying Hadamard gates) and apply the oracle, you need to apply oracle to each basis state separately. You'll get
$$B_f frac12 (|00rangle + |10rangle - |01rangle - |11rangle) = frac12 (B_f|00rangle + B_f|10rangle - B_f|01rangle - B_f|11rangle) =$$
$$ = frac12 (|0rangle|0 oplus f(0)rangle + |1rangle|0 oplus f(1)rangle - |0rangle|1 oplus f(0)rangle - |1rangle|1 oplus f(1)rangle)$$
Which is the same as the expression in the notes, up to a different grouping or terms.
The part about the oracles being defined by their effect on basis states is implicit in a lot of sources I've seen, and is a frequent source of confusion. If you need more mathematical details on this, we ended up writing it up here.
$endgroup$
2
$begingroup$
Another resource that may be helpful is Learn Quantum Computing with Python and Q# which should have the chapter on Deutsch–Jozsa algorithm up shortly! We work though implementing Deutsch–Jozsa in Q# as well as in Python with QuTiP. <manning.com/books/…>
$endgroup$
– Dr. Sarah Kaiser
3 hours ago
$begingroup$
Thanks so much for your help! I am very grateful :)
$endgroup$
– IntegrateThis
2 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "694"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
IntegrateThis is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fquantumcomputing.stackexchange.com%2fquestions%2f6146%2funderstanding-deutchs-algorithm%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Remember that when you define the oracle effect as $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $, $f(x)$ is a classical function of a classical 1-bit argument, so you do not have a way to compute $f(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle)$ (a function of a quantum state).
The quantum oracles that implement classical functions are defined as follows:
Define the effect of the oracle on all basis states for $|xrangle$ and $|yrangle$: $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $.
This will automatically define the effect of the oracle on all superposition states: the oracle is a quantum operation and has to be linear in the state on which it acts. So if you start with a state $frac12 (|00rangle + |10rangle - |01rangle - |11rangle)$ (which is the state after applying Hadamard gates) and apply the oracle, you need to apply oracle to each basis state separately. You'll get
$$B_f frac12 (|00rangle + |10rangle - |01rangle - |11rangle) = frac12 (B_f|00rangle + B_f|10rangle - B_f|01rangle - B_f|11rangle) =$$
$$ = frac12 (|0rangle|0 oplus f(0)rangle + |1rangle|0 oplus f(1)rangle - |0rangle|1 oplus f(0)rangle - |1rangle|1 oplus f(1)rangle)$$
Which is the same as the expression in the notes, up to a different grouping or terms.
The part about the oracles being defined by their effect on basis states is implicit in a lot of sources I've seen, and is a frequent source of confusion. If you need more mathematical details on this, we ended up writing it up here.
$endgroup$
2
$begingroup$
Another resource that may be helpful is Learn Quantum Computing with Python and Q# which should have the chapter on Deutsch–Jozsa algorithm up shortly! We work though implementing Deutsch–Jozsa in Q# as well as in Python with QuTiP. <manning.com/books/…>
$endgroup$
– Dr. Sarah Kaiser
3 hours ago
$begingroup$
Thanks so much for your help! I am very grateful :)
$endgroup$
– IntegrateThis
2 hours ago
add a comment |
$begingroup$
Remember that when you define the oracle effect as $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $, $f(x)$ is a classical function of a classical 1-bit argument, so you do not have a way to compute $f(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle)$ (a function of a quantum state).
The quantum oracles that implement classical functions are defined as follows:
Define the effect of the oracle on all basis states for $|xrangle$ and $|yrangle$: $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $.
This will automatically define the effect of the oracle on all superposition states: the oracle is a quantum operation and has to be linear in the state on which it acts. So if you start with a state $frac12 (|00rangle + |10rangle - |01rangle - |11rangle)$ (which is the state after applying Hadamard gates) and apply the oracle, you need to apply oracle to each basis state separately. You'll get
$$B_f frac12 (|00rangle + |10rangle - |01rangle - |11rangle) = frac12 (B_f|00rangle + B_f|10rangle - B_f|01rangle - B_f|11rangle) =$$
$$ = frac12 (|0rangle|0 oplus f(0)rangle + |1rangle|0 oplus f(1)rangle - |0rangle|1 oplus f(0)rangle - |1rangle|1 oplus f(1)rangle)$$
Which is the same as the expression in the notes, up to a different grouping or terms.
The part about the oracles being defined by their effect on basis states is implicit in a lot of sources I've seen, and is a frequent source of confusion. If you need more mathematical details on this, we ended up writing it up here.
$endgroup$
2
$begingroup$
Another resource that may be helpful is Learn Quantum Computing with Python and Q# which should have the chapter on Deutsch–Jozsa algorithm up shortly! We work though implementing Deutsch–Jozsa in Q# as well as in Python with QuTiP. <manning.com/books/…>
$endgroup$
– Dr. Sarah Kaiser
3 hours ago
$begingroup$
Thanks so much for your help! I am very grateful :)
$endgroup$
– IntegrateThis
2 hours ago
add a comment |
$begingroup$
Remember that when you define the oracle effect as $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $, $f(x)$ is a classical function of a classical 1-bit argument, so you do not have a way to compute $f(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle)$ (a function of a quantum state).
The quantum oracles that implement classical functions are defined as follows:
Define the effect of the oracle on all basis states for $|xrangle$ and $|yrangle$: $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $.
This will automatically define the effect of the oracle on all superposition states: the oracle is a quantum operation and has to be linear in the state on which it acts. So if you start with a state $frac12 (|00rangle + |10rangle - |01rangle - |11rangle)$ (which is the state after applying Hadamard gates) and apply the oracle, you need to apply oracle to each basis state separately. You'll get
$$B_f frac12 (|00rangle + |10rangle - |01rangle - |11rangle) = frac12 (B_f|00rangle + B_f|10rangle - B_f|01rangle - B_f|11rangle) =$$
$$ = frac12 (|0rangle|0 oplus f(0)rangle + |1rangle|0 oplus f(1)rangle - |0rangle|1 oplus f(0)rangle - |1rangle|1 oplus f(1)rangle)$$
Which is the same as the expression in the notes, up to a different grouping or terms.
The part about the oracles being defined by their effect on basis states is implicit in a lot of sources I've seen, and is a frequent source of confusion. If you need more mathematical details on this, we ended up writing it up here.
$endgroup$
Remember that when you define the oracle effect as $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $, $f(x)$ is a classical function of a classical 1-bit argument, so you do not have a way to compute $f(frac 1 sqrt 2 |0rangle +frac 1 sqrt 2 |1rangle)$ (a function of a quantum state).
The quantum oracles that implement classical functions are defined as follows:
Define the effect of the oracle on all basis states for $|xrangle$ and $|yrangle$: $B_f |x rangle |y rangle = |x rangle |y oplus f(x) rangle $.
This will automatically define the effect of the oracle on all superposition states: the oracle is a quantum operation and has to be linear in the state on which it acts. So if you start with a state $frac12 (|00rangle + |10rangle - |01rangle - |11rangle)$ (which is the state after applying Hadamard gates) and apply the oracle, you need to apply oracle to each basis state separately. You'll get
$$B_f frac12 (|00rangle + |10rangle - |01rangle - |11rangle) = frac12 (B_f|00rangle + B_f|10rangle - B_f|01rangle - B_f|11rangle) =$$
$$ = frac12 (|0rangle|0 oplus f(0)rangle + |1rangle|0 oplus f(1)rangle - |0rangle|1 oplus f(0)rangle - |1rangle|1 oplus f(1)rangle)$$
Which is the same as the expression in the notes, up to a different grouping or terms.
The part about the oracles being defined by their effect on basis states is implicit in a lot of sources I've seen, and is a frequent source of confusion. If you need more mathematical details on this, we ended up writing it up here.
answered 3 hours ago
Mariia MykhailovaMariia Mykhailova
2,0751212
2,0751212
2
$begingroup$
Another resource that may be helpful is Learn Quantum Computing with Python and Q# which should have the chapter on Deutsch–Jozsa algorithm up shortly! We work though implementing Deutsch–Jozsa in Q# as well as in Python with QuTiP. <manning.com/books/…>
$endgroup$
– Dr. Sarah Kaiser
3 hours ago
$begingroup$
Thanks so much for your help! I am very grateful :)
$endgroup$
– IntegrateThis
2 hours ago
add a comment |
2
$begingroup$
Another resource that may be helpful is Learn Quantum Computing with Python and Q# which should have the chapter on Deutsch–Jozsa algorithm up shortly! We work though implementing Deutsch–Jozsa in Q# as well as in Python with QuTiP. <manning.com/books/…>
$endgroup$
– Dr. Sarah Kaiser
3 hours ago
$begingroup$
Thanks so much for your help! I am very grateful :)
$endgroup$
– IntegrateThis
2 hours ago
2
2
$begingroup$
Another resource that may be helpful is Learn Quantum Computing with Python and Q# which should have the chapter on Deutsch–Jozsa algorithm up shortly! We work though implementing Deutsch–Jozsa in Q# as well as in Python with QuTiP. <manning.com/books/…>
$endgroup$
– Dr. Sarah Kaiser
3 hours ago
$begingroup$
Another resource that may be helpful is Learn Quantum Computing with Python and Q# which should have the chapter on Deutsch–Jozsa algorithm up shortly! We work though implementing Deutsch–Jozsa in Q# as well as in Python with QuTiP. <manning.com/books/…>
$endgroup$
– Dr. Sarah Kaiser
3 hours ago
$begingroup$
Thanks so much for your help! I am very grateful :)
$endgroup$
– IntegrateThis
2 hours ago
$begingroup$
Thanks so much for your help! I am very grateful :)
$endgroup$
– IntegrateThis
2 hours ago
add a comment |
IntegrateThis is a new contributor. Be nice, and check out our Code of Conduct.
IntegrateThis is a new contributor. Be nice, and check out our Code of Conduct.
IntegrateThis is a new contributor. Be nice, and check out our Code of Conduct.
IntegrateThis is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Quantum Computing Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fquantumcomputing.stackexchange.com%2fquestions%2f6146%2funderstanding-deutchs-algorithm%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown