Implement a Hamiltonian in O(n) - exercise questionObtaining gate $e^-iDelta t Z$ from elementary gatesQuantum algorithm for linear systems of equations (HHL09): Step 1 - Confusion regarding the usage of phase estimation algorithmHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Is there a Hamiltonian simulation technique implemented somewhere?Example of Hamiltonian Simulation solving interesting problem?Qutrit TeleportationHow exactly does modular exponentiation in Shor's algorithm work?How to apply unitary coupled cluster to a spin problem?Understanding this description of teleportation
Cause of continuous spectral lines
4*4*4 Rubiks cube Top Layer Issue
Strat tremolo bar has tightening issues
Translating 'Liber'
Efficient integer floor function in C++
Can an Eldritch Knight use Action Surge and thus Arcane Charge even when surprised?
How do photons get into the eyes?
Java guess the number
Why is the past conditionel used here?
How Can I Tell The Difference Between Unmarked Sugar and Stevia?
Does there exist a word to express a male who behaves as a female?
Is it recommended against to open-source the code of a webapp?
Remove sudoers using script
Deformation of rectangular plot
Select items in a list that contain criteria #2
Last survivors from different time periods living together
Should I "tell" my exposition or give it through dialogue?
Avoiding cliches when writing gods
Why only the fundamental frequency component is said to give useful power?
How did students remember what to practise between lessons without any sheet music?
How to make a setting relevant?
Can you really not move between grapples/shoves?
SF novella separating the dumb majority from the intelligent part of mankind
Did the first version of Linux developed by Linus Torvalds have a GUI?
Implement a Hamiltonian in O(n) - exercise question
Obtaining gate $e^-iDelta t Z$ from elementary gatesQuantum algorithm for linear systems of equations (HHL09): Step 1 - Confusion regarding the usage of phase estimation algorithmHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Is there a Hamiltonian simulation technique implemented somewhere?Example of Hamiltonian Simulation solving interesting problem?Qutrit TeleportationHow exactly does modular exponentiation in Shor's algorithm work?How to apply unitary coupled cluster to a spin problem?Understanding this description of teleportation
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
I have the following exercise to solve:
Consider the Boolean function $f(x_1 . . . x_n) = x_1 oplus dots oplus x_n$
where $x_1 dots x_n$ is an nbit string and $oplus$ denotes addition mod $2$.
Describe a circuit of $2$-qubit gates on $n + 1$ qubits that implements the
transformation $| x_1 dots x_n rangle | 0 rangle mapsto | x_1 dots x_n rangle | x_1 oplus dots oplus x_nrangle$
By considering a relationship between $f$ and the $n$-qubit Hamiltonian
$Z otimes dots otimes Z$, show that $V = exp(i Z otimes dots otimes Z t)$, for any
fixed $t > 0$, may be implemented on n qubit lines (with possible use
of further ancillary lines) by a circuit of size $O(n)$ of $1$- and
$2$-qubit gates.
My circuit for the first part of the question is just $n$ CNOT gates controlled by the first register and acting on the $1$-qubit register. So far so good. However, for the second part of the question, I don't understand the relation to the Hamiltonian. I understand that I could use $H^otimes n$ to convert $X$ into $Z$ gates but still.
Any help appreciated.
algorithm hamiltonian-simulation
$endgroup$
add a comment |
$begingroup$
I have the following exercise to solve:
Consider the Boolean function $f(x_1 . . . x_n) = x_1 oplus dots oplus x_n$
where $x_1 dots x_n$ is an nbit string and $oplus$ denotes addition mod $2$.
Describe a circuit of $2$-qubit gates on $n + 1$ qubits that implements the
transformation $| x_1 dots x_n rangle | 0 rangle mapsto | x_1 dots x_n rangle | x_1 oplus dots oplus x_nrangle$
By considering a relationship between $f$ and the $n$-qubit Hamiltonian
$Z otimes dots otimes Z$, show that $V = exp(i Z otimes dots otimes Z t)$, for any
fixed $t > 0$, may be implemented on n qubit lines (with possible use
of further ancillary lines) by a circuit of size $O(n)$ of $1$- and
$2$-qubit gates.
My circuit for the first part of the question is just $n$ CNOT gates controlled by the first register and acting on the $1$-qubit register. So far so good. However, for the second part of the question, I don't understand the relation to the Hamiltonian. I understand that I could use $H^otimes n$ to convert $X$ into $Z$ gates but still.
Any help appreciated.
algorithm hamiltonian-simulation
$endgroup$
add a comment |
$begingroup$
I have the following exercise to solve:
Consider the Boolean function $f(x_1 . . . x_n) = x_1 oplus dots oplus x_n$
where $x_1 dots x_n$ is an nbit string and $oplus$ denotes addition mod $2$.
Describe a circuit of $2$-qubit gates on $n + 1$ qubits that implements the
transformation $| x_1 dots x_n rangle | 0 rangle mapsto | x_1 dots x_n rangle | x_1 oplus dots oplus x_nrangle$
By considering a relationship between $f$ and the $n$-qubit Hamiltonian
$Z otimes dots otimes Z$, show that $V = exp(i Z otimes dots otimes Z t)$, for any
fixed $t > 0$, may be implemented on n qubit lines (with possible use
of further ancillary lines) by a circuit of size $O(n)$ of $1$- and
$2$-qubit gates.
My circuit for the first part of the question is just $n$ CNOT gates controlled by the first register and acting on the $1$-qubit register. So far so good. However, for the second part of the question, I don't understand the relation to the Hamiltonian. I understand that I could use $H^otimes n$ to convert $X$ into $Z$ gates but still.
Any help appreciated.
algorithm hamiltonian-simulation
$endgroup$
I have the following exercise to solve:
Consider the Boolean function $f(x_1 . . . x_n) = x_1 oplus dots oplus x_n$
where $x_1 dots x_n$ is an nbit string and $oplus$ denotes addition mod $2$.
Describe a circuit of $2$-qubit gates on $n + 1$ qubits that implements the
transformation $| x_1 dots x_n rangle | 0 rangle mapsto | x_1 dots x_n rangle | x_1 oplus dots oplus x_nrangle$
By considering a relationship between $f$ and the $n$-qubit Hamiltonian
$Z otimes dots otimes Z$, show that $V = exp(i Z otimes dots otimes Z t)$, for any
fixed $t > 0$, may be implemented on n qubit lines (with possible use
of further ancillary lines) by a circuit of size $O(n)$ of $1$- and
$2$-qubit gates.
My circuit for the first part of the question is just $n$ CNOT gates controlled by the first register and acting on the $1$-qubit register. So far so good. However, for the second part of the question, I don't understand the relation to the Hamiltonian. I understand that I could use $H^otimes n$ to convert $X$ into $Z$ gates but still.
Any help appreciated.
algorithm hamiltonian-simulation
algorithm hamiltonian-simulation
edited May 28 at 14:11
Sanchayan Dutta
7,44841660
7,44841660
asked May 28 at 8:16
MarslMarsl
404
404
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Note: I'm deliberately leaving a few gaps here. Hopefully I'm saying enough to let you piece te rest together!
Let's say that you want to implement $V$ on some state
$$
sum_xin0,1^nalpha_x|xrangle
$$
You can fairly easily write down what that state produces. Think about the Hamiltonian $Z^otimes n$. What eigenvalues does it have? $lambda=pm 1$. What are the eigenvectors? The computational basis states $|x_1ldots x_nrangle$. So, the output of $V$ is
$$
sum_x:lambda_x=1alpha_xe^i t|xrangle+sum_x:lambda_x=-1alpha_xe^-i t|xrangle
$$
Hence, can you use your function $f$ to determine which eigenvalue a particular $x$ has? How do you then use tha to apply the correct phase for the evolution? Don't forget that if you use an ancilla qubit, you must undo any entanglement you may have created with it.
$endgroup$
$begingroup$
perfect explanation, got it thanks, I just use my function to compute whether I have even or odd number of say 1 bits in my state, store this information in an ancilla qubit by the circuit of CX gates, then apply a phase gate to the ancilla, then I undo the first computation by applying the CNOT gates in reverse order (CNOT$^-1=$CNOT) and then I discard the ancilla, but the phase remains on my state?!
$endgroup$
– Marsl
May 29 at 9:52
$begingroup$
@Marsl Yes, exactly :)
$endgroup$
– DaftWullie
May 29 at 10:05
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
);
);
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%2f6253%2fimplement-a-hamiltonian-in-on-exercise-question%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$
Note: I'm deliberately leaving a few gaps here. Hopefully I'm saying enough to let you piece te rest together!
Let's say that you want to implement $V$ on some state
$$
sum_xin0,1^nalpha_x|xrangle
$$
You can fairly easily write down what that state produces. Think about the Hamiltonian $Z^otimes n$. What eigenvalues does it have? $lambda=pm 1$. What are the eigenvectors? The computational basis states $|x_1ldots x_nrangle$. So, the output of $V$ is
$$
sum_x:lambda_x=1alpha_xe^i t|xrangle+sum_x:lambda_x=-1alpha_xe^-i t|xrangle
$$
Hence, can you use your function $f$ to determine which eigenvalue a particular $x$ has? How do you then use tha to apply the correct phase for the evolution? Don't forget that if you use an ancilla qubit, you must undo any entanglement you may have created with it.
$endgroup$
$begingroup$
perfect explanation, got it thanks, I just use my function to compute whether I have even or odd number of say 1 bits in my state, store this information in an ancilla qubit by the circuit of CX gates, then apply a phase gate to the ancilla, then I undo the first computation by applying the CNOT gates in reverse order (CNOT$^-1=$CNOT) and then I discard the ancilla, but the phase remains on my state?!
$endgroup$
– Marsl
May 29 at 9:52
$begingroup$
@Marsl Yes, exactly :)
$endgroup$
– DaftWullie
May 29 at 10:05
add a comment |
$begingroup$
Note: I'm deliberately leaving a few gaps here. Hopefully I'm saying enough to let you piece te rest together!
Let's say that you want to implement $V$ on some state
$$
sum_xin0,1^nalpha_x|xrangle
$$
You can fairly easily write down what that state produces. Think about the Hamiltonian $Z^otimes n$. What eigenvalues does it have? $lambda=pm 1$. What are the eigenvectors? The computational basis states $|x_1ldots x_nrangle$. So, the output of $V$ is
$$
sum_x:lambda_x=1alpha_xe^i t|xrangle+sum_x:lambda_x=-1alpha_xe^-i t|xrangle
$$
Hence, can you use your function $f$ to determine which eigenvalue a particular $x$ has? How do you then use tha to apply the correct phase for the evolution? Don't forget that if you use an ancilla qubit, you must undo any entanglement you may have created with it.
$endgroup$
$begingroup$
perfect explanation, got it thanks, I just use my function to compute whether I have even or odd number of say 1 bits in my state, store this information in an ancilla qubit by the circuit of CX gates, then apply a phase gate to the ancilla, then I undo the first computation by applying the CNOT gates in reverse order (CNOT$^-1=$CNOT) and then I discard the ancilla, but the phase remains on my state?!
$endgroup$
– Marsl
May 29 at 9:52
$begingroup$
@Marsl Yes, exactly :)
$endgroup$
– DaftWullie
May 29 at 10:05
add a comment |
$begingroup$
Note: I'm deliberately leaving a few gaps here. Hopefully I'm saying enough to let you piece te rest together!
Let's say that you want to implement $V$ on some state
$$
sum_xin0,1^nalpha_x|xrangle
$$
You can fairly easily write down what that state produces. Think about the Hamiltonian $Z^otimes n$. What eigenvalues does it have? $lambda=pm 1$. What are the eigenvectors? The computational basis states $|x_1ldots x_nrangle$. So, the output of $V$ is
$$
sum_x:lambda_x=1alpha_xe^i t|xrangle+sum_x:lambda_x=-1alpha_xe^-i t|xrangle
$$
Hence, can you use your function $f$ to determine which eigenvalue a particular $x$ has? How do you then use tha to apply the correct phase for the evolution? Don't forget that if you use an ancilla qubit, you must undo any entanglement you may have created with it.
$endgroup$
Note: I'm deliberately leaving a few gaps here. Hopefully I'm saying enough to let you piece te rest together!
Let's say that you want to implement $V$ on some state
$$
sum_xin0,1^nalpha_x|xrangle
$$
You can fairly easily write down what that state produces. Think about the Hamiltonian $Z^otimes n$. What eigenvalues does it have? $lambda=pm 1$. What are the eigenvectors? The computational basis states $|x_1ldots x_nrangle$. So, the output of $V$ is
$$
sum_x:lambda_x=1alpha_xe^i t|xrangle+sum_x:lambda_x=-1alpha_xe^-i t|xrangle
$$
Hence, can you use your function $f$ to determine which eigenvalue a particular $x$ has? How do you then use tha to apply the correct phase for the evolution? Don't forget that if you use an ancilla qubit, you must undo any entanglement you may have created with it.
answered May 28 at 10:13
DaftWullieDaftWullie
17k1644
17k1644
$begingroup$
perfect explanation, got it thanks, I just use my function to compute whether I have even or odd number of say 1 bits in my state, store this information in an ancilla qubit by the circuit of CX gates, then apply a phase gate to the ancilla, then I undo the first computation by applying the CNOT gates in reverse order (CNOT$^-1=$CNOT) and then I discard the ancilla, but the phase remains on my state?!
$endgroup$
– Marsl
May 29 at 9:52
$begingroup$
@Marsl Yes, exactly :)
$endgroup$
– DaftWullie
May 29 at 10:05
add a comment |
$begingroup$
perfect explanation, got it thanks, I just use my function to compute whether I have even or odd number of say 1 bits in my state, store this information in an ancilla qubit by the circuit of CX gates, then apply a phase gate to the ancilla, then I undo the first computation by applying the CNOT gates in reverse order (CNOT$^-1=$CNOT) and then I discard the ancilla, but the phase remains on my state?!
$endgroup$
– Marsl
May 29 at 9:52
$begingroup$
@Marsl Yes, exactly :)
$endgroup$
– DaftWullie
May 29 at 10:05
$begingroup$
perfect explanation, got it thanks, I just use my function to compute whether I have even or odd number of say 1 bits in my state, store this information in an ancilla qubit by the circuit of CX gates, then apply a phase gate to the ancilla, then I undo the first computation by applying the CNOT gates in reverse order (CNOT$^-1=$CNOT) and then I discard the ancilla, but the phase remains on my state?!
$endgroup$
– Marsl
May 29 at 9:52
$begingroup$
perfect explanation, got it thanks, I just use my function to compute whether I have even or odd number of say 1 bits in my state, store this information in an ancilla qubit by the circuit of CX gates, then apply a phase gate to the ancilla, then I undo the first computation by applying the CNOT gates in reverse order (CNOT$^-1=$CNOT) and then I discard the ancilla, but the phase remains on my state?!
$endgroup$
– Marsl
May 29 at 9:52
$begingroup$
@Marsl Yes, exactly :)
$endgroup$
– DaftWullie
May 29 at 10:05
$begingroup$
@Marsl Yes, exactly :)
$endgroup$
– DaftWullie
May 29 at 10:05
add a comment |
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%2f6253%2fimplement-a-hamiltonian-in-on-exercise-question%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