{"id":608696,"date":"2026-03-27T07:10:00","date_gmt":"2026-03-27T12:10:00","guid":{"rendered":"https:\/\/towardsdatascience.com\/?p=608696"},"modified":"2026-03-24T17:46:20","modified_gmt":"2026-03-24T22:46:20","slug":"a-beginners-guide-to-quantum-computing-with-python","status":"publish","type":"post","link":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/","title":{"rendered":"A Beginner\u2019s Guide to Quantum Computing with Python"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><mdspan datatext=\"el1774392127849\" class=\"mdspan-comment\">Intro<\/mdspan><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Quantum_mechanics\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Quantum Mechanics<\/strong><\/a><strong>&nbsp;<\/strong>is a fundamental theory in physics that explains phenomena at a microscopic scale (like atoms and subatomic particles). This&nbsp;\u201cnew\u201d (1900) field&nbsp;differs from&nbsp;Classical Physics,&nbsp;which describes nature at a macroscopic scale (like bodies and machines) and doesn\u2019t apply at the quantum level.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Quantum_computing\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Quantum Computing<\/strong><\/a><strong>&nbsp;<\/strong>is the exploitation of properties of Quantum Mechanics to perform computations and solve problems that a classical computer can\u2019t and never will. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Normal computers speak the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Binary_code\" target=\"_blank\" rel=\"noreferrer noopener\">binary code<\/a>&nbsp;language: they assign a pattern of binary digits (1s and 0s) to each character and instruction, and store and process that information in&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Bit\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>bits<\/strong><\/a>. Even your Python code is translated into binary digits when it runs on your laptop. For example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The word &#8220;Hi&#8221; \u2192 &#8220;h&#8221;: <code>01001000<\/code> and &#8220;i&#8221;: <code>01101001<\/code> \u2192 <code>01001000 01101001<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the other end, quantum computers process information with <strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Qubit\">qubits<\/a><\/strong> (quantum bits), which can be both 0 and 1 at the same time. That makes quantum machines dramatically faster than normal ones for specific problems (i.e. probabilistic computation).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Quantum Computers<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Quantum computers use atoms and electrons, instead of classical silicon-based chips. As a result, they can leverage Quantum Mechanics to perform calculations much faster than normal machines. For instance, 8-bits is enough for a classical computer to represent any number between 0 and 255, but 8-qubits is enough for a quantum computer to represent every number between 0 and 255 <strong>at the same time<\/strong>. A few hundred qubits would be enough to represent more numbers than there are atoms in the universe.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The brain of a quantum computer is a tiny <strong>qubit chip<\/strong> made of metals or sapphire.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/contributor.insightmediagroup.io\/wp-content\/uploads\/2026\/03\/image-84.png\" alt=\"\" class=\"wp-image-648759\"\/><figcaption class=\"wp-element-caption\">Photo by <a href=\"https:\/\/unsplash.com\/@niekdoup?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"noreferrer noopener\">Niek Doup<\/a> on <a href=\"https:\/\/unsplash.com?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">However, the most iconic part is the big cooling hardware made of gold that looks like a chandelier hanging inside a steel cylinder: the <strong>dilution refrigerator<\/strong>. It cools the chip to a temperature colder than outer space as heat destroys quantum states (basically the colder it is, the more accurate it gets).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/960\/0*3GKfDEl_vtLB_Y35\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Photo by <a href=\"https:\/\/unsplash.com\/@planetvolumes?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"noreferrer noopener\">Planet Volumes<\/a> on <a href=\"https:\/\/unsplash.com?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That is the leading type of architecture, and it&#8217;s called superconducting-qubits: artificial atoms&nbsp;created from circuits using superconductors (like aluminum) that exhibit zero electrical resistance at ultra-low temperatures. An alternative architecture is ion-traps (charged atoms trapped in electromagnetic fields in ultra\u2011high vacuum), which is more accurate but slower than the former.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is no exact public count of how many quantum computers are out there, but estimates are around 200 worldwide. As of today, the most advanced ones are:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/www.ibm.com\/quantum\/hardware\">IBM&#8217;s <em>Condor<\/em><\/a>, the largest qubit count built so far (1000 qubits), even if that alone doesn\u2019t equal useful computation as error rates still matter.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/blog.google\/innovation-and-ai\/technology\/research\/google-willow-quantum-chip\/\">Google&#8217;s <em>Willo<\/em>w<\/a> (105 qubits), with good error rate but still far from fault\u2011tolerant large\u2011scale computing.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/www.ionq.com\/quantum-systems\/compare\">IonQ&#8217;s <em>Tempo<\/em><\/a> (100 qubits), ion-traps quantum computer with good capabilities but still slower than superconducting machines.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/www.quantinuum.com\/products-solutions\/quantinuum-systems\/helios\">Quantinuum\u2019s&nbsp;<em>Helios<\/em><\/a> (98 qubits), uses ion-traps architecture with some of the highest accuracy reported today.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/www.rigetti.com\/what-we-build\">Rigetti Computing&#8217;s <em>Ankaa<\/em><\/a> (80 qubits).<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/newsroom.intel.com\/new-technologies\/quantum-computing-chip-to-advance-research\">Intel&#8217;s <em>Tunnel Falls<\/em><\/a> (12 qubits).<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Canada <a href=\"https:\/\/www.xanadu.ai\/press\/xanadu-introduces-aurora-worlds-first-scalable-networked-and-modular-quantum-computer\">Xanadu&#8217;s <em>Aurora<\/em><\/a><em> <\/em>(12 qubits), the first photonic quantum computer, using light instead of electrons to process information.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/quantum\/2025\/02\/19\/microsoft-unveils-majorana-1-the-worlds-first-quantum-processor-powered-by-topological-qubits\/#:~:text=Majorana%201%3A%20the%20world's%20first,qubits%20on%20a%20single%20chip.\">Microsoft&#8217;s <em>Majorana<\/em><\/a>, the first computer designed to scale to a million qubits on a single chip (but it has 8 qubits at the moment).<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Chinese<a href=\"https:\/\/www.spinquanta.com\/products\/nmr-quantum-products\"> SpinQ&#8217;s <em>Mini<\/em><\/a>, the first portable small-scale quantum computer (2 qubits).<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/www.nvidia.com\/en-us\/solutions\/quantum-computing\/\">NVIDIA&#8217;s <em>QPU<\/em><\/a> (<em>Quantum Processing Unit<\/em>), the first GPU-accelerated quantum system.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">At the moment, it&#8217;s impossible for a normal person to own a large-scale quantum computer, but you can access them through the cloud.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setup<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In Python, there are several libraries to work with quantum computers around the world:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\"><strong><em><a href=\"https:\/\/www.ibm.com\/quantum\/qiskit\">Qiskit<\/a><\/em><\/strong> by IBM is the most complete high-level ecosystem for running quantum programs on IBM quantum computers, perfect for beginners.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><em><strong><a href=\"https:\/\/quantumai.google\/cirq\">Cirq<\/a><\/strong> <\/em>by Google, dedicated to low-level control on their hardware, more suited for research.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><em><a href=\"https:\/\/pennylane.ai\/\"><strong>PennyLane<\/strong><\/a> <\/em>by Xanadu specializes in Quantum Machine Learning, it runs on their proprietary photonic computers but it can connect to other providers too.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/github.com\/ProjectQ-Framework\/ProjectQ\"><strong><em>ProjectQ<\/em><\/strong><\/a> by ETH Zurich University, an open-source project that is trying to become the main general-purpose package for quantum computing.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For this tutorial, I shall use IBM&#8217;s <em>Qiskit <\/em>as it&#8217;s the industry leader (<code>pip install qiskit<\/code>). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The most basic code we can write is to create a <strong>quantum circuit <\/strong>(environment for quantum computation) with only one qubit and initialize it as 0. In order to measure the state of the qubit, we need a <strong>statevector<\/strong>, which basically tells you the current quantum reality of your circuit.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">from qiskit import QuantumCircuit\nfrom qiskit.quantum_info import Statevector\n\nq = QuantumCircuit(1,0) #circuit with 1 quantum bit and 0 classic bit\nstate = Statevector.from_instruction(q) #measure state\nstate.probabilities() #print prob%<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/contributor.insightmediagroup.io\/wp-content\/uploads\/2026\/03\/image-88.png\" alt=\"\" class=\"wp-image-648795\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It means: the probability that the qubit is 0 (first element) is 100%, while the probability that the qubit is 1 (second element) is 0%. You can print it like this:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">print(f&quot;[q=0 {round(state.probabilities()[0]*100)}%, \n         q=1 {round(state.probabilities()[1]*100)}%]&quot;)<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/contributor.insightmediagroup.io\/wp-content\/uploads\/2026\/03\/image-89.png\" alt=\"\" class=\"wp-image-648796\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s visualize the state:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">from qiskit.visualization import plot_bloch_multivector\n\nplot_bloch_multivector(state, figsize=(3,3))<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/contributor.insightmediagroup.io\/wp-content\/uploads\/2026\/03\/image-91.png\" alt=\"\" class=\"wp-image-648810\" style=\"aspect-ratio:1.2449658314350798;width:294px;height:auto\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see from the 3D representation of the quantum state, the qubit is 100% at 0. That was the quantum equivalent of &#8220;<em>hello world<\/em>&#8220;, and now we can move on to the quantum equivalent of &#8220;<em>1+1=2<\/em>&#8220;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Qubits<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Qubits have two fundamental properties of Quantum Mechanics: Superposition and Entanglement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Quantum_superposition\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Superposition<\/strong><\/a><strong>&nbsp;<\/strong>\u2014 classical bits can be either 1 or 0, but never both. On the contrary, a qubit can be both (technically it\u2019s a linear combination of an infinite number of states between 1 and 0), and only when measured, the superposition collapses to 1 or 0 and stays like that forever. This is because the act of observing a quantum particle forces it to take on a classical binary state of either 1 or 0 (basically the story of&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Schr%C3%B6dinger's_cat\" target=\"_blank\" rel=\"noreferrer noopener\">Schr\u00f6dinger\u2019s cat<\/a>&nbsp;that we all know and love).&nbsp;Therefore, a qubit has a certain probability of collapsing to 1 or 0.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">q = QuantumCircuit(1,0)\nq.h(0) #add Superposition\nstate = Statevector.from_instruction(q) \nprint(f&quot;[q=0 {round(state.probabilities()[0]*100)}%, \n         q=1 {round(state.probabilities()[1]*100)}%]&quot;)\nplot_bloch_multivector(state, figsize=(3,3))<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/contributor.insightmediagroup.io\/wp-content\/uploads\/2026\/03\/image-97.png\" alt=\"\" class=\"wp-image-648819\" style=\"aspect-ratio:1.659485224022879;width:454px;height:auto\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With the superposition, we introduced \u201crandomness\u201d, so the vector state is between 0 and 1. Instead of a vector representation, we can use a q-sphere where the size of the points is proportional to the probability of the corresponding term in the state.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">from qiskit.visualization import plot_state_qsphere\n\nplot_state_qsphere(state, figsize=(4,4))<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/contributor.insightmediagroup.io\/wp-content\/uploads\/2026\/03\/image-98.png\" alt=\"\" class=\"wp-image-648821\" style=\"aspect-ratio:1.330782483272567;width:318px;height:auto\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The qubit is both 0 and 1, with 50% of probability respectively. But what happens if we <strong>measure <\/strong>it? Sometimes it will be a fixed 1, and sometimes a fixed 0.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">result, collapsed = state.measure() #Superposition disappears\nprint(&quot;measured:&quot;, result)\nplot_state_qsphere(collapsed, figsize=(4,4)) #plot collapsed state<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/contributor.insightmediagroup.io\/wp-content\/uploads\/2026\/03\/image-99.png\" alt=\"\" class=\"wp-image-648824\" style=\"aspect-ratio:1.737038275911502;width:344px;height:auto\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Quantum_entanglement\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Entanglement<\/strong><\/a> \u2014 classical bits are independent of one another, while qubits can be entangled with each other. When that happens, qubits are forever correlated, no matter the distance (often used as a mathematical metaphor for love).<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">q = QuantumCircuit(2,0) #circuit with 2 quantum bits and 0 classic bit\nq.h([0]) #add Superposition on the 1st qubit\nstate = Statevector.from_circuit(q) \nplot_bloch_multivector(state, figsize=(3,3))<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/contributor.insightmediagroup.io\/wp-content\/uploads\/2026\/03\/image-102.png\" alt=\"\" class=\"wp-image-648851\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We have the first qubit in Superposition between 0-1, the second at 0, and now I&#8217;m going to Entangle them. Consequently, if the first particle is measured and collapses to 1 or 0, the second particle will change as well (not necessarily to the same result, one can be 0 while the other is 1).<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">q.cx(control_qubit=0, target_qubit=1) #Entanglement\nstate = Statevector.from_circuit(q)\nresult, collapsed = state.measure([0]) #measure the 1st qubit\nplot_bloch_multivector(collapsed, figsize=(3,3))<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/contributor.insightmediagroup.io\/wp-content\/uploads\/2026\/03\/image-103.png\" alt=\"\" class=\"wp-image-648852\" style=\"aspect-ratio:2.149560406993974;width:601px;height:auto\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see, the first qubit that was on Superposition was measured and collapsed to 1. At the same time, the second quibit is Entangled with the first one, therefore has changed as well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This article has been a tutorial to&nbsp;<strong>introduce Quantum Computing basics with Python and Qiskit<\/strong>. We learned how to work with qubits and their 2 fundamental properties: Superposition and Entanglement. In the next tutorial, we will use qubits to build quantum models.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Full code for this article:&nbsp;<strong><a href=\"https:\/\/github.com\/mdipietro09\/QuantumComputing_Utils\">GitHub<\/a><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I hope you enjoyed it! Feel free to contact me for questions and feedback or just to share your interesting projects.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">\ud83d\udc49&nbsp;<a href=\"https:\/\/maurodp.carrd.co\/\"><strong>Let\u2019s Connect<\/strong><\/a>&nbsp;\ud83d\udc48<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-dominant-color=\"c1cab4\" data-has-transparency=\"false\" style=\"--dominant-color: #c1cab4;\" decoding=\"async\" src=\"https:\/\/contributor.insightmediagroup.io\/wp-content\/uploads\/2025\/06\/1LgqxDMP5qD1HE_uM33zZrg.png\" alt=\"\" class=\"wp-image-605756 not-transparent\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><sub><sup>(All images are by the author unless otherwise&nbsp;noted)<\/sup><\/sub><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Simulate a quantum computer with Qiskit<\/p>\n","protected":false},"author":18,"featured_media":608697,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"is_member_only":false,"sub_heading":"Simulate a quantum computer with Qiskit","footnotes":""},"categories":[32700],"tags":[447,448,446,7018,6213],"sponsor":[],"coauthors":[29964],"class_list":["post-608696","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quantum-computing","tag-artificial-intelligence","tag-data-science","tag-machine-learning","tag-quantum-algorithms","tag-quantum-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A Beginner\u2019s Guide to Quantum Computing with Python | Towards Data Science<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Beginner\u2019s Guide to Quantum Computing with Python | Towards Data Science\" \/>\n<meta property=\"og:description\" content=\"Simulate a quantum computer with Qiskit\" \/>\n<meta property=\"og:url\" content=\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Towards Data Science\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-27T12:10:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/03\/image-68.png\" \/>\n\t<meta property=\"og:image:width\" content=\"714\" \/>\n\t<meta property=\"og:image:height\" content=\"601\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mauro Di Pietro\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@TDataScience\" \/>\n<meta name=\"twitter:site\" content=\"@TDataScience\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mauro Di Pietro\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/\"},\"author\":{\"name\":\"TDS Editors\",\"@id\":\"https:\/\/towardsdatascience.com\/#\/schema\/person\/f9925d336b6fe962b03ad8281d90b8ee\"},\"headline\":\"A Beginner\u2019s Guide to Quantum Computing with Python\",\"datePublished\":\"2026-03-27T12:10:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/\"},\"wordCount\":1198,\"publisher\":{\"@id\":\"https:\/\/towardsdatascience.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/03\/image-68.png\",\"keywords\":[\"Artificial Intelligence\",\"Data Science\",\"Machine Learning\",\"Quantum Algorithms\",\"Quantum Programming\"],\"articleSection\":[\"Quantum Computing\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/\",\"url\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/\",\"name\":\"A Beginner\u2019s Guide to Quantum Computing with Python | Towards Data Science\",\"isPartOf\":{\"@id\":\"https:\/\/towardsdatascience.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/03\/image-68.png\",\"datePublished\":\"2026-03-27T12:10:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#primaryimage\",\"url\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/03\/image-68.png\",\"contentUrl\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/03\/image-68.png\",\"width\":714,\"height\":601,\"caption\":\"Photo by Fractal Hassan on Unsplash\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/towardsdatascience.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Beginner\u2019s Guide to Quantum Computing with Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/towardsdatascience.com\/#website\",\"url\":\"https:\/\/towardsdatascience.com\/\",\"name\":\"Towards Data Science\",\"description\":\"Publish AI, ML &amp; data-science insights to a global community of data professionals.\",\"publisher\":{\"@id\":\"https:\/\/towardsdatascience.com\/#organization\"},\"alternateName\":\"TDS\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/towardsdatascience.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/towardsdatascience.com\/#organization\",\"name\":\"Towards Data Science\",\"alternateName\":\"TDS\",\"url\":\"https:\/\/towardsdatascience.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/towardsdatascience.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2025\/02\/tds-logo.jpg\",\"contentUrl\":\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2025\/02\/tds-logo.jpg\",\"width\":696,\"height\":696,\"caption\":\"Towards Data Science\"},\"image\":{\"@id\":\"https:\/\/towardsdatascience.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/TDataScience\",\"https:\/\/www.youtube.com\/c\/TowardsDataScience\",\"https:\/\/www.linkedin.com\/company\/towards-data-science\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/towardsdatascience.com\/#\/schema\/person\/f9925d336b6fe962b03ad8281d90b8ee\",\"name\":\"TDS Editors\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/towardsdatascience.com\/#\/schema\/person\/image\/23494c9101089ad44ae88ce9d2f56aac\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"TDS Editors\"},\"description\":\"Building a vibrant data science and machine learning community. Share your insights and projects with our global audience: bit.ly\/write-for-tds\",\"url\":\"https:\/\/towardsdatascience.com\/author\/towardsdatascience\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Beginner\u2019s Guide to Quantum Computing with Python | Towards Data Science","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/","og_locale":"en_US","og_type":"article","og_title":"A Beginner\u2019s Guide to Quantum Computing with Python | Towards Data Science","og_description":"Simulate a quantum computer with Qiskit","og_url":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/","og_site_name":"Towards Data Science","article_published_time":"2026-03-27T12:10:00+00:00","og_image":[{"width":714,"height":601,"url":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/03\/image-68.png","type":"image\/png"}],"author":"Mauro Di Pietro","twitter_card":"summary_large_image","twitter_creator":"@TDataScience","twitter_site":"@TDataScience","twitter_misc":{"Written by":"Mauro Di Pietro","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#article","isPartOf":{"@id":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/"},"author":{"name":"TDS Editors","@id":"https:\/\/towardsdatascience.com\/#\/schema\/person\/f9925d336b6fe962b03ad8281d90b8ee"},"headline":"A Beginner\u2019s Guide to Quantum Computing with Python","datePublished":"2026-03-27T12:10:00+00:00","mainEntityOfPage":{"@id":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/"},"wordCount":1198,"publisher":{"@id":"https:\/\/towardsdatascience.com\/#organization"},"image":{"@id":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#primaryimage"},"thumbnailUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/03\/image-68.png","keywords":["Artificial Intelligence","Data Science","Machine Learning","Quantum Algorithms","Quantum Programming"],"articleSection":["Quantum Computing"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/","url":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/","name":"A Beginner\u2019s Guide to Quantum Computing with Python | Towards Data Science","isPartOf":{"@id":"https:\/\/towardsdatascience.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#primaryimage"},"image":{"@id":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#primaryimage"},"thumbnailUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/03\/image-68.png","datePublished":"2026-03-27T12:10:00+00:00","breadcrumb":{"@id":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#primaryimage","url":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/03\/image-68.png","contentUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/03\/image-68.png","width":714,"height":601,"caption":"Photo by Fractal Hassan on Unsplash"},{"@type":"BreadcrumbList","@id":"https:\/\/towardsdatascience.com\/a-beginners-guide-to-quantum-computing-with-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/towardsdatascience.com\/"},{"@type":"ListItem","position":2,"name":"A Beginner\u2019s Guide to Quantum Computing with Python"}]},{"@type":"WebSite","@id":"https:\/\/towardsdatascience.com\/#website","url":"https:\/\/towardsdatascience.com\/","name":"Towards Data Science","description":"Publish AI, ML &amp; data-science insights to a global community of data professionals.","publisher":{"@id":"https:\/\/towardsdatascience.com\/#organization"},"alternateName":"TDS","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/towardsdatascience.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/towardsdatascience.com\/#organization","name":"Towards Data Science","alternateName":"TDS","url":"https:\/\/towardsdatascience.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/towardsdatascience.com\/#\/schema\/logo\/image\/","url":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2025\/02\/tds-logo.jpg","contentUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2025\/02\/tds-logo.jpg","width":696,"height":696,"caption":"Towards Data Science"},"image":{"@id":"https:\/\/towardsdatascience.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/TDataScience","https:\/\/www.youtube.com\/c\/TowardsDataScience","https:\/\/www.linkedin.com\/company\/towards-data-science\/"]},{"@type":"Person","@id":"https:\/\/towardsdatascience.com\/#\/schema\/person\/f9925d336b6fe962b03ad8281d90b8ee","name":"TDS Editors","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/towardsdatascience.com\/#\/schema\/person\/image\/23494c9101089ad44ae88ce9d2f56aac","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"TDS Editors"},"description":"Building a vibrant data science and machine learning community. Share your insights and projects with our global audience: bit.ly\/write-for-tds","url":"https:\/\/towardsdatascience.com\/author\/towardsdatascience\/"}]}},"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"TDS Contributor Portal","distributor_original_site_url":"https:\/\/contributor.insightmediagroup.io","push-errors":false,"_links":{"self":[{"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/posts\/608696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/comments?post=608696"}],"version-history":[{"count":0,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/posts\/608696\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/media\/608697"}],"wp:attachment":[{"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/media?parent=608696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/categories?post=608696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/tags?post=608696"},{"taxonomy":"sponsor","embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/sponsor?post=608696"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/towardsdatascience.com\/wp-json\/wp\/v2\/coauthors?post=608696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}