Skip to content

gubiithefish/Visualizing-Quantum-Computing-using-fractals

 
 

Repository files navigation

Visualizing Quantum Computing using fractals

Introduction
Quantum computing can be pretty abstract. As a result, it's rather challenging to get the imagination going when dealing with qubits, quantum circuits and quantum states. As people get started using quantum computing, one of the biggest challenges is visualizing the complex mathematics underlying quantum states. Typically, we rely on the Bloch sphere and Q-sphere. However, given the richness of the field of complex numbers, there are plenty of more interesting ways to represent quantum information.

There are two types of notebooks demonstrating how quantum computing can be visualized using fractals:
quantum-fractals-one-complex-number folder: You'll find 1- and 2-qubit notebooks showing how to create fractals based on one complex number, both in the ideal case, mimicking running on a fault-tolerant quantum computer with a simulator and after running on a real quantum computer!
quantum-fractals-multiple-complex-numbers folder: You'll find a 1-qubit notebook showing how to create even more astonishing fractals based on two complex numbers (the statevector's complex amplitudes) with a quantum simulator and after running on a real quantum computer. The second notebook makes it possible to create fractal animations and relate them to rotations on the Bloch sphere.

Read more about the project in the


Getting started

  1. Upload the notebooks to the IBM Quantum Lab or install Qiskit locally
  2. Notebooks in the quantum-fractals-one-complex-number folder: Run the 1- or 2-qubit notebook with the default quantum circuit yielding both the ideal simulated fractal as well as the fractal generated after running on a real quantum computer.
    In the current version nice fractals may be achieved when either the 1-qubit quantum circuit statevector isn't on the axes of the Bloch sphere or you generate a 2-qubit quantum circuit involving all four computational basis states. Both can be checked in the notebooks.

    Notebooks in the quantum-fractals-multiple-complex-numbers folder: Run the 1-qubit plots notebook with the default quantum circuit yielding both ideal simulated fractals as well as the fractals generated after running on a real quantum computer.
    Run the animation notebook with the default quantum circuit resulting in four animations; RZ rotations on the Bloch sphere, fractal animations generated with one complex number and two variations of Julia set mating.

    You may need to experiment with different gates, phases and circuits in order to obtain a circuit that generates beautiful fractals.
  3. Get familiar with the tutorial for the IBM Quantum Composer.
  4. You can also choose to write the qiskit code and not use the Composer.

Acknowledgments
This project is in honor of my late professor, Erik Mosekilde, who inspired me with his persona and his teachings and works on chaos theory, bifurcations, fractals and Turing patterns.


License
Art files based on the code in the folder fractals-multiple-complex-number: cc-by (see folder)

Art files based on the code in the folder fractals-multiple-complex-numbers: cc-by-nc-sa (see folder)

Contact
Wiktor Mazin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 98.6%
  • Python 1.4%