Preparing odd integers using quantum computationHow do I add 1+1 using a quantum computer?Embedding classical information into norm of a quantum stateImplementation of the oracle of Grover's algorithm on IBM Q using three qubitsSWAP gate(s) in the $R(lambda^-1)$ step of the HHL circuit for $4times 4$ systemsHow to prevent future loops using a control qubit?Quantum addition and modulo operation using gatesQuantum secret Sharing using GHZ state paperPerform quantum gate operations using state vectors and matrices
What's the benefit of prohibiting the use of techniques/language constructs that have not been taught?
Meaning of Swimming their horses
Why don't Wizards use wrist straps to protect against disarming charms?
What was the motivation for the invention of electric pianos?
Some Prime Peerage
Seven Places at Once - Another Google Earth Challenge?
Ethernet, Wifi and a little human psychology
What is the meaning of "order" in this quote?
Can a character with good/neutral alignment attune to a sentient magic item with evil alignment?
Wrong Schengen Visa exit stamp on my passport, who can I complain to?
Python web-scraper to download table of transistor counts from Wikipedia
Pronunciation of "солнце"
Importance of the current postdoc advisor's letter in TT job search
Prove that a convergent real sequence always has a smallest or a largest term
International Orange?
Work done by spring force
How to publish superseding results without creating enemies
Why don't airports use arresting gears to recover energy from landing passenger planes?
Other than good shoes and a stick, what are some ways to preserve your knees on long hikes?
Bit one of the Intel 8080's Flags register
What does "boys rule, girls drool" mean?
What organs or modifications would be needed for a life biological creature not to require sleep?
geschafft or geschaffen? which one is past participle of schaffen?
If I want an interpretable model, are there methods other than Linear Regression?
Preparing odd integers using quantum computation
How do I add 1+1 using a quantum computer?Embedding classical information into norm of a quantum stateImplementation of the oracle of Grover's algorithm on IBM Q using three qubitsSWAP gate(s) in the $R(lambda^-1)$ step of the HHL circuit for $4times 4$ systemsHow to prevent future loops using a control qubit?Quantum addition and modulo operation using gatesQuantum secret Sharing using GHZ state paperPerform quantum gate operations using state vectors and matrices
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
This is just a basic question. I need to output odd integers till $15$, i.e $1,3,5,7,9,11,13,15$. Since $15$ requires $4$ bits, I prepare initial state by using Hadamard gate on initial $|0rangle$, i.e $$H|0rangle otimes H|0rangle otimes H|0rangle$$ $$=|000rangle+|001rangle+|010rangle+|011rangle+|100rangle+|101rangle+|110rangle+|111rangle.$$ Then take the tensor product with $|1rangle$, i.e $$(H|0rangle otimes H|0rangle otimes H|0rangle)|1rangle$$ $$=|0001rangle+|0011rangle+|0101rangle+|0111rangle+|1001rangle+|1011rangle+|1101rangle+|1111rangle.$$ Is this right?
Actually, I know the ideas but don't know how to write it in the quantum computing terms, that involves using terms as registers, qubits
quantum-gate quantum-state
$endgroup$
add a comment
|
$begingroup$
This is just a basic question. I need to output odd integers till $15$, i.e $1,3,5,7,9,11,13,15$. Since $15$ requires $4$ bits, I prepare initial state by using Hadamard gate on initial $|0rangle$, i.e $$H|0rangle otimes H|0rangle otimes H|0rangle$$ $$=|000rangle+|001rangle+|010rangle+|011rangle+|100rangle+|101rangle+|110rangle+|111rangle.$$ Then take the tensor product with $|1rangle$, i.e $$(H|0rangle otimes H|0rangle otimes H|0rangle)|1rangle$$ $$=|0001rangle+|0011rangle+|0101rangle+|0111rangle+|1001rangle+|1011rangle+|1101rangle+|1111rangle.$$ Is this right?
Actually, I know the ideas but don't know how to write it in the quantum computing terms, that involves using terms as registers, qubits
quantum-gate quantum-state
$endgroup$
add a comment
|
$begingroup$
This is just a basic question. I need to output odd integers till $15$, i.e $1,3,5,7,9,11,13,15$. Since $15$ requires $4$ bits, I prepare initial state by using Hadamard gate on initial $|0rangle$, i.e $$H|0rangle otimes H|0rangle otimes H|0rangle$$ $$=|000rangle+|001rangle+|010rangle+|011rangle+|100rangle+|101rangle+|110rangle+|111rangle.$$ Then take the tensor product with $|1rangle$, i.e $$(H|0rangle otimes H|0rangle otimes H|0rangle)|1rangle$$ $$=|0001rangle+|0011rangle+|0101rangle+|0111rangle+|1001rangle+|1011rangle+|1101rangle+|1111rangle.$$ Is this right?
Actually, I know the ideas but don't know how to write it in the quantum computing terms, that involves using terms as registers, qubits
quantum-gate quantum-state
$endgroup$
This is just a basic question. I need to output odd integers till $15$, i.e $1,3,5,7,9,11,13,15$. Since $15$ requires $4$ bits, I prepare initial state by using Hadamard gate on initial $|0rangle$, i.e $$H|0rangle otimes H|0rangle otimes H|0rangle$$ $$=|000rangle+|001rangle+|010rangle+|011rangle+|100rangle+|101rangle+|110rangle+|111rangle.$$ Then take the tensor product with $|1rangle$, i.e $$(H|0rangle otimes H|0rangle otimes H|0rangle)|1rangle$$ $$=|0001rangle+|0011rangle+|0101rangle+|0111rangle+|1001rangle+|1011rangle+|1101rangle+|1111rangle.$$ Is this right?
Actually, I know the ideas but don't know how to write it in the quantum computing terms, that involves using terms as registers, qubits
quantum-gate quantum-state
quantum-gate quantum-state
edited Apr 15 at 10:57
Sanchayan Dutta
8,1224 gold badges18 silver badges63 bronze badges
8,1224 gold badges18 silver badges63 bronze badges
asked Apr 15 at 7:13
UpstartUpstart
4131 silver badge9 bronze badges
4131 silver badge9 bronze badges
add a comment
|
add a comment
|
1 Answer
1
active
oldest
votes
$begingroup$
It depends what you mean by "output odd integers till 15". If you actually mean "prepare a uniform superposition of all odd, positive integers up to and including 15", then yes, you are essentially correct. The only thing to say is that your initial preparation using Hadamards is only over 3 qubits, not 4 (you've got 4 qubits on the left-hand side and 3 on the right-hand side). Similarly for your second equation, you've got 5 qubits on the left-hand side and 4 on the right. You would also be safer to include the normalisation factor.
$endgroup$
$begingroup$
i have edited it
$endgroup$
– Upstart
Apr 15 at 7:21
$begingroup$
@Upstart better :)
$endgroup$
– DaftWullie
Apr 15 at 7:38
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/4.0/"u003ecc by-sa 4.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%2f5915%2fpreparing-odd-integers-using-quantum-computation%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$
It depends what you mean by "output odd integers till 15". If you actually mean "prepare a uniform superposition of all odd, positive integers up to and including 15", then yes, you are essentially correct. The only thing to say is that your initial preparation using Hadamards is only over 3 qubits, not 4 (you've got 4 qubits on the left-hand side and 3 on the right-hand side). Similarly for your second equation, you've got 5 qubits on the left-hand side and 4 on the right. You would also be safer to include the normalisation factor.
$endgroup$
$begingroup$
i have edited it
$endgroup$
– Upstart
Apr 15 at 7:21
$begingroup$
@Upstart better :)
$endgroup$
– DaftWullie
Apr 15 at 7:38
add a comment
|
$begingroup$
It depends what you mean by "output odd integers till 15". If you actually mean "prepare a uniform superposition of all odd, positive integers up to and including 15", then yes, you are essentially correct. The only thing to say is that your initial preparation using Hadamards is only over 3 qubits, not 4 (you've got 4 qubits on the left-hand side and 3 on the right-hand side). Similarly for your second equation, you've got 5 qubits on the left-hand side and 4 on the right. You would also be safer to include the normalisation factor.
$endgroup$
$begingroup$
i have edited it
$endgroup$
– Upstart
Apr 15 at 7:21
$begingroup$
@Upstart better :)
$endgroup$
– DaftWullie
Apr 15 at 7:38
add a comment
|
$begingroup$
It depends what you mean by "output odd integers till 15". If you actually mean "prepare a uniform superposition of all odd, positive integers up to and including 15", then yes, you are essentially correct. The only thing to say is that your initial preparation using Hadamards is only over 3 qubits, not 4 (you've got 4 qubits on the left-hand side and 3 on the right-hand side). Similarly for your second equation, you've got 5 qubits on the left-hand side and 4 on the right. You would also be safer to include the normalisation factor.
$endgroup$
It depends what you mean by "output odd integers till 15". If you actually mean "prepare a uniform superposition of all odd, positive integers up to and including 15", then yes, you are essentially correct. The only thing to say is that your initial preparation using Hadamards is only over 3 qubits, not 4 (you've got 4 qubits on the left-hand side and 3 on the right-hand side). Similarly for your second equation, you've got 5 qubits on the left-hand side and 4 on the right. You would also be safer to include the normalisation factor.
answered Apr 15 at 7:18
DaftWullieDaftWullie
20.4k1 gold badge9 silver badges51 bronze badges
20.4k1 gold badge9 silver badges51 bronze badges
$begingroup$
i have edited it
$endgroup$
– Upstart
Apr 15 at 7:21
$begingroup$
@Upstart better :)
$endgroup$
– DaftWullie
Apr 15 at 7:38
add a comment
|
$begingroup$
i have edited it
$endgroup$
– Upstart
Apr 15 at 7:21
$begingroup$
@Upstart better :)
$endgroup$
– DaftWullie
Apr 15 at 7:38
$begingroup$
i have edited it
$endgroup$
– Upstart
Apr 15 at 7:21
$begingroup$
i have edited it
$endgroup$
– Upstart
Apr 15 at 7:21
$begingroup$
@Upstart better :)
$endgroup$
– DaftWullie
Apr 15 at 7:38
$begingroup$
@Upstart better :)
$endgroup$
– DaftWullie
Apr 15 at 7:38
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%2f5915%2fpreparing-odd-integers-using-quantum-computation%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