Comments (9)
Oh! This helped immensely @Manvi-Agrawal . I would definitely have benefited from having this in the work book (or at least a link to the solutions).
from quantumkatas.
Yes, if this helps, we definitely can add this to the workbook! (And I didn't know you could use LaTeX on GitHub either! :-) )
from quantumkatas.
Hi @abrassel, I did not get your question fully, so I am taking liberty to explain the whole solution.
- First, we start by preparing the described state with the qubits reversed. This is important as it allows to prepare the state inplace.
- We are doing this by leveraging
BinaryFractionQuantumInPlace
from Task 1.5. This function changes the state of the register from$|j_1\rangle \otimes |j_2 ... j_n\rangle$ to$\frac{1}{\sqrt{2}} \big(|0\rangle + e^{2\pi i \cdot 0.j_1 j_2 ... j_n} |1\rangle \big) \otimes |j_2 ... j_n\rangle$ . - In short,
BinaryFractionQuantumInPlace
if applied on register$|j_1 ... j_n\rangle$ , only transforms$|j_1\rangle$ . - We can use above operation to transform
$|j_1\rangle \otimes |j_2> \otimes |j_3 ... j_n\rangle$ to$|j_1\rangle \otimes \frac{1}{\sqrt{2}} \big(|0\rangle + e^{2\pi i \cdot 0.j_2 ... j_n}) \otimes |j_3 ... j_n\rangle$ by applying operationBinaryFractionQuantumInPlace
to register$|j_2 ... j_n\rangle$ , and so on... - Finally, we use
ReverseRegister
from task 1.6 to get the desired state.
from quantumkatas.
Hi @Manvi-Agrawal , thanks for explaining your solution! I didn't realize that you could use latex in markdown comments, so I can actually go into a bit more depth about the nature of my question. My specific understanding gap is in the math, not the gates we are using to implement it.
In Task 1.7, there is a two-step sequence of algebraic transformations. From
from quantumkatas.
Hi @abrassel, the math of transformation from
Here is the github link that you can visit to see the math. You will find the math below solution for Task 1.7 under the heading "Math to get qubit transformation from summation"
from quantumkatas.
@tcNickolas, do you think we should add this math in workbook or would it get too intensive? Because I think its not very obvious to understand the transformation from summation to tensor products expression listed in workbook for task 1.7.
from quantumkatas.
I am glad @abrassel , that I was able to help you
from quantumkatas.
Hmm, this is interesting. This was my first time using LaTex on Github. My idea behind using LaTex in comment was that Github supports markdown in comments. And we use Latex in markdown cells in Jupyter notebook. That being said, Github markdown supports only some LaTex or with a slightly different syntax.
I initially planned to send the math explaination in Github comment by copying from jupyter notebook. But it did not render well. So, I just commited my changes in jupyter and shared Github llink to save time.
from quantumkatas.
I think it might be a good idea to introduce a separate task for Two qubit QFT
so that math for N bit QFT
does not sound a bit lengthy to the learners.
Also, I think that maybe we should give the info about transformation of summation to tensor products in a hint, rather than giving it right away so that learners can spend some time in figuring out math. Also, I have given an option to skip math as well, so that if someone is finding math difficult they can just try to implement the expression instead of leaving the kata unsolved :-(.
Here is my link to my branch containing the changes. I have 3 commits. Kindly note that first commit contains most of the meaningful changes. Second commit is for cleaning up things, fixing typos and adding some stuff that I thought might be useful. Third commit just changes the task numbering.
Would love to know if this refactoring makes sense? Or do we just want to add math explaination from the github link that I shared earlier?
from quantumkatas.
Related Issues (20)
- Sample solutions for task 1.14 of the Superposition katas. HOT 2
- Mistake in multi-qubit measurement tutorial exercise 2 calculations. HOT 1
- Enable tests that are currently excluded with multicell solution tag HOT 2
- [MultiQubitSystemMeasurements] Add code to Exercise 2 solution to show state in Pauli X basis HOT 2
- Fix math mode rendering in browser HOT 5
- Task 1.15 in Measurements Kata says two states are orthogonal. HOT 2
- Exercise 5 for RandomNumberGenerationTutorial - slightly cleaner solution HOT 4
- Late introduction of `ControlledOnInt` operation HOT 4
- Disable cell id generation while working on jupyter notebooks locally HOT 2
- Validate only changed katas…
- %kata magic doesn't work with lambda expressions HOT 1
- O(1) time complexity solution to Oracles tutorial, task 4.2 HOT 9
- Add error-free arbitrary state transmission demo to QEC_BitFlipCode kata HOT 7
- docker image creation is stuck HOT 1
- Add Memory Management Tutorials and Concepts HOT 1
- Systems of Equations not properly explained HOT 1
- BasicGates kata task 1.6 PhaseChange fails
- Docker Build Failing HOT 1
- getting issue in exit command HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quantumkatas.