{"id":325,"date":"2026-09-11T09:43:11","date_gmt":"2026-09-11T09:43:11","guid":{"rendered":"https:\/\/www.interviewbit.com\/varsity\/blog\/?p=325"},"modified":"2026-09-11T09:43:13","modified_gmt":"2026-09-11T09:43:13","slug":"quantum-gates-explained-from-hadamard-to-cnot","status":"publish","type":"post","link":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/","title":{"rendered":"Quantum Gates Explained: From Hadamard to CNOT"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you searched for \u201cquantum gates\u201d expecting AND, OR, and NOT , classical logic gates and transistors, you\u2019re in the right place, but the concept is different. <strong>Quantum gates<\/strong> are the quantum computing equivalent: operations that change the state of one or more qubits. Unlike classical gates, they\u2019re reversible and they work on qubits in superposition, not just fixed 0s and 1s.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide covers every major quantum gate are X, Y, Z, Hadamard, S, T, CNOT, Toffoli, and SWAP in plain English first, what each is used for second, math only if you want it. All runnable code lives in one place near the end.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Are Quantum Gates in Quantum Computing?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A quantum gate is an operation that changes the state of one or more qubits , the quantum equivalent of a classical logic gate like AND or NOT. Two things set them apart: they\u2019re always reversible (a classical AND gate destroys information; a quantum gate never does), and they can act on qubits in superposition, transforming every possibility a qubit holds at once.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Do Quantum Gates Differ From Classical Logic Gates?<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Why Are Quantum Gates Reversible?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A classical AND gate takes two input bits and produces one output bit. Feed it a 0 and you can\u2019t tell which input combination produced it , the information is gone. A quantum gate can never do that. Every quantum logic gate is <strong>unitary<\/strong> always invertible. If you know the output, you can reconstruct the input by running the gate backward. This isn\u2019t a design choice; it falls out of the physics, since quantum states evolve reversibly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Classical Logic Gates vs Quantum Gates: What&#8217;s the Difference?<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>&nbsp;<\/td><td>Classical logic gates<\/td><td>Quantum gates<\/td><\/tr><tr><td>What it acts on<\/td><td>Bits (0 or 1)<\/td><td>Qubits (0, 1, or superposition)<\/td><\/tr><tr><td>Reversible?<\/td><td>Not necessarily<\/td><td>Always<\/td><\/tr><tr><td>Can it be undone?<\/td><td>Only if no information was lost<\/td><td>Yes, by applying the inverse<\/td><\/tr><tr><td>Inputs vs outputs<\/td><td>Can differ (e.g. 2 inputs \u2192 1 output for AND)<\/td><td>Always equal<\/td><\/tr><tr><td>What happens to information<\/td><td>Can be destroyed<\/td><td>Always conserved<\/td><\/tr><tr><td>Examples<\/td><td>AND, OR, NOT, NAND, XOR<\/td><td>X, Y, Z, H, S, T, CNOT, Toffoli, SWAP<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This is the fastest way to see why quantum logic gates need a different toolbox than classical ones.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Are the X, Y, and Z Quantum Gates?<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">X Gate in Quantum Computing<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What it does:<\/strong> X flips a qubit\u2019s value 0 becomes 1, 1 becomes 0. Applied to a superposition, it swaps the roles of the 0 and 1 parts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What it\u2019s for:<\/strong> X is how you turn a qubit that starts as 0 (the standard hardware starting state) into a 1, or invert a bit as setup for a larger circuit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For the mathematically curious<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X = [ 0&nbsp; 1 ]<br>[ 1&nbsp; 0 ]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is the Pauli-X matrix. It\u2019s Hermitian, traceless, and its own inverse , apply it twice and you\u2019re back where you started.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Z Gate in Quantum Computing<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before Z, it helps to explain <strong>phase<\/strong> , the idea that trips up most beginners. Phase is an internal property of a quantum state that doesn\u2019t change what you get from measuring a single qubit alone, but changes how that qubit behaves when combined with others, through interference. It\u2019s invisible to one measurement but very real in anything more complex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What it does:<\/strong> Z leaves a qubit that\u2019s definitely 0 or 1 alone. On a superposition, it flips the phase of the \u201c1\u201d part \u2014 a change you won\u2019t see in a single measurement, only in how the qubit interacts later.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What it\u2019s for:<\/strong> Z is essential once you\u2019re combining qubits or building interference effects, which is where quantum computing gets its real speedups.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For the mathematically curious<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Z&nbsp; [ 1 &nbsp; 0 ]<br>[ 0&nbsp; -1 ]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Z leaves |0\u27e9 unchanged and multiplies |1\u27e9 by \u22121. Hermitian, traceless, its own inverse.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Y Gate in Quantum Computing<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What it does:<\/strong> Y combines what X and Z do&nbsp; it flips the qubit\u2019s value <em>and<\/em> flips its phase in one operation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What it\u2019s for:<\/strong> Less common as a standalone gate in beginner circuits, but fundamental to the Pauli group underlying quantum error correction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For the mathematically curious<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Y = &nbsp; &nbsp; &nbsp; [ 0&nbsp; -i ]<br>[ i &nbsp; 0 ]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hermitian, traceless, and its own inverse, like X and Z&nbsp; together the three form the Pauli group.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Hadamard gate : how you create superposition<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Hadamard gate (H) is arguably the single most important gate in quantum computing, and probably why you\u2019re reading this.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What it does:<\/strong> Applied to a qubit that\u2019s definitely 0, H puts it into an even mix of 0 and 1 , a true superposition, not a guess. Applied to 1, H also produces an even mix, with a different internal phase relationship. Measure afterward and you\u2019ll get 0 about half the time, 1 about half the time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why this is superposition, not just randomness:<\/strong> Before you measure, the qubit genuinely isn\u2019t 0 or 1 , it\u2019s in a well-defined state where <em>both<\/em> possibilities are live components, with precise amplitudes and phase. That\u2019s different from a fixed hidden value you just don\u2019t know yet, like a coin already lying heads-up.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Applying H twice returns the qubit to exactly where it started.<\/strong> If H produced classical randomness, doing it again would give another random result. It doesn\u2019t . H is precise and fully reversible, which is one of the cleanest ways to see superposition is a real, structured state, not disguised uncertainty.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-9-1024x683.png\" alt=\"\" class=\"wp-image-328\" style=\"aspect-ratio:1.5\" srcset=\"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-9-1024x683.png 1024w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-9-300x200.png 300w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-9-768x512.png 768w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-9.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">&nbsp;S and T Phase Gates in Quantum Computing<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">S and T both rotate the phase of a qubit\u2019s |1\u27e9 component by a fixed amount, without touching |0\u27e9 or changing what a single measurement shows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>S gate:<\/strong> Rotates phase by a quarter turn (90\u00b0) , the \u201csquare root of Z,\u201d since applying it twice equals one Z.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>T gate:<\/strong> Rotates phase by an eighth of a turn (45\u00b0) , half of S. Applying it twice equals one S.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why phase control matters:<\/strong> X gets you between 0 and 1; H gets you into superposition. But without fine phase control, you can\u2019t build the interference patterns most useful algorithms depend on. T, combined with H and CNOT, forms a commonly used <strong>universal gate set<\/strong> gates from which any quantum circuit can be built to arbitrary accuracy. T isn\u2019t magic alone; it\u2019s one ingredient in a universal combination, and on real hardware it\u2019s typically more error-prone than simpler Clifford gates (H, S, X, Y, Z, CNOT).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-10-1024x683.png\" alt=\"\" class=\"wp-image-329\" style=\"aspect-ratio:1.5\" srcset=\"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-10-1024x683.png 1024w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-10-300x200.png 300w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-10-768x512.png 768w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-10.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The CNOT gate : how qubits get entangled<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">How CNOT works : control and target<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">CNOT acts on two qubits: a <strong>control qubit<\/strong> and a <strong>target qubit<\/strong>. If the control is 1, flip the target. If the control is 0, leave it unchanged. The control itself is never modified.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Control<\/td><td>Target (before)<\/td><td>Target (after)<\/td><\/tr><tr><td>0<\/td><td>0<\/td><td>0<\/td><\/tr><tr><td>0<\/td><td>1<\/td><td>1<\/td><\/tr><tr><td>1<\/td><td>0<\/td><td>1<\/td><\/tr><tr><td>1<\/td><td>1<\/td><td>0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why CNOT is the gate that creates entanglement<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Apply Hadamard to qubit 0, then CNOT with qubit 0 as control and qubit 1 as target. Both qubits start at 0; H puts qubit 0 into superposition while qubit 1 stays at 0; CNOT then flips qubit 1 only in the \u201cpart\u201d of the state where qubit 0 is 1.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The result is a <strong>Bell pair<\/strong>: measuring both qubits gives roughly 50% \u201c00\u201d and 50% \u201c11\u201d , almost never \u201c01\u201d or \u201c10.\u201d This isn\u2019t the qubits \u201cagreeing\u201d after the fact or communicating. There\u2019s a single combined quantum state that never separates into independent single-qubit states after the CNOT , the correlation is a structural consequence of that shared state, not a signal at measurement time.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-7-1024x683.png\" alt=\"\" class=\"wp-image-326\" style=\"aspect-ratio:1.5\" srcset=\"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-7-1024x683.png 1024w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-7-300x200.png 300w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-7-768x512.png 768w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-7.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Toffoli and SWAP : the three-qubit and two-qubit workhorses<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">The Toffoli gate (CCNOT)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Toffoli extends CNOT with two control qubits: the target flips only if <em>both<\/em> controls are 1. This reproduces a classical AND gate reversibly feed it two inputs as controls and a 0 as target, and the target holds their AND, with no information lost. That\u2019s how classical logic embeds inside a reversible quantum circuit.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-8-1024x683.png\" alt=\"\" class=\"wp-image-327\" style=\"aspect-ratio:1.5\" srcset=\"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-8-1024x683.png 1024w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-8-300x200.png 300w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-8-768x512.png 768w, https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/image-8.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The SWAP gate<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">SWAP exchanges the states of two qubits&nbsp; whatever qubit A held, qubit B now holds, and vice versa. It sounds trivial, but on real hardware not every qubit connects to every other one. When two qubits that need to interact aren\u2019t adjacent, SWAP gates move quantum information across the chip until they are.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For the mathematically curious<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SWAP = [ 1&nbsp; 0&nbsp; 0&nbsp; 0 ]<br>&nbsp; &nbsp; [ 0&nbsp; 0&nbsp; 1&nbsp; 0 ]<br>&nbsp; &nbsp; [ 0&nbsp; 1&nbsp; 0&nbsp; 0 ]<br>&nbsp; &nbsp; [ 0&nbsp; 0&nbsp; 0&nbsp; 1 ]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SWAP exchanges |01\u27e9 and |10\u27e9 while leaving |00\u27e9 and |11\u27e9 untouched.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How gates combine into quantum circuits<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A circuit is a sequence of gates applied to qubits, each qubit drawn as a wire read left to right. Multi-qubit gates like CNOT and Toffoli connect two or more wires at a point in that sequence.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>universal gate set<\/strong>&nbsp; like {H, T, CNOT}&nbsp; is a small collection of gates from which any quantum operation can be built, similar to how classical NAND alone builds any classical circuit. The code appendix includes a complete example chaining H, T, and CNOT together.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Try These Yourself<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You don\u2019t need a quantum computer, or anything installed. <strong><a href=\"https:\/\/quantum.cloud.ibm.com\/composer\" data-type=\"link\" data-id=\"quantum.cloud.ibm.com\/composer\">IBM Quantum Composer<\/a><\/strong> lets you build circuits visually in a browser at . <strong>Qiskit<\/strong> is the Python library behind every snippet below, it runs on a local simulator, or on real IBM hardware with an account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A good first exercise: build the Bell-pair circuit from the CNOT section, in Composer or in code, and look at the resulting histogram. Seeing \u201c00 and 11 only, roughly 50\/50\u201d on your own screen is worth more than reading about it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more, see [what quantum computing actually is](link not yet live), [how entanglement works](link not yet live), our [full Qiskit tutorial](link not yet live), and [Grover\u2019s algorithm](link not yet live).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Want to take your AI engineering skills beyond individual experiments?<\/strong> Explore&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.interviewbit.com\/varsity\/iit-delhi\/quantum-computing\">IIT Delhi\u2019s Advanced Certificate in Quantum Computing<\/a>, a hands-on programme focused on building, deploying, and integrating real-world AI systems<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1789119388822\"><strong class=\"schema-faq-question\"><strong>What are quantum gates in simple terms?<\/strong><\/strong> <p class=\"schema-faq-answer\">Quantum gates are operations that change a qubit\u2019s state , the quantum equivalent of classical logic gates like AND or NOT. Every quantum gate is fully reversible, and gates can act on qubits in superposition, transforming multiple possibilities in a single step rather than just fixed 0s and 1s.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1789119395778\"><strong class=\"schema-faq-question\"><strong>What is the difference between classical and quantum gates?<\/strong><\/strong> <p class=\"schema-faq-answer\">Two things: reversibility and superposition. Classical gates like AND can destroy information and can\u2019t always be undone; quantum gates always can be. Classical gates act on fixed bits; quantum gates can act on qubits holding a mix of 0 and 1 at once. See the comparison table above.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1789119407210\"><strong class=\"schema-faq-question\"><strong>What does the Hadamard gate do?<\/strong><\/strong> <p class=\"schema-faq-answer\">It takes a qubit that\u2019s definitely 0 or 1 and puts it into an even superposition of both. Measuring afterward gives 0 about half the time and 1 about half the time \u2014 but applying it twice returns the qubit exactly to where it started, showing this is precise and reversible, not random.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1789119419666\"><strong class=\"schema-faq-question\"><strong>What is a CNOT gate used for?<\/strong><\/strong> <p class=\"schema-faq-answer\">CNOT flips a target qubit only when a control qubit is 1, leaving it alone otherwise. It\u2019s the standard way to entangle two qubits: applying Hadamard to one qubit and then using it as CNOT\u2019s control creates a Bell pair, where measurements of the two qubits become correlated.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1789119428024\"><strong class=\"schema-faq-question\"><strong>Are quantum gates reversible?<\/strong><\/strong> <p class=\"schema-faq-answer\">Yes, always. Every quantum gate is represented by a unitary matrix, which by definition has an inverse , you can always run a gate \u201cbackward\u201d to recover the input. This isn\u2019t a design choice; it follows directly from the reversible nature of quantum mechanics.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1789119440558\"><strong class=\"schema-faq-question\"><strong>How many quantum gates are there?<\/strong><\/strong> <p class=\"schema-faq-answer\">Infinitely many in principle, since gates like phase rotations can use any angle. In practice, a small <strong>universal gate set<\/strong>\u00a0 such as Hadamard, T, and CNOT\u00a0 is enough to build any quantum operation to arbitrary precision by combining them in the right sequence.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you searched for \u201cquantum gates\u201d expecting AND, OR, and NOT , classical logic gates and transistors, you\u2019re in the right place, but the concept is different. Quantum gates are the quantum computing equivalent: operations that change the state of one or more qubits. Unlike classical gates, they\u2019re reversible and they work on qubits in [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":331,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6],"tags":[67],"class_list":["post-325","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quantum-computing","tag-quantum-gates-explained"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"acf":{"reviewed_by":null},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Quantum Gates Explained: From Hadamard to CNOT - Varsity Blog<\/title>\n<meta name=\"description\" content=\"Learn how quantum gates work, from Hadamard to CNOT, and understand their role in manipulating qubits and building quantum circuits.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Quantum Gates Explained: From Hadamard to CNOT - Varsity Blog\" \/>\n<meta property=\"og:description\" content=\"Learn how quantum gates work, from Hadamard to CNOT, and understand their role in manipulating qubits and building quantum circuits.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/\" \/>\n<meta property=\"og:site_name\" content=\"Varsity Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-11T09:43:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-11T09:43:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/varsity_banner-quantum-gates-explained-from-hadamard-to-cnot-banner1-1789119679.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1010\" \/>\n\t<meta property=\"og:image:height\" content=\"673\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Varsity on Behalf of CEP IIT Delhi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Varsity on Behalf of CEP IIT Delhi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/\"},\"author\":{\"name\":\"Varsity on Behalf of CEP IIT Delhi\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/#\\\/schema\\\/person\\\/7b5db9a94eddee529cd35968692d9c29\"},\"headline\":\"Quantum Gates Explained: From Hadamard to CNOT\",\"datePublished\":\"2026-09-11T09:43:11+00:00\",\"dateModified\":\"2026-09-11T09:43:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/\"},\"wordCount\":1932,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/varsity_banner-quantum-gates-explained-from-hadamard-to-cnot-banner1-1789119679.webp\",\"keywords\":[\"quantum gates explained\"],\"articleSection\":[\"Quantum Computing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#respond\"]}]},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/\",\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/\",\"name\":\"Quantum Gates Explained: From Hadamard to CNOT - Varsity Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/varsity_banner-quantum-gates-explained-from-hadamard-to-cnot-banner1-1789119679.webp\",\"datePublished\":\"2026-09-11T09:43:11+00:00\",\"dateModified\":\"2026-09-11T09:43:13+00:00\",\"description\":\"Learn how quantum gates work, from Hadamard to CNOT, and understand their role in manipulating qubits and building quantum circuits.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119388822\"},{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119395778\"},{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119407210\"},{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119419666\"},{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119428024\"},{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119440558\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/varsity_banner-quantum-gates-explained-from-hadamard-to-cnot-banner1-1789119679.webp\",\"contentUrl\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/varsity_banner-quantum-gates-explained-from-hadamard-to-cnot-banner1-1789119679.webp\",\"width\":1010,\"height\":673,\"caption\":\"quantum gates explained\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Quantum Gates Explained: From Hadamard to CNOT\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/\",\"name\":\"Varsity Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/#organization\",\"name\":\"Varsity Blog\",\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/varsity-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/varsity-logo.png\",\"width\":275,\"height\":64,\"caption\":\"Varsity Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/varsity-by-interviewbit\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/#\\\/schema\\\/person\\\/7b5db9a94eddee529cd35968692d9c29\",\"name\":\"Varsity on Behalf of CEP IIT Delhi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bdb12370d043ff980b2b8f1ccb67f5a1f0e333aaca46cc35358b1af8b1d98334?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bdb12370d043ff980b2b8f1ccb67f5a1f0e333aaca46cc35358b1af8b1d98334?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bdb12370d043ff980b2b8f1ccb67f5a1f0e333aaca46cc35358b1af8b1d98334?s=96&d=mm&r=g\",\"caption\":\"Varsity on Behalf of CEP IIT Delhi\"},\"description\":\"Varsity by InterviewBit, in collaboration with CEP IIT Delhi, creates industry-relevant learning programmes designed to help learners build practical, in-demand skills. Through this author profile, we publish articles that complement our courses covering curriculum-aligned topics, foundational concepts, emerging trends, and advanced insights. Our goal is to help learners deepen their understanding beyond the classroom and apply their knowledge confidently in real-world contexts.\",\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/author\\\/varsity-on-behalf-of-cep-iit-delhi\\\/\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119388822\",\"position\":1,\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119388822\",\"name\":\"What are quantum gates in simple terms?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Quantum gates are operations that change a qubit\u2019s state , the quantum equivalent of classical logic gates like AND or NOT. Every quantum gate is fully reversible, and gates can act on qubits in superposition, transforming multiple possibilities in a single step rather than just fixed 0s and 1s.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119395778\",\"position\":2,\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119395778\",\"name\":\"What is the difference between classical and quantum gates?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Two things: reversibility and superposition. Classical gates like AND can destroy information and can\u2019t always be undone; quantum gates always can be. Classical gates act on fixed bits; quantum gates can act on qubits holding a mix of 0 and 1 at once. See the comparison table above.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119407210\",\"position\":3,\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119407210\",\"name\":\"What does the Hadamard gate do?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"It takes a qubit that\u2019s definitely 0 or 1 and puts it into an even superposition of both. Measuring afterward gives 0 about half the time and 1 about half the time \u2014 but applying it twice returns the qubit exactly to where it started, showing this is precise and reversible, not random.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119419666\",\"position\":4,\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119419666\",\"name\":\"What is a CNOT gate used for?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"CNOT flips a target qubit only when a control qubit is 1, leaving it alone otherwise. It\u2019s the standard way to entangle two qubits: applying Hadamard to one qubit and then using it as CNOT\u2019s control creates a Bell pair, where measurements of the two qubits become correlated.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119428024\",\"position\":5,\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119428024\",\"name\":\"Are quantum gates reversible?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Yes, always. Every quantum gate is represented by a unitary matrix, which by definition has an inverse , you can always run a gate \u201cbackward\u201d to recover the input. This isn\u2019t a design choice; it follows directly from the reversible nature of quantum mechanics.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119440558\",\"position\":6,\"url\":\"https:\\\/\\\/www.interviewbit.com\\\/varsity\\\/blog\\\/quantum-gates-explained-from-hadamard-to-cnot\\\/#faq-question-1789119440558\",\"name\":\"How many quantum gates are there?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Infinitely many in principle, since gates like phase rotations can use any angle. In practice, a small <strong>universal gate set<\\\/strong>\u00a0 such as Hadamard, T, and CNOT\u00a0 is enough to build any quantum operation to arbitrary precision by combining them in the right sequence.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Quantum Gates Explained: From Hadamard to CNOT - Varsity Blog","description":"Learn how quantum gates work, from Hadamard to CNOT, and understand their role in manipulating qubits and building quantum circuits.","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:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/","og_locale":"en_US","og_type":"article","og_title":"Quantum Gates Explained: From Hadamard to CNOT - Varsity Blog","og_description":"Learn how quantum gates work, from Hadamard to CNOT, and understand their role in manipulating qubits and building quantum circuits.","og_url":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/","og_site_name":"Varsity Blog","article_published_time":"2026-09-11T09:43:11+00:00","article_modified_time":"2026-09-11T09:43:13+00:00","og_image":[{"width":1010,"height":673,"url":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/varsity_banner-quantum-gates-explained-from-hadamard-to-cnot-banner1-1789119679.webp","type":"image\/webp"}],"author":"Varsity on Behalf of CEP IIT Delhi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Varsity on Behalf of CEP IIT Delhi","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#article","isPartOf":{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/"},"author":{"name":"Varsity on Behalf of CEP IIT Delhi","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/#\/schema\/person\/7b5db9a94eddee529cd35968692d9c29"},"headline":"Quantum Gates Explained: From Hadamard to CNOT","datePublished":"2026-09-11T09:43:11+00:00","dateModified":"2026-09-11T09:43:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/"},"wordCount":1932,"commentCount":0,"publisher":{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/#organization"},"image":{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/varsity_banner-quantum-gates-explained-from-hadamard-to-cnot-banner1-1789119679.webp","keywords":["quantum gates explained"],"articleSection":["Quantum Computing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#respond"]}]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/","url":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/","name":"Quantum Gates Explained: From Hadamard to CNOT - Varsity Blog","isPartOf":{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#primaryimage"},"image":{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/varsity_banner-quantum-gates-explained-from-hadamard-to-cnot-banner1-1789119679.webp","datePublished":"2026-09-11T09:43:11+00:00","dateModified":"2026-09-11T09:43:13+00:00","description":"Learn how quantum gates work, from Hadamard to CNOT, and understand their role in manipulating qubits and building quantum circuits.","breadcrumb":{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119388822"},{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119395778"},{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119407210"},{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119419666"},{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119428024"},{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119440558"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#primaryimage","url":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/varsity_banner-quantum-gates-explained-from-hadamard-to-cnot-banner1-1789119679.webp","contentUrl":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/09\/varsity_banner-quantum-gates-explained-from-hadamard-to-cnot-banner1-1789119679.webp","width":1010,"height":673,"caption":"quantum gates explained"},{"@type":"BreadcrumbList","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.interviewbit.com\/varsity\/blog\/"},{"@type":"ListItem","position":2,"name":"Quantum Gates Explained: From Hadamard to CNOT"}]},{"@type":"WebSite","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/#website","url":"https:\/\/www.interviewbit.com\/varsity\/blog\/","name":"Varsity Blog","description":"","publisher":{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.interviewbit.com\/varsity\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/#organization","name":"Varsity Blog","url":"https:\/\/www.interviewbit.com\/varsity\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/08\/varsity-logo.png","contentUrl":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-content\/uploads\/2026\/08\/varsity-logo.png","width":275,"height":64,"caption":"Varsity Blog"},"image":{"@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/varsity-by-interviewbit\/"]},{"@type":"Person","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/#\/schema\/person\/7b5db9a94eddee529cd35968692d9c29","name":"Varsity on Behalf of CEP IIT Delhi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/bdb12370d043ff980b2b8f1ccb67f5a1f0e333aaca46cc35358b1af8b1d98334?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/bdb12370d043ff980b2b8f1ccb67f5a1f0e333aaca46cc35358b1af8b1d98334?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bdb12370d043ff980b2b8f1ccb67f5a1f0e333aaca46cc35358b1af8b1d98334?s=96&d=mm&r=g","caption":"Varsity on Behalf of CEP IIT Delhi"},"description":"Varsity by InterviewBit, in collaboration with CEP IIT Delhi, creates industry-relevant learning programmes designed to help learners build practical, in-demand skills. Through this author profile, we publish articles that complement our courses covering curriculum-aligned topics, foundational concepts, emerging trends, and advanced insights. Our goal is to help learners deepen their understanding beyond the classroom and apply their knowledge confidently in real-world contexts.","url":"https:\/\/www.interviewbit.com\/varsity\/blog\/author\/varsity-on-behalf-of-cep-iit-delhi\/"},{"@type":"Question","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119388822","position":1,"url":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119388822","name":"What are quantum gates in simple terms?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Quantum gates are operations that change a qubit\u2019s state , the quantum equivalent of classical logic gates like AND or NOT. Every quantum gate is fully reversible, and gates can act on qubits in superposition, transforming multiple possibilities in a single step rather than just fixed 0s and 1s.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119395778","position":2,"url":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119395778","name":"What is the difference between classical and quantum gates?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Two things: reversibility and superposition. Classical gates like AND can destroy information and can\u2019t always be undone; quantum gates always can be. Classical gates act on fixed bits; quantum gates can act on qubits holding a mix of 0 and 1 at once. See the comparison table above.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119407210","position":3,"url":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119407210","name":"What does the Hadamard gate do?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"It takes a qubit that\u2019s definitely 0 or 1 and puts it into an even superposition of both. Measuring afterward gives 0 about half the time and 1 about half the time \u2014 but applying it twice returns the qubit exactly to where it started, showing this is precise and reversible, not random.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119419666","position":4,"url":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119419666","name":"What is a CNOT gate used for?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"CNOT flips a target qubit only when a control qubit is 1, leaving it alone otherwise. It\u2019s the standard way to entangle two qubits: applying Hadamard to one qubit and then using it as CNOT\u2019s control creates a Bell pair, where measurements of the two qubits become correlated.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119428024","position":5,"url":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119428024","name":"Are quantum gates reversible?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Yes, always. Every quantum gate is represented by a unitary matrix, which by definition has an inverse , you can always run a gate \u201cbackward\u201d to recover the input. This isn\u2019t a design choice; it follows directly from the reversible nature of quantum mechanics.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119440558","position":6,"url":"https:\/\/www.interviewbit.com\/varsity\/blog\/quantum-gates-explained-from-hadamard-to-cnot\/#faq-question-1789119440558","name":"How many quantum gates are there?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Infinitely many in principle, since gates like phase rotations can use any angle. In practice, a small <strong>universal gate set<\/strong>\u00a0 such as Hadamard, T, and CNOT\u00a0 is enough to build any quantum operation to arbitrary precision by combining them in the right sequence.","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/posts\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/comments?post=325"}],"version-history":[{"count":1,"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/posts\/325\/revisions"}],"predecessor-version":[{"id":332,"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/posts\/325\/revisions\/332"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/media\/331"}],"wp:attachment":[{"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/media?parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/categories?post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.interviewbit.com\/varsity\/blog\/wp-json\/wp\/v2\/tags?post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}