Quantum Computing Asked on December 13, 2020
I created two qubits in IBM quantum experience and measured the second qubit without applying any gate.
The result I got had a computational basis of 00 and 10. How does the measurement of the second qubit change the basis to 00 and 10? I have just started to learn quantum computing, so the question may sound silly.
If you had run this on the statevector_simulator
then you will only see $|00rangle$. However, due to hardware noise, which in this case coming out from the measurement error, you will have some $|1rangle$ in your measurement on $q_1$. Depends on the hardware noise level, you might see 'more' or 'less' of $|1rangle$ appearing in your result. If you want to improve your output probabilities result, just add more shots.
Update: Why would we would we only see the state $|00rangle$ in the ideal world, like if we have used the statevector_simulator
instead of the hardware?
The reason is because the starting/initial state on a quantum computer always start in the state $|000cdots 0rangle$. That is, every qubit initialize with $|0rangle$. And this state can be prepared with very high fidelity. In your case, you have two qubit, so your system is initialize at the state $|00rangle$. That is $|q_0rangle = |0rangle$ and $|q_1 rangle = |0 rangle$. So now without doing any operation on this qubit, you ask the quantum computer, what state is the second qubit, $q_1$ in? The answer should be $|0rangle$ if you have a measurement process with no noise! Because the state the qubit $q_1$, $|q_1rangle = |0rangle$. There is no other answer it can give you. However, if there is noise presence, it might change this answer from a $|0rangle$ to a $|1rangle$ every so often, depending on the noise level of course. Say you ask 100 times, 95 of the time you will get the correct answer of $|0rangle$ and 5 time it will return a $|1rangle$ due to error. Think of this as like when you are driving in car through a scenic mountain area, then your friend call and ask if you want to come over to hangout. Because of where you are, the signal is not very clear, so eventhough you say "YUP", he/she might hear as a "NOPE" instead.... so if you have say"YUP", "YUP",.... "YUP" 100 times, he/she might pick up a "NOPE" 5 time out of the 100 time. This is what you see in your histogram plot... sometime the measurement process pick-up a $|1rangle$ because of the noise in the measurement process as your friend has picked up a "NOPE" from bad signal.
Note that this should not be confusing with the state $|q_1 rangle = dfrac{|0rangle + |1 rangle}{sqrt{2}}$... In this case, when you ask the quantum computer, "Hey QC, what state is $|q_1rangle$ in? It will return you with a $|0rangle$ or a $|1rangle$ with $1/2$ probability. This is not because of the noise in your system. If you run this experiment $100,000$ time, you might get $49820$ time it will returns a $|0rangle$ and $50,180$ time it will returns a $|1rangle$. This is because your state $|q_1rangle$ is in superposition of both $|0rangle$ and $|1rangle$, so when making a measurement, it will collapse onto either one of these state. And in this case, where $|q_1 rangle = dfrac{|0rangle + |1 rangle}{sqrt{2}}$, the probability of collapsing onto the state $|0rangle$ is 50% probability and the state $|1rangle$ is also 50%. This is similar to tossing a coin if you think about it...
Correct answer by KAJ226 on December 13, 2020
Quantum computer are not perfect. There are certain limitation to quantum computers currently. Qubits are highly susceptible to noise and are error prone. A stray commic ray or thermal vibrations can change the results of the calculation. The Quantum computer must be maintained at very cold temperatures and if that temperature is not maintained then the qubit can have give faulty results. You'll notice that when ibm qiskit runs your program it runs the program several times, to calculate an average score to account for this quantum noise. You can change the number of time qiskit runs results to create a more accurate result.
If you look at the 'y-axis' of your results, you will notice this algorithm was run 100 times. (see under histogram). Looks like one in 100 times this algorithm gave an incorrect result.
Answered by lizzo on December 13, 2020
What you are seeing here is coming from the fact that quantum computation on real machines is not perfect.
In a perfect world, since you did not put any gates on your circuit, the state it should return is $|00rangle$, the common initial state on any machine by default.
However, on real quantum machines, qubits can experience noise from the operations you are doing. Here, the $|1rangle$ on the Qubit 1 comes from an error when measuring the Qubit, and there isn't really a way to completely avoid those errors when running quantum circuits on real machines.
Does that answer your question or do you need more explanation on something? Feel free to ask :)
Answered by Lena on December 13, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP