- Muhammad Jawwad Javeed Iqbal [Linkedin]
The ability to specify Quantum Superposition Distributions (P(|0>) and P(|1>)) of a Qubit is effective for representing multiple complex states, an important attribute of Quantum computing that allows it to perform certain calculations more efficiently than a classical computer.
Currently however, it is difficult to specify a given probability distribution; for example, if the set distribution of P(|0>) and P(|1>) is selected to be 74%-26%,it would require trial and error in order to achieve the specific controlled rotation that would result in this Quantum Superposition Distribution(A demonstration of why simply entering a controlled rotation of a given percentage about a non-eigenstate axis would not work is available at Juypter_Notebook_Quantum_Superposition_Distribution_Generator_Demo.ipynb
)
This project aims to resolve this problem by using different Polynomial equations in order to predict the controlled rotations required for the specified Quantum Superposition Distribution.
Qiskit Program that can generate a specified Quantum Superposition distribution (P(|0>) and P(|1>)) by utilizing Polynomial equations.
For this project it is recommended to use one of IBM's Quantum computers instead of a simulator in order to generate truly random numbers, however for testing purposes the QASM Simulator is the most accurate and similar to a real-life Quantum Simulator and is used as a proof of concept.
$ pip install Qiskit
-
-
Juypter_Notebook_Quantum_Superposition_Distribution_Generator_Demo.ipynb
is a demonstration on why a given percentage controlled rotation about the y axis would result in significant errors for values that are not located on any of the bases |0>,|+>,or |1> -
Juypter_Notebook_Quantum_Superposition_Distribution_Generator_Polynomial.ipynb
utilizes a polynomial function in order to scale the controlled rotations by a given percentage. However, because the values are predicted by a polynomial equation, they are highly inaccurate and are therefore left as a proof of concept (+/-95% error rate on both very low and very high numbers; average +/-35% error rate) and not recommended for any project utilization. -
Juypter_Notebook_Quantum_Superposition_Distribution_Generator_Cubic.ipynb
utilizes a Cubic function in order to scale the controlled rotations by a given percentage. However, because the values are predicted by a Cubic equation, they are highly inaccurate and are therefore left as a proof of concept (+/-80% error rate on both very low and very high numbers; average +/-30% error rate) and not recommended for any project utilization. -
Juypter_Notebook_Quantum_Superposition_Distribution_Generator_Quadratic.ipynb
utilizes a Quadratic function in order to scale the controlled rotations by a given percentage. However, because the values are predicted by a Quadratic equation, they are highly inaccurate and are therefore left as a proof of concept (+/-80% error rate on both very low and very high numbers; average +/-20% error rate) and not recommended for any project utilization -
Juypter_Notebook_Quantum_Superposition_Distribution_Generator_Quintic.ipynb
utilizes a Quintic function in order to scale the controlled rotations by a given percentage (+/-2% error rate on both very low and very high numbers; average +/-.5% error rate).
-
-
-
Python_Quantum_Superposition_Distribution_Generator_Demo.py
is a demonstration on why a given percentage controlled rotation about the y axis would result in significant errors for values that are not located on any of the bases |0>,|+>,or |1>;the functionQuantum_Superposition_Distribution_Demo(Prob_Value)
can be utilized to provide a histogram of all possible measurement values based on specified Quantum Superposition Distribution. -
Python_Quantum_Superposition_Distribution_Generator_Polynomial.py
utilizes a polynomial function in order to scale the controlled rotations by a given percentage. However, because the values are predicted by a polynomial equation, they are highly inaccurate and are therefore left as a proof of concept (+/-95% error rate on both very low and very high numbers; average +/-35% error rate) and not recommended for any project utilization; the functionQuantum_Superposition_Distribution_Polynomial(Prob_Value)
can be utilized to provide a histogram of all possible measurement values based on specified Quantum Superposition Distribution. -
Python_Quantum_Superposition_Distribution_Generator_Cubic.py
utilizes a Cubic function in order to scale the controlled rotations by a given percentage. However, because the values are predicted by a Cubic equation, they are highly inaccurate and are therefore left as a proof of concept (+/-80% error rate on both very low and very high numbers; average +/-30% error rate) and not recommended for any project utilization;;the functionQuantum_Superposition_Distribution_Cubic(Prob_Value)
can be utilized to provide a histogram of all possible measurement values based on specified Quantum Superposition Distribution. -
Python_Quantum_Superposition_Distribution_Generator_Quadratic.py
utilizes a Quadratic function in order to scale the controlled rotations by a given percentage. However, because the values are predicted by a Quadratic equation, they are highly inaccurate and are therefore left as a proof of concept (+/-80% error rate on both very low and very high numbers; average +/-20% error rate) and not recommended for any project utilization;the functionQuantum_Superposition_Distribution_Quadratic(Prob_Value)
can be utilized to provide a histogram of all possible measurement values based on specified Quantum Superposition Distribution. -
Python_Quantum_Superposition_Distribution_Generator_Quintic.py
utilizes a Quintic function in order to scale the controlled rotations by a given percentage (+/-2% error rate on both very low and very high numbers; average +/-.5% error rate);;the functionQuantum_Superposition_Distribution_Quintic(Prob_Value)
can be utilized to provide a histogram of all possible measurement values based on specified Quantum Superposition Distribution.
-
-
-
Excel_Quantum_Superposition_Distribution_Generator_Calculation.xslx
utilizes Excel's Trendline function in order to generate an Polynomial equation to predict the controlled rotations. -
-
Excel_Juypter_Notebook_Polynomial.ipynb
utilizes a polynomial function generated by Excel's Trendline function in order to scale the controlled rotations by a given percentage(+/-2% error rate on both very low and very high numbers; average +/-1% error rate) -
Excel_Juypter_Notebook_Cubic.ipynb
utilizes a Cubic function generated by Excel's Trendline function in order to scale the controlled rotations by a given percentage(+/-1% error rate on both very low and very high numbers; average +/-.3% error rate) -
Excel_Juypter_Notebook_Quadratic.ipynb
utilizes a Quadratic function generated by Excel's Trendline function in order to scale the controlled rotations by a given percentage(+/-80% error rate on very high numbers; average +/-6% error rate) -
Excel_Juypter_Notebook_Quintic.ipynb
utilizes a Quintic function generated by Excel's Trendline function in order to scale the controlled rotations by a given percentage(+/-4% error rate on both very low and very high numbers; average +/-3% error rate)
-
-
-
Excel_Python_Polynomial.py
utilizes a polynomial function generated by Excel's Trendline function in order to scale the controlled rotations by a given percentage(+/-2% error rate on both very low and very high numbers; average +/-1% error rate);the functionExcel_Quantum_Superposition_Distribution_Polynomial(Prob_Value)
can be utilized to provide a histogram of all possible measurement values based on specified Quantum Superposition Distribution. -
Excel_Python_Cubic.py
utilizes a Cubic function generated by Excel's Trendline function in order to scale the controlled rotations by a given percentage(+/-1% error rate on both very low and very high numbers; average +/-.3% error rate);the functionExcel_Quantum_Superposition_Distribution_Cubic(Prob_Value)
can be utilized to provide a histogram of all possible measurement values based on specified Quantum Superposition Distribution. -
Excel_Python_Quadratic.py
utilizes a Quadratic function generated by Excel's Trendline function in order to scale the controlled rotations by a given percentage(+/-80% error rate on very high numbers; average +/-6% error rate);the functionExcel_Quantum_Superposition_Distribution_Quadratic(Prob_Value)
can be utilized to provide a histogram of all possible measurement values based on specified Quantum Superposition Distribution. -
Excel_Python_Quintic.py
utilizes a Quintic function generated by Excel's Trendline function in order to scale the controlled rotations by a given percentage(+/-4% error rate on both very low and very high numbers; average +/-3% error rate);the functionExcel_Quantum_Superposition_Distribution_Quintic(Prob_Value)
can be utilized to provide a histogram of all possible measurement values based on specified Quantum Superposition Distribution.
-
-
-
- Activate following code in Juypter notebook files in order to graph Qubit Bloch spheres:
qc.save_statevector()
qobj=assemble(qc)
result=sim.run(qobj).result().get_statevector()
plot_bloch_multivector(result)
-
- Import either
Quantum_Superposition_Distribution_Demo(Prob_Value)
,Quantum_Superposition_Distribution_Polynomial(Prob_Value)
,Quantum_Superposition_Distribution_Cubic(Prob_Value)
,Quantum_Superposition_Distribution_Quadratic(Prob_Value)
, orQuantum_Superposition_Distribution_Quintic(Prob_Value)
fromPython_Quantum_Superposition_Distribution_Generator_Demo.ipynb
,Python_Quantum_Superposition_Distribution_Generator_Polynomial.ipynb
,Python_Quantum_Superposition_Distribution_Generator_Cubic.ipynb
,Python_Quantum_Superposition_Distribution_Generator_Quadratic.ipynb
,orPython_Quantum_Superposition_Distribution_Generator_Quintic.ipynb
respectively.
- Import either
-
- Import either
Excel_Quantum_Superposition_Distribution_Polynomial(Prob_Value)
,Excel_Quantum_Superposition_Distribution_Cubic(Prob_Value)
,Excel_Quantum_Superposition_Distribution_Quadratic(Prob_Value)
, orExcel_Quantum_Superposition_Distribution_Quintic(Prob_Value)
fromExcel_Juypter_Notebook_Polynomial.ipynb
,Excel_Python_Cubic.ipynb
,Excel_Python_Quadratic.ipynb
orExcel_Python_Quintic.ipynb
respectively.
- Import either