[{"data":1,"prerenderedAt":2319},["ShallowReactive",2],{"blog-post-quantum-entanglement":3,"sibling-dives-quantum-entanglement":2317,"learn-track-quantum-entanglement":2318},{"id":4,"title":5,"authors":6,"body":8,"breadcrumb":2276,"builders":2280,"byline":2293,"category":2294,"categoryName":2294,"challenge":2294,"courseAuthor":2294,"courseLead":2294,"dek":2295,"description":2296,"draft":2297,"extension":2298,"eyebrow":2294,"featured":2297,"finish":2294,"fork":2299,"hero":2294,"heroAlt":2294,"heroCta":2294,"heroImage":2294,"homepageFeatured":2297,"kind":2301,"lessonCount":2294,"meta":2302,"navigation":2303,"newsItems":2294,"next":2294,"ogImage":2304,"order":2294,"outcomes":2294,"path":2305,"publishDate":2306,"readingTime":2307,"related":2308,"relatedProjects":2294,"seo":2309,"stem":2312,"tags":2313,"track":2294,"trackName":2294,"__hash__":2316},"blog\u002Fblog\u002Flearn\u002Fquantum-entanglement.md","Building with Quantum Entanglement",[7],"nico",{"type":9,"value":10,"toc":2262},"minimark",[11,15,18,21,26,29,43,46,49,52,56,59,367,391,405,415,419,422,443,467,490,504,517,520,524,527,530,537,548,551,696,699,722,731,735,738,743,746,752,755,758,1001,1013,1035,1041,1045,1048,1054,1061,1064,1185,1188,1191,1198,1202,1205,1208,1213,1219,1222,1225,1386,1389,1395,1399,1402,1408,1411,1417,1420,1538,1553,1560,1564,1567,1573,1576,1579,1582,1585,1588,1591,1594,1730,1733,1736,1743,1747,1756,1920,1923,1926,1929,1935,1939,1942,1950,1953,2210,2218,2226,2229,2237,2241,2244,2247,2258],[12,13,14],"p",{},"Entanglement is two or more qubits in one joint state that cannot be split into a separate state for each. For the pair built below, neither qubit has a definite value of its own until it is measured.",[12,16,17],{},"Measure both the same way and you know one result from the other straight away, however far apart they are. Nothing travels between them, and nothing can be sent this way: to see the agreement, both people still have to compare results over an ordinary channel, no faster than light.",[12,19,20],{},"This is not the same as two matched gloves posted in two boxes. There, each box held a definite glove all along and opening one only revealed it. An entangled pair holds no definite values before the measurement, and the answers still agree. The Bell state below shows how to tell the two apart.",[22,23,25],"h2",{"id":24},"where-entanglement-came-from","Where entanglement came from",[12,27,28],{},"The effect was argued about for thirty years before anyone could test it.",[30,31],"timeline",{"l1":32,"l2":33,"l3":34,"l4":35,"l5":36,"l6":37,"w1":38,"w2":38,"w3":39,"w4":40,"w5":41,"w6":42},"Einstein, Podolsky and Rosen argue the effect means quantum theory is incomplete.","Schrödinger names it entanglement, the characteristic trait of quantum mechanics.","John Bell shows entangled particles correlate too strongly for any local hidden-variable theory.","Clauser and Freedman run the first experimental test of Bell's limit.","Aspect confirms the violation in tighter experiments.","Aspect, Clauser and Zeilinger share the Nobel Prize in Physics.","1935","1964","1972","1982","2022",[12,44,45],{},"Einstein called it \"spooky action at a distance\" and bet the result was carried by some hidden detail the theory had missed.",[12,47,48],{},"Bell turned that bet into a number: if the values were fixed in advance and nothing travelled between the particles, the correlations could not exceed a certain limit. Entangled pairs exceed it, and the last loopholes in those experiments were closed in 2015.",[12,50,51],{},"Einstein's kind of hidden detail, local and fixed in advance, is ruled out.",[22,53,55],{"id":54},"the-smallest-one-you-can-make","The smallest one you can make",[12,57,58],{},"You do not need particles and a laboratory to make one. Two qubits are enough: put one into superposition with a Hadamard, then link it to the second with a CNOT. Two gates, and every project below reaches for the same pair or a close relative.",[60,61,65],"code-block",{"name":62,"run-href":63,"tag":64},"bell_state.py","\u002Fu\u002Fqollab\u002Fbell-state","Python · Playground version",[66,67,72],"pre",{"className":68,"code":69,"language":70,"meta":71,"style":71},"language-python shiki shiki-themes one-dark-pro","# 'backend' is pre-created for you in the Qollab Playground.\nfrom qiskit import QuantumCircuit\n\nqc = QuantumCircuit(2, 2)\nqc.h(0)\nqc.cx(0, 1)\nqc.measure([0, 1], [0, 1])\n\njob = backend.run(qc, shots=1000)\ncounts = job.result().get_counts()\nprint(counts)\n","python","",[73,74,75,89,108,116,149,167,188,220,227,258,284,295],"code",{"__ignoreMap":71},[76,77,80,85],"span",{"class":78,"line":79},"line",1,[76,81,84],{"class":82,"aria-hidden":83},"qg-cue qg-cue--empty","true","​",[76,86,88],{"class":87},"sV9Aq","# 'backend' is pre-created for you in the Qollab Playground.\n",[76,90,92,94,98,102,105],{"class":78,"line":91},2,[76,93,84],{"class":82,"aria-hidden":83},[76,95,97],{"class":96},"seHd6","from",[76,99,101],{"class":100},"sn6KH"," qiskit ",[76,103,104],{"class":96},"import",[76,106,107],{"class":100}," QuantumCircuit\n",[76,109,111,113],{"class":78,"line":110},3,[76,112,84],{"class":82,"aria-hidden":83},[76,114,115],{},"​\n",[76,117,120,123,126,130,134,137,141,144,146],{"class":78,"data-cue":118,"line":119},"1",4,[76,121,118],{"class":122},"qg-cue",[76,124,125],{"class":100},"qc ",[76,127,129],{"class":128},"sjrmR","=",[76,131,133],{"class":132},"sVbv2"," QuantumCircuit",[76,135,136],{"class":100},"(",[76,138,140],{"class":139},"sVC51","2",[76,142,143],{"class":100},", ",[76,145,140],{"class":139},[76,147,148],{"class":100},")\n",[76,150,152,154,157,160,162,165],{"class":78,"data-cue":140,"line":151},5,[76,153,140],{"class":122},[76,155,156],{"class":100},"qc.",[76,158,159],{"class":132},"h",[76,161,136],{"class":100},[76,163,164],{"class":139},"0",[76,166,148],{"class":100},[76,168,171,173,175,178,180,182,184,186],{"class":78,"data-cue":169,"line":170},"3",6,[76,172,169],{"class":122},[76,174,156],{"class":100},[76,176,177],{"class":132},"cx",[76,179,136],{"class":100},[76,181,164],{"class":139},[76,183,143],{"class":100},[76,185,118],{"class":139},[76,187,148],{"class":100},[76,189,192,194,196,199,202,204,206,208,211,213,215,217],{"class":78,"data-cue":190,"line":191},"4",7,[76,193,190],{"class":122},[76,195,156],{"class":100},[76,197,198],{"class":132},"measure",[76,200,201],{"class":100},"([",[76,203,164],{"class":139},[76,205,143],{"class":100},[76,207,118],{"class":139},[76,209,210],{"class":100},"], [",[76,212,164],{"class":139},[76,214,143],{"class":100},[76,216,118],{"class":139},[76,218,219],{"class":100},"])\n",[76,221,223,225],{"class":78,"line":222},8,[76,224,84],{"class":82,"aria-hidden":83},[76,226,115],{},[76,228,231,233,236,238,241,244,247,251,253,256],{"class":78,"data-cue":229,"line":230},"5",9,[76,232,229],{"class":122},[76,234,235],{"class":100},"job ",[76,237,129],{"class":128},[76,239,240],{"class":100}," backend.",[76,242,243],{"class":132},"run",[76,245,246],{"class":100},"(qc, ",[76,248,250],{"class":249},"s_ZVi","shots",[76,252,129],{"class":128},[76,254,255],{"class":139},"1000",[76,257,148],{"class":100},[76,259,262,264,267,269,272,275,278,281],{"class":78,"data-cue":260,"line":261},"6",10,[76,263,260],{"class":122},[76,265,266],{"class":100},"counts ",[76,268,129],{"class":128},[76,270,271],{"class":100}," job.",[76,273,274],{"class":132},"result",[76,276,277],{"class":100},"().",[76,279,280],{"class":132},"get_counts",[76,282,283],{"class":100},"()\n",[76,285,287,289,292],{"class":78,"line":286},11,[76,288,84],{"class":82,"aria-hidden":83},[76,290,291],{"class":128},"print",[76,293,294],{"class":100},"(counts)\n",[296,297,299,308,321,331,343,350],"ol",{"class":298},"qg-cues",[300,301,302,304],"li",{"data-cue":118},[76,303,118],{"class":122},[76,305,307],{"class":306},"qg-cues__text","A circuit is a list of operations to run in order. This one asks for two qubits and two ordinary bits: the qubits do the quantum work, and the bits are storage for the answers you read out at the end.",[300,309,310,312],{"data-cue":140},[76,311,140],{"class":122},[76,313,314,315,317,318,320],{"class":306},"A gate is one operation applied to a qubit. This is the Hadamard, applied to qubit 0, and it leaves that qubit in superposition: no fixed value, equally likely to read ",[73,316,164],{}," or ",[73,319,118],{}," once you measure it.",[300,322,323,325],{"data-cue":169},[76,324,169],{"class":122},[76,326,327,328,330],{"class":306},"The line that entangles. CNOT is a two-qubit gate: the first argument is the control, the second is the target, and it flips the target on every branch where the control reads ",[73,329,118],{},". Because qubit 0 has no fixed value yet, both branches survive, and the two qubits end up sharing one state.",[300,332,333,335],{"data-cue":190},[76,334,190],{"class":122},[76,336,337,338,317,340,342],{"class":306},"Measuring is the only way to see a qubit, and it forces each one to a definite ",[73,339,164],{},[73,341,118],{},". This copies qubit 0 into bit 0 and qubit 1 into bit 1.",[300,344,345,347],{"data-cue":229},[76,346,229],{"class":122},[76,348,349],{"class":306},"Send the circuit to a real quantum computer, or to a simulator. One run gives one pair of bits and which pair is random, so you run it 1,000 times to see the pattern. Each run is called a shot.",[300,351,352,354],{"data-cue":260},[76,353,260],{"class":122},[76,355,356,357,360,361,363,364,366],{"class":306},"Tally those 1,000 results. ",[73,358,359],{},"{'00': 502, '11': 498}"," means 502 runs gave both qubits ",[73,362,164],{},", and 498 gave both ",[73,365,118],{},".",[12,368,369,372,373,375,376,379,380,383,384,317,387,390],{},[73,370,371],{},"|00⟩"," means both qubits came out ",[73,374,164],{},". About half the shots come back ",[73,377,378],{},"00"," and half ",[73,381,382],{},"11",", never ",[73,385,386],{},"01",[73,388,389],{},"10",". Which one you get is random, but the two always agree. On real hardware a few mismatched shots appear: device noise, not the physics.",[12,392,393,394,396,397,399,400,317,402,404],{},"Those counts alone do not prove entanglement: two gloves give the same ",[73,395,378],{}," and ",[73,398,382],{},". The difference shows if you ask a different question. A basis is the question you put to a qubit, and \"are you ",[73,401,164],{},[73,403,118],{},"\" is only one of them.",[12,406,407,408,396,411,414],{},"Fork the Bell state, add ",[73,409,410],{},"qc.h(0)",[73,412,413],{},"qc.h(1)"," just before the measurement, and you are asking another. The pair still agrees every time; gloves measured this way agree only half the time.",[22,416,418],{"id":417},"the-gates-in-these-circuits","The gates in these circuits",[12,420,421],{},"Five gates cover every excerpt on this page, and two of them are the ones you just ran. The full projects reach for a few more, mostly other rotations.",[423,424,426,437],"gate",{"token":159,"name":425},"Hadamard",[12,427,428,429,431,432,317,434,436],{},"Takes a qubit sitting at ",[73,430,164],{}," and leaves it with no fixed value: measure it and you get ",[73,433,164],{},[73,435,118],{}," with equal probability.",[12,438,439,440,442],{},"The Hadamard is not a coin flip, though, and reversibility is what separates them. Apply a second Hadamard before measuring and the qubit reads ",[73,441,164],{}," every time, which no coin could do.",[423,444,446,458,464],{"token":177,"name":445},"CNOT",[12,447,448,449,451,452,454,455,457],{},"A two-qubit gate. The first qubit you pass is the control and the second is the target, and it flips the target whenever the control reads ",[73,450,118],{},". On plain ",[73,453,164],{},"s and ",[73,456,118],{},"s that is an if-statement drawn as a circuit.",[12,459,460,461,463],{},"The CNOT becomes the entangling gate when the control has no fixed value and the target does have one. That is the Bell state: a control in superposition over a target sitting at ",[73,462,164],{},", so both branches survive and the pair ends up sharing one state.",[12,465,466],{},"Entangling is not automatic, though. Give it a target already sitting in an even split of its own and the gate can leave the pair exactly as it found it. That is the situation the Market Game runs into below.",[423,468,470,478],{"token":469},"ry",[12,471,472,473,475,476,366],{},"A rotation. The angle comes before the qubit and sets how likely a qubit starting at ",[73,474,164],{}," is to read ",[73,477,118],{},[12,479,480,481,483,484,486,487,489],{},"At ",[73,482,164],{}," it is certain to read ",[73,485,164],{},", at π certain to read ",[73,488,118],{},", and at π\u002F2 it gives the same even split the Hadamard does. Anything in between is a bias you choose.",[423,491,493,501],{"token":492},"rzz",[12,494,495,496,317,498,500],{},"Couples two qubits by an angle. Unlike the others it does not change how often either qubit reads ",[73,497,164],{},[73,499,118],{}," on its own. The counts from a plain measurement look the same whether the coupling is there or not.",[12,502,503],{},"The coupling changes the relationship between the two instead, which is why Entangled Body's couplings entangle the state and still leave no trace in its results.",[423,505,506,514],{"token":198},[12,507,508,509,317,511,513],{},"Reads a qubit into an ordinary bit and forces it to a definite ",[73,510,164],{},[73,512,118],{},". It is the one irreversible step: whatever the qubit held before is gone once you look.",[12,515,516],{},"So a single run tells you one outcome and nothing about the odds behind it, which is why the circuits here that measure are run many times over.",[12,518,519],{},"The projects below each put an entangling operation to work in a different way: a game, a body, a garden, a grid of sound and a field of butterflies. Each one shows the line where the entangling happens, or where it would if you changed one thing, and all are open to fork.",[22,521,523],{"id":522},"two-choices-that-stop-being-independent","Two choices that stop being independent",[12,525,526],{},"Two traders each pick buy or sell, and the payouts pull against each other: selling while the other buys pays the most, but if both sell they both lose money.",[12,528,529],{},"Classically the two decide independently. Quantum Market Game puts each decision on a qubit and lets you entangle the pair before measuring, so the choices can come out correlated instead of independent.",[531,532],"blog-figure",{"alt":533,"caption":534,"no":71,"poster":535,"video":536},"Quantum Market Game running: two traders' buy and sell odds and the outcome table","Play both sides, then read who came out ahead. Press play, sound on.","\u002F_content\u002Fimages\u002Fquantum-market-game\u002Fhero.webp","https:\u002F\u002Fapi.cms.qollab.xyz\u002Fassets\u002F38e61a99-e51d-4be0-86bf-afe6af5bdd9a",[12,538,539,540,543,544,547],{},"Each trader is a qubit: ",[73,541,542],{},"|0⟩"," means sell, ",[73,545,546],{},"|1⟩"," means buy. A rotation sets the odds, so a trader can be mostly buy, mostly sell, or anywhere between.",[12,549,550],{},"Unless a trader is set all the way to certain, both sit in superposition until the market opens, and measuring the pair is the moment each decision becomes real.",[60,552,556],{"name":553,"run-href":554,"tag":555},"simulator.py","\u002Fu\u002Fq-aad\u002Fquantum-market-game-theory-sim","Python · excerpt",[66,557,559],{"className":68,"code":558,"language":70,"meta":71,"style":71},"qc = QuantumCircuit(2, 2)\nqc.ry(angle_1, 0)\nqc.ry(angle_2, 1)\nif entanglement:\n    qc.cx(0, 1)\nqc.measure([0, 1], [0, 1])\n",[73,560,561,581,596,611,621,640,666],{"__ignoreMap":71},[76,562,563,565,567,569,571,573,575,577,579],{"class":78,"line":79},[76,564,84],{"class":82,"aria-hidden":83},[76,566,125],{"class":100},[76,568,129],{"class":128},[76,570,133],{"class":132},[76,572,136],{"class":100},[76,574,140],{"class":139},[76,576,143],{"class":100},[76,578,140],{"class":139},[76,580,148],{"class":100},[76,582,583,585,587,589,592,594],{"class":78,"data-cue":118,"line":91},[76,584,118],{"class":122},[76,586,156],{"class":100},[76,588,469],{"class":132},[76,590,591],{"class":100},"(angle_1, ",[76,593,164],{"class":139},[76,595,148],{"class":100},[76,597,598,600,602,604,607,609],{"class":78,"line":110},[76,599,84],{"class":82,"aria-hidden":83},[76,601,156],{"class":100},[76,603,469],{"class":132},[76,605,606],{"class":100},"(angle_2, ",[76,608,118],{"class":139},[76,610,148],{"class":100},[76,612,613,615,618],{"class":78,"data-cue":140,"line":119},[76,614,140],{"class":122},[76,616,617],{"class":96},"if",[76,619,620],{"class":100}," entanglement:\n",[76,622,623,625,628,630,632,634,636,638],{"class":78,"data-cue":169,"line":151},[76,624,169],{"class":122},[76,626,627],{"class":100},"    qc.",[76,629,177],{"class":132},[76,631,136],{"class":100},[76,633,164],{"class":139},[76,635,143],{"class":100},[76,637,118],{"class":139},[76,639,148],{"class":100},[76,641,642,644,646,648,650,652,654,656,658,660,662,664],{"class":78,"line":170},[76,643,84],{"class":82,"aria-hidden":83},[76,645,156],{"class":100},[76,647,198],{"class":132},[76,649,201],{"class":100},[76,651,164],{"class":139},[76,653,143],{"class":100},[76,655,118],{"class":139},[76,657,210],{"class":100},[76,659,164],{"class":139},[76,661,143],{"class":100},[76,663,118],{"class":139},[76,665,219],{"class":100},[296,667,668,678,685],{"class":298},[300,669,670,672],{"data-cue":118},[76,671,118],{"class":122},[76,673,674,675,677],{"class":306},"The angle sets this trader's odds, and it comes before the qubit. At ",[73,676,164],{}," they are certain to sell, at π certain to buy, at π\u002F2 the even 50\u002F50 the Hadamard makes. In between it is not linear: the chance of buying is sin²(angle\u002F2).",[300,679,680,682],{"data-cue":140},[76,681,140],{"class":122},[76,683,684],{"class":306},"Every bit of correlation in the game hangs on one optional line. With the flag off the two qubits stay independent and the round is ordinary game theory played with random draws.",[300,686,687,689],{"data-cue":169},[76,688,169],{"class":122},[76,690,691,692,695],{"class":306},"The same CNOT as the Bell state, and at the shipped defaults it does essentially nothing: two qubits both at π\u002F2 are one of the inputs a CNOT leaves unchanged, and ",[73,693,694],{},"1.5707"," is π\u002F2 to four places.",[12,697,698],{},"The game shows one basis only, buy or sell, and a table of correlated outcomes can always be reproduced by classical shared randomness, so this is not a Bell test. What you can see is the payoff shifting when the correlation switches on.",[12,700,701,702,705,706,709,710,712,713,717,718,721],{},"Set ",[73,703,704],{},"angle_1"," to π\u002F2 and ",[73,707,708],{},"angle_2"," to ",[73,711,164],{},", which is where the ",[714,715,445],"a",{"href":716},"#the-gates-in-these-circuits"," does bite, then run with ",[73,719,720],{},"entanglement"," off and on. Same angles, different payoff table, and with it on the pair is a Bell state you could test in a second basis.",[723,724],"project-card",{"builder":725,"description":726,"framework":727,"owner":728,"title":729,"to":554,"thumb":730},"Aadarsh Venkat Ramanan","The project is a twist on a classical game theory scenario: Prisoner's Dilemma.","Python + Qiskit","q-aad","Quantum Market Game","\u002F_content\u002Fimages\u002Fquantum-market-game\u002Fscreenshot.webp",[22,732,734],{"id":733},"neither-half-has-a-state-of-its-own","Neither half has a state of its own",[12,736,737],{},"Put each qubit of a maximally entangled pair on its own Bloch sphere and the arrow that normally marks its state shrinks to the centre. A lone qubit points somewhere; each half of a Bell pair points nowhere.",[531,739],{"alt":740,"caption":741,"no":71,"src":742},"A single qubit has a Bloch vector reaching the sphere surface; after entangling, each qubit of the pair has only a dot at the centre","Bloch spheres of one qubit (left) and of each qubit of a Bell pair (right). The pair's arrows have zero length: there is no local direction left to draw.","\u002F_content\u002Fimages\u002Fentanglement\u002Ftwo-bloch-collapse.svg",[12,744,745],{},"A pure two-qubit state is a list of four numbers, easy to write down and hard to picture. Entanglement makes it harder, because the interesting part is exactly what you cannot see by looking at either qubit alone. You can know the pair completely and still know nothing about each half.",[12,747,748,749,751],{},"Onri Benally's visualiser draws the same pictures for two states, the plain ",[73,750,371],{}," product state and a Bell pair, so you can put them side by side.",[12,753,754],{},"The visualiser builds its Bell pair from the same two gates as the Bell state above, then adds a couple of single-qubit turns that leave the entanglement untouched.",[12,756,757],{},"Each state goes to a set of plotting functions. The excerpt is the opening of one of them, the steering-ellipsoid plot, which is where the three parts of the state get computed.",[60,759,762],{"name":760,"run-href":761,"tag":555},"plot_steering_ellipsoid()","\u002Fu\u002Fonri-jay-benally\u002F2-qubit-state-visualization",[66,763,765],{"className":68,"code":764,"language":70,"meta":71,"style":71},"    rho = state.data\n    # Calculate Bloch vectors and correlation tensor\n    a = np.array([np.trace(rho @ np.kron(s, np.eye(2))).real for s in pauli_matrices])\n    b = np.array([np.trace(rho @ np.kron(np.eye(2), s)).real for s in pauli_matrices])\n    T = np.array([[np.trace(rho @ np.kron(si, sj)).real for sj in pauli_matrices] for si in pauli_matrices])\n",[73,766,767,779,786,843,888,936],{"__ignoreMap":71},[76,768,769,771,774,776],{"class":78,"data-cue":118,"line":79},[76,770,118],{"class":122},[76,772,773],{"class":100},"    rho ",[76,775,129],{"class":128},[76,777,778],{"class":100}," state.data\n",[76,780,781,783],{"class":78,"line":91},[76,782,84],{"class":82,"aria-hidden":83},[76,784,785],{"class":87},"    # Calculate Bloch vectors and correlation tensor\n",[76,787,788,790,793,795,798,801,804,807,810,813,815,818,821,824,826,828,831,834,837,840],{"class":78,"data-cue":140,"line":110},[76,789,140],{"class":122},[76,791,792],{"class":100},"    a ",[76,794,129],{"class":128},[76,796,797],{"class":100}," np.",[76,799,800],{"class":132},"array",[76,802,803],{"class":100},"([np.",[76,805,806],{"class":132},"trace",[76,808,809],{"class":100},"(rho ",[76,811,812],{"class":128},"@",[76,814,797],{"class":100},[76,816,817],{"class":132},"kron",[76,819,820],{"class":100},"(s, np.",[76,822,823],{"class":132},"eye",[76,825,136],{"class":100},[76,827,140],{"class":139},[76,829,830],{"class":100},"))).real ",[76,832,833],{"class":96},"for",[76,835,836],{"class":100}," s ",[76,838,839],{"class":96},"in",[76,841,842],{"class":100}," pauli_matrices])\n",[76,844,845,847,850,852,854,856,858,860,862,864,866,868,871,873,875,877,880,882,884,886],{"class":78,"data-cue":169,"line":119},[76,846,169],{"class":122},[76,848,849],{"class":100},"    b ",[76,851,129],{"class":128},[76,853,797],{"class":100},[76,855,800],{"class":132},[76,857,803],{"class":100},[76,859,806],{"class":132},[76,861,809],{"class":100},[76,863,812],{"class":128},[76,865,797],{"class":100},[76,867,817],{"class":132},[76,869,870],{"class":100},"(np.",[76,872,823],{"class":132},[76,874,136],{"class":100},[76,876,140],{"class":139},[76,878,879],{"class":100},"), s)).real ",[76,881,833],{"class":96},[76,883,836],{"class":100},[76,885,839],{"class":96},[76,887,842],{"class":100},[76,889,890,892,895,897,899,901,904,906,908,910,912,914,917,919,922,924,927,929,932,934],{"class":78,"data-cue":190,"line":151},[76,891,190],{"class":122},[76,893,894],{"class":100},"    T ",[76,896,129],{"class":128},[76,898,797],{"class":100},[76,900,800],{"class":132},[76,902,903],{"class":100},"([[np.",[76,905,806],{"class":132},[76,907,809],{"class":100},[76,909,812],{"class":128},[76,911,797],{"class":100},[76,913,817],{"class":132},[76,915,916],{"class":100},"(si, sj)).real ",[76,918,833],{"class":96},[76,920,921],{"class":100}," sj ",[76,923,839],{"class":96},[76,925,926],{"class":100}," pauli_matrices] ",[76,928,833],{"class":96},[76,930,931],{"class":100}," si ",[76,933,839],{"class":96},[76,935,842],{"class":100},[296,937,938,949,966,973],{"class":298},[300,939,940,942],{"data-cue":118},[76,941,118],{"class":122},[76,943,944,945,948],{"class":306},"The density matrix: a 4 by 4 grid of numbers holding everything there is to know about the two qubits together. ",[73,946,947],{},"state"," is whichever of the two states the visualiser was handed.",[300,950,951,953],{"data-cue":140},[76,952,140],{"class":122},[76,954,955,956,959,960,963,964,366],{"class":306},"Qubit A on its own. ",[73,957,958],{},"np.kron"," pastes two small matrices into one that acts on A and leaves B alone, and the trace against ",[73,961,962],{},"rho"," turns that into a single number. Three axes, three numbers, and for a Bell pair all three are ",[73,965,164],{},[300,967,968,970],{"data-cue":169},[76,969,169],{"class":122},[76,971,972],{"class":306},"The same three numbers for qubit B, and also all zeros. Neither qubit points anywhere by itself.",[300,974,975,977],{"data-cue":190},[76,976,190],{"class":122},[76,978,979,980,982,983,985,986,396,988,991,992,995,996,998,999,366],{"class":306},"Now both qubits at once: nine numbers, one for each pair of axes. On their own they do not prove anything, since a plain ",[73,981,371],{}," has a ",[73,984,118],{}," in there too. What matters is that for the Bell pair they survive while ",[73,987,714],{},[73,989,990],{},"b"," go to zero, so ",[73,993,994],{},"T"," can no longer be ",[73,997,714],{}," times ",[73,1000,990],{},[12,1002,1003,1004,1006,1007,1009,1010,1012],{},"Fork it and print all three for ",[73,1005,371],{},", then for the Bell pair. Both have entries in ",[73,1008,994],{},", so a filled-in ",[73,1011,994],{}," proves nothing by itself.",[12,1014,1015,1016,1018,1019,1021,1022,998,1024,1026,1027,396,1029,1031,1032,1034],{},"The difference is what ",[73,1017,994],{}," is made of. For ",[73,1020,371],{}," it is exactly ",[73,1023,714],{},[73,1025,990],{},", the correlations two qubits that each point somewhere would give you anyway. For the Bell pair ",[73,1028,714],{},[73,1030,990],{}," are zero and ",[73,1033,994],{}," is not, so no pair of individual directions can account for it.",[723,1036],{"builder":1037,"description":1038,"framework":727,"owner":1039,"title":1040,"to":761},"Onri Jay Benally","One entangled state, eight ways to see it.","onri-jay-benally","2-qubit states, visualized 8 ways",[22,1042,1044],{"id":1043},"entangled-and-invisible-in-the-counts","Entangled, and invisible in the counts",[12,1046,1047],{},"Entangled Body is a 3D human figure whose regions are qubits, linked by entangling gates that follow the body's own map: strong between head and chest, absent between distant limbs.",[531,1049],{"alt":1050,"caption":1051,"no":71,"poster":1052,"video":1053},"Entangled Body: a point-cloud figure whose regions react to each other across distance","Touch one region and the figure responds around it. Press play.","\u002F_content\u002Fimages\u002Fentangled-body\u002Fhero.webp","https:\u002F\u002Fapi.cms.qollab.xyz\u002Fassets\u002F960a7fe3-a278-4e61-8478-cc142d11f9a9",[12,1055,1056,1057,1060],{},"Fourteen regions map to fourteen qubits. A touch sets each region's rotation by its distance from the touched one. The anatomical links nearest that region then get an ",[714,1058,1059],{"href":716},"Rzz"," coupling, eight of them on a hover and all seventeen on a click.",[12,1062,1063],{},"The ripple you see when you touch a region comes from those rotations: nearer regions are more likely to light up. The Rzz couplings entangle the state, but the circuit measures straight in the Z basis, and Rzz only changes phases, so the couplings leave no trace in the counts.",[60,1065,1068],{"name":1066,"run-href":1067,"tag":555},"entangled_body_demo.py","\u002Fu\u002Flukeshim\u002Fentangled-body",[66,1069,1071],{"className":68,"code":1070,"language":70,"meta":71,"style":71},"for src, tgt, strength in _ranked_links(distances, interaction):\n    s = max(0.05, min(1.0, strength))\n    ops.append((\"rzz\", QUBIT_OF[src], QUBIT_OF[tgt], _edge_angle(s, interaction)))\n",[73,1072,1073,1090,1120,1156],{"__ignoreMap":71},[76,1074,1075,1077,1079,1082,1084,1087],{"class":78,"data-cue":118,"line":79},[76,1076,118],{"class":122},[76,1078,833],{"class":96},[76,1080,1081],{"class":100}," src, tgt, strength ",[76,1083,839],{"class":96},[76,1085,1086],{"class":132}," _ranked_links",[76,1088,1089],{"class":100},"(distances, interaction):\n",[76,1091,1092,1094,1097,1099,1102,1104,1107,1109,1112,1114,1117],{"class":78,"data-cue":140,"line":91},[76,1093,140],{"class":122},[76,1095,1096],{"class":100},"    s ",[76,1098,129],{"class":128},[76,1100,1101],{"class":128}," max",[76,1103,136],{"class":100},[76,1105,1106],{"class":139},"0.05",[76,1108,143],{"class":100},[76,1110,1111],{"class":128},"min",[76,1113,136],{"class":100},[76,1115,1116],{"class":139},"1.0",[76,1118,1119],{"class":100},", strength))\n",[76,1121,1122,1124,1127,1130,1133,1137,1139,1142,1145,1147,1150,1153],{"class":78,"data-cue":169,"line":110},[76,1123,169],{"class":122},[76,1125,1126],{"class":100},"    ops.",[76,1128,1129],{"class":132},"append",[76,1131,1132],{"class":100},"((",[76,1134,1136],{"class":1135},"subq3","\"rzz\"",[76,1138,143],{"class":100},[76,1140,1141],{"class":139},"QUBIT_OF",[76,1143,1144],{"class":100},"[src], ",[76,1146,1141],{"class":139},[76,1148,1149],{"class":100},"[tgt], ",[76,1151,1152],{"class":132},"_edge_angle",[76,1154,1155],{"class":100},"(s, interaction)))\n",[296,1157,1158,1165,1172],{"class":298},[300,1159,1160,1162],{"data-cue":118},[76,1161,118],{"class":122},[76,1163,1164],{"class":306},"Walk the seventeen anatomical links the piece defines, ordered by how close each one sits to the region you touched. A hover takes only the nearest eight; a click or a hold takes all seventeen.",[300,1166,1167,1169],{"data-cue":140},[76,1168,140],{"class":122},[76,1170,1171],{"class":306},"Hold that strength inside 0.05 to 1 before it becomes an angle, so the faintest link still couples a little and the strongest is capped.",[300,1173,1174,1176],{"data-cue":169},[76,1175,169],{"class":122},[76,1177,1178,1179,1181,1182,1184],{"class":306},"The entangling line. ",[73,1180,1152],{}," turns the link strength into the Rzz angle, and ",[73,1183,1141],{}," looks up which qubit a body region is. The circuit is collected as a list of operations rather than built by calling gate methods.",[12,1186,1187],{},"To make the couplings visible, fork it and add a Hadamard on every region before the measurement. The couplings then reach the counts instead of hiding in the phases.",[12,1189,1190],{},"Look for it on the linked pairs a touch actually selected. The region you touched is prepared close to certain, and a network of edges does not respond one edge at a time. It will not light up everywhere at once.",[723,1192],{"builder":1193,"description":1194,"framework":727,"owner":1195,"title":1196,"to":1067,"thumb":1197},"Chanhyuk Park & Luke Shim","Entangled Body is an interactive 3D artwork that treats the body as a network of 14 quantum nodes, each mapped to a specific body region.","lukeshim","Entangled Body","\u002F_content\u002Fimages\u002Fentangled-body\u002Fscreenshot.webp",[22,1199,1201],{"id":1200},"one-draw-instead-of-five-separate-rolls","One draw instead of five separate rolls",[12,1203,1204],{},"Quantum Garden grows its plants from real quantum measurements. The circuit below is the one its rarest plants use, and it entangles five qubits so a plant's traits come out correlated rather than as five independent rolls.",[12,1206,1207],{},"The garden also mirrors traits between plants in the same entanglement group, wherever they stand. That link is bookkeeping rather than physics: the groups are stored alongside the results, and no gate in this circuit reaches another plant.",[531,1209],{"alt":1210,"caption":1211,"no":71,"src":1212},"Quantum Garden, a generative garden whose plants come from real quantum hardware","Every plant is grown from a real quantum measurement.","\u002F_content\u002Fimages\u002Fquantum-garden\u002Fscreenshot.webp",[12,1214,1215,1216,1218],{},"The circuit has six layers. A ",[714,1217,425],{"href":716}," on every qubit opens all thirty-two outcomes, seed-based rotations bias each qubit toward the plant's own tendencies, and a chain of CNOTs ties neighbours together.",[12,1220,1221],{},"Phase rotations add interference, a second set of CNOTs couples qubits across the chain, and a last round of rotations sets the final state before measurement. Five measured bits come out, and every trait the plant shows is read off them.",[12,1223,1224],{},"None of that runs while you watch. The circuit went to IonQ ahead of time and its results sit in a pool of 500. Hovering a plant assigns it one and fixes its traits from then on, group and all.",[60,1226,1229],{"name":1227,"run-href":1228,"tag":555},"plant_circuit.py","\u002Fu\u002FAmberPincar\u002Fquantum-garden",[66,1230,1232],{"className":68,"code":1231,"language":70,"meta":71,"style":71},"# Layer 3: Linear entanglement chain — correlates neighboring qubits\nfor i in range(4):\n    circuit.cx(i, i + 1)\n\n# Layer 4: Seed-based Rz phases — creates interference patterns\n# ...\n\n# Layer 5: Cross-entanglement — non-local correlations across the circuit\ncircuit.cx(0, 2)\ncircuit.cx(1, 3)\ncircuit.cx(2, 4)\n",[73,1233,1234,1241,1262,1282,1288,1295,1302,1308,1315,1334,1352,1370],{"__ignoreMap":71},[76,1235,1236,1238],{"class":78,"line":79},[76,1237,84],{"class":82,"aria-hidden":83},[76,1239,1240],{"class":87},"# Layer 3: Linear entanglement chain — correlates neighboring qubits\n",[76,1242,1243,1245,1247,1250,1252,1255,1257,1259],{"class":78,"line":91},[76,1244,84],{"class":82,"aria-hidden":83},[76,1246,833],{"class":96},[76,1248,1249],{"class":100}," i ",[76,1251,839],{"class":96},[76,1253,1254],{"class":128}," range",[76,1256,136],{"class":100},[76,1258,190],{"class":139},[76,1260,1261],{"class":100},"):\n",[76,1263,1264,1266,1269,1271,1274,1277,1280],{"class":78,"data-cue":118,"line":110},[76,1265,118],{"class":122},[76,1267,1268],{"class":100},"    circuit.",[76,1270,177],{"class":132},[76,1272,1273],{"class":100},"(i, i ",[76,1275,1276],{"class":128},"+",[76,1278,1279],{"class":139}," 1",[76,1281,148],{"class":100},[76,1283,1284,1286],{"class":78,"line":119},[76,1285,84],{"class":82,"aria-hidden":83},[76,1287,115],{},[76,1289,1290,1292],{"class":78,"line":151},[76,1291,84],{"class":82,"aria-hidden":83},[76,1293,1294],{"class":87},"# Layer 4: Seed-based Rz phases — creates interference patterns\n",[76,1296,1297,1299],{"class":78,"line":170},[76,1298,84],{"class":82,"aria-hidden":83},[76,1300,1301],{"class":87},"# ...\n",[76,1303,1304,1306],{"class":78,"line":191},[76,1305,84],{"class":82,"aria-hidden":83},[76,1307,115],{},[76,1309,1310,1312],{"class":78,"line":222},[76,1311,84],{"class":82,"aria-hidden":83},[76,1313,1314],{"class":87},"# Layer 5: Cross-entanglement — non-local correlations across the circuit\n",[76,1316,1317,1319,1322,1324,1326,1328,1330,1332],{"class":78,"line":230},[76,1318,84],{"class":82,"aria-hidden":83},[76,1320,1321],{"class":100},"circuit.",[76,1323,177],{"class":132},[76,1325,136],{"class":100},[76,1327,164],{"class":139},[76,1329,143],{"class":100},[76,1331,140],{"class":139},[76,1333,148],{"class":100},[76,1335,1336,1338,1340,1342,1344,1346,1348,1350],{"class":78,"line":261},[76,1337,84],{"class":82,"aria-hidden":83},[76,1339,1321],{"class":100},[76,1341,177],{"class":132},[76,1343,136],{"class":100},[76,1345,118],{"class":139},[76,1347,143],{"class":100},[76,1349,169],{"class":139},[76,1351,148],{"class":100},[76,1353,1354,1356,1358,1360,1362,1364,1366,1368],{"class":78,"data-cue":140,"line":286},[76,1355,140],{"class":122},[76,1357,1321],{"class":100},[76,1359,177],{"class":132},[76,1361,136],{"class":100},[76,1363,140],{"class":139},[76,1365,143],{"class":100},[76,1367,190],{"class":139},[76,1369,148],{"class":100},[296,1371,1372,1379],{"class":298},[300,1373,1374,1376],{"data-cue":118},[76,1375,118],{"class":122},[76,1377,1378],{"class":306},"Four CNOTs in a row: 0 to 1, 1 to 2, 2 to 3, 3 to 4. Each ties a qubit to its neighbour, so the five bits stop being five independent coin flips.",[300,1380,1381,1383],{"data-cue":140},[76,1382,140],{"class":122},[76,1384,1385],{"class":306},"Three more that skip a neighbour. The chain already carried correlation past adjacent pairs, so these add direct long-range couplings rather than creating the first ones.",[12,1387,1388],{},"Fork the plant circuit and delete the three cross-chain CNOTs. The neighbour chain still entangles the qubits, but the output distribution changes. Run the same seed both ways and compare which pairs of bits still move together, or compute each pair's mutual information to put a number on it.",[723,1390],{"builder":1391,"description":1392,"framework":727,"owner":1393,"title":1394,"to":1228,"thumb":1212},"Amber Wang & Justin Pincar","Quantum Garden is an interactive generative art installation where digital plants exist in quantum superposition until observed.","AmberPincar","Quantum Garden",[22,1396,1398],{"id":1397},"entanglement-that-does-not-stay-in-its-cell","Entanglement that does not stay in its cell",[12,1400,1401],{},"Quantum Patterns runs a grid of cells and updates every one with the same small circuit. The cells overlap from step to step, so whatever that circuit does to its two qubits does not stay in one cell. Entangle them and the correlation walks across the grid.",[531,1403],{"alt":1404,"caption":1405,"no":71,"poster":1406,"video":1407},"The Satori live-coding environment: a quantum cellular automaton beside its musical script","A cell circuit applied across the grid, and the grid driving the music. Press play.","\u002F_content\u002Fimages\u002Fquantum-patterns\u002Fhero.webp","https:\u002F\u002Fapi.cms.qollab.xyz\u002Fassets\u002Fef35c47f-a7cc-4dae-9613-64db0498c750",[12,1409,1410],{},"The rule is a partitioned quantum cellular automaton. The grid is cut into two-qubit cells. Two tessellations, offset by one qubit, alternate each step, so a cell's right qubit is the next cell's left qubit a step later.",[12,1412,1413,1414,1416],{},"The quickstart's cell circuit is a single ",[714,1415,445],{"href":716}," on a grid that starts with one excitation at the left edge. On its own that is a classical, reversible rule: it moves bits around and creates neither superposition nor entanglement. Treat it as the baseline.",[12,1418,1419],{},"Entanglement enters when the cell puts its control qubit into superposition before the CNOT. Superposition alone is not enough: a Hadamard on the target leaves the two qubits as independent as it found them.",[60,1421,1424],{"name":1422,"run-href":1423,"tag":555},"pqca_quickstart.py","\u002Fu\u002Fcephasteom\u002Fquantum-patterns",[66,1425,1427],{"className":68,"code":1426,"language":70,"meta":71,"style":71},"# The circuit applied to every cell. Here: a single CX on 2 qubits.\ncell = qiskit.QuantumCircuit(CELL_SIZE)\ncell.cx(0, 1)\n# Two offset tessellations make the update couple across cell borders.\ntes = pqca.tessellation.one_dimensional(NUM_QUBITS, CELL_SIZE)\n",[73,1428,1429,1436,1458,1477,1484,1510],{"__ignoreMap":71},[76,1430,1431,1433],{"class":78,"line":79},[76,1432,84],{"class":82,"aria-hidden":83},[76,1434,1435],{"class":87},"# The circuit applied to every cell. Here: a single CX on 2 qubits.\n",[76,1437,1438,1440,1443,1445,1448,1451,1453,1456],{"class":78,"data-cue":118,"line":91},[76,1439,118],{"class":122},[76,1441,1442],{"class":100},"cell ",[76,1444,129],{"class":128},[76,1446,1447],{"class":100}," qiskit.",[76,1449,1450],{"class":132},"QuantumCircuit",[76,1452,136],{"class":100},[76,1454,1455],{"class":139},"CELL_SIZE",[76,1457,148],{"class":100},[76,1459,1460,1462,1465,1467,1469,1471,1473,1475],{"class":78,"data-cue":140,"line":110},[76,1461,140],{"class":122},[76,1463,1464],{"class":100},"cell.",[76,1466,177],{"class":132},[76,1468,136],{"class":100},[76,1470,164],{"class":139},[76,1472,143],{"class":100},[76,1474,118],{"class":139},[76,1476,148],{"class":100},[76,1478,1479,1481],{"class":78,"line":119},[76,1480,84],{"class":82,"aria-hidden":83},[76,1482,1483],{"class":87},"# Two offset tessellations make the update couple across cell borders.\n",[76,1485,1486,1488,1491,1493,1496,1499,1501,1504,1506,1508],{"class":78,"data-cue":169,"line":151},[76,1487,169],{"class":122},[76,1489,1490],{"class":100},"tes ",[76,1492,129],{"class":128},[76,1494,1495],{"class":100}," pqca.tessellation.",[76,1497,1498],{"class":132},"one_dimensional",[76,1500,136],{"class":100},[76,1502,1503],{"class":139},"NUM_QUBITS",[76,1505,143],{"class":100},[76,1507,1455],{"class":139},[76,1509,148],{"class":100},[296,1511,1512,1519,1531],{"class":298},[300,1513,1514,1516],{"data-cue":118},[76,1515,118],{"class":122},[76,1517,1518],{"class":306},"The rule: one small circuit, applied to every cell of the grid on every step.",[300,1520,1521,1523],{"data-cue":140},[76,1522,140],{"class":122},[76,1524,1525,1526,454,1528,1530],{"class":306},"A single CNOT. On plain ",[73,1527,164],{},[73,1529,118],{},"s that only shuffles bits around, which makes this the classical baseline: no superposition, no entanglement. Put a Hadamard in front of it and the same rule starts spreading entanglement instead.",[300,1532,1533,1535],{"data-cue":169},[76,1534,169],{"class":122},[76,1536,1537],{"class":306},"How the grid gets cut into cells. Two cuts offset by one qubit take turns, so a cell's right qubit is the next cell's left qubit on the following step, and whatever the rule does travels along the grid.",[12,1539,1540,1541,1544,1545,1548,1549,1552],{},"Fork it and put ",[73,1542,1543],{},"cell.h(0)"," in front of ",[73,1546,1547],{},"cell.cx(0, 1)",". One gate is enough to make the rule quantum: each step now creates superposition and the CNOT entangles it across the cell border. Raise ",[73,1550,1551],{},"STEPS"," and watch how far the correlation has travelled by the end.",[723,1554],{"builder":1555,"description":1556,"framework":727,"owner":1557,"title":1558,"to":1423,"thumb":1559},"Peter Thomas & Paulo Itaboraí","Quantum Patterns explores Partitioned Quantum Cellular Automata (PQCA) as the basis for live-coded musical composition.","cephasteom","Quantum Patterns","\u002F_content\u002Fimages\u002Fquantum-patterns\u002Fscreenshot.webp",[22,1561,1563],{"id":1562},"information-that-no-longer-lives-in-one-qubit","Information that no longer lives in one qubit",[12,1565,1566],{},"Quantum Butterfly Field scrambles five qubits together with random entangling gates until the state is spread across all of them, then damages one qubit. Running the scramble backwards recovers much of what that qubit held.",[531,1568],{"alt":1569,"caption":1570,"no":71,"poster":1571,"video":1572},"Quantum Butterfly Field: five butterflies as five qubits in one entangled field","Five qubits scramble into one field; a damaged one is repaired from the rest. Press play.","\u002F_content\u002Fimages\u002Fquantum-butterfly-field\u002Fhero.webp","https:\u002F\u002Fapi.cms.qollab.xyz\u002Fassets\u002F3768811c-0ddc-4ad3-b2cd-416c8cebee9c",[12,1574,1575],{},"Five butterflies are five qubits. Each layer rotates every qubit by a random angle and then entangles two random pairs, and three layers are enough to dissolve the butterflies' separate identities into one field. Then one butterfly is damaged: an extra qubit is coupled into it, which severs its correlations with the rest.",[12,1577,1578],{},"In a classical chaotic system that damage would be permanent: small damage cascades, the butterfly effect. Once information is scrambled deeply enough across an entangled system, it no longer lives in any single qubit but in the correlations between them.",[12,1580,1581],{},"So running the scramble backwards can pull much of the damaged qubit back out of the field it was spread into.",[12,1583,1584],{},"Partly, not perfectly: on an exact simulation the repaired qubit matches what it started as about 83% of the time. Yan and Sinitsyn showed this in 2020, in a paper on recovering damaged information, and it is known as the quantum anti-butterfly effect.",[12,1586,1587],{},"Xinyi Zhang pairs the physics with lōkahi, the Native Hawaiian idea of wholeness through relationship.",[12,1589,1590],{},"What the project reports is worth reading closely. The score is built from the length of the repaired qubit's Bloch vector, so it measures how sharply defined that qubit ended up.",[12,1592,1593],{},"The score does not measure whether the qubit came back as the state it started in, and a confidently wrong answer scores as well as a right one.",[60,1595,1598],{"name":1596,"run-href":1597,"tag":555},"qbf_protocol.py","\u002Fu\u002Fxinyi\u002Fquantum-butterfly-field",[66,1599,1601],{"className":68,"code":1600,"language":70,"meta":71,"style":71},"# Random disjoint CX pairs: shuffle all qubits, pair them up.\nqubits = list(range(n_qubits))\nrng.shuffle(qubits)\nfor i in range(0, n_qubits - 1, 2):\n    layer.append(('cx', int(qubits[i]), int(qubits[i + 1])))\n",[73,1602,1603,1610,1630,1643,1673,1707],{"__ignoreMap":71},[76,1604,1605,1607],{"class":78,"line":79},[76,1606,84],{"class":82,"aria-hidden":83},[76,1608,1609],{"class":87},"# Random disjoint CX pairs: shuffle all qubits, pair them up.\n",[76,1611,1612,1614,1617,1619,1622,1624,1627],{"class":78,"line":91},[76,1613,84],{"class":82,"aria-hidden":83},[76,1615,1616],{"class":100},"qubits ",[76,1618,129],{"class":128},[76,1620,1621],{"class":128}," list",[76,1623,136],{"class":100},[76,1625,1626],{"class":128},"range",[76,1628,1629],{"class":100},"(n_qubits))\n",[76,1631,1632,1634,1637,1640],{"class":78,"data-cue":118,"line":110},[76,1633,118],{"class":122},[76,1635,1636],{"class":100},"rng.",[76,1638,1639],{"class":132},"shuffle",[76,1641,1642],{"class":100},"(qubits)\n",[76,1644,1645,1647,1649,1651,1653,1655,1657,1659,1662,1665,1667,1669,1671],{"class":78,"data-cue":140,"line":119},[76,1646,140],{"class":122},[76,1648,833],{"class":96},[76,1650,1249],{"class":100},[76,1652,839],{"class":96},[76,1654,1254],{"class":128},[76,1656,136],{"class":100},[76,1658,164],{"class":139},[76,1660,1661],{"class":100},", n_qubits ",[76,1663,1664],{"class":128},"-",[76,1666,1279],{"class":139},[76,1668,143],{"class":100},[76,1670,140],{"class":139},[76,1672,1261],{"class":100},[76,1674,1675,1677,1680,1682,1684,1687,1689,1692,1695,1697,1700,1702,1704],{"class":78,"data-cue":169,"line":151},[76,1676,169],{"class":122},[76,1678,1679],{"class":100},"    layer.",[76,1681,1129],{"class":132},[76,1683,1132],{"class":100},[76,1685,1686],{"class":1135},"'cx'",[76,1688,143],{"class":100},[76,1690,1691],{"class":128},"int",[76,1693,1694],{"class":100},"(qubits[i]), ",[76,1696,1691],{"class":128},[76,1698,1699],{"class":100},"(qubits[i ",[76,1701,1276],{"class":128},[76,1703,1279],{"class":139},[76,1705,1706],{"class":100},"])))\n",[296,1708,1709,1716,1723],{"class":298},[300,1710,1711,1713],{"data-cue":118},[76,1712,118],{"class":122},[76,1714,1715],{"class":306},"Shuffle the five qubits into a random order, so each layer draws its own pairing rather than reusing one.",[300,1717,1718,1720],{"data-cue":140},[76,1719,140],{"class":122},[76,1721,1722],{"class":306},"Step through them two at a time. Five qubits gives two pairs, with one left out of this layer.",[300,1724,1725,1727],{"data-cue":169},[76,1726,169],{"class":122},[76,1728,1729],{"class":306},"One CNOT per pair. Stack the three layers the project ships and no qubit is left holding a state of its own: what the field knows has moved into the correlations between them.",[12,1731,1732],{},"Fork it and set the layer count to one, then two, then three.",[12,1734,1735],{},"The score does not climb steadily: on an exact simulation it lands near 0.79, 0.67 and 0.79. To ask the sharper question, compare the repaired qubit against the state it was prepared in rather than against its own sharpness.",[723,1737],{"builder":1738,"description":1739,"framework":727,"owner":1740,"title":1741,"to":1597,"thumb":1742},"Xinyi Zhang","Quantum Butterfly Field is an interactive artwork bridging quantum computing concepts with indigenous epistemologies to explore repair and resilience in an interconnected world.","xinyi","Quantum Butterfly Field","\u002F_content\u002Fimages\u002Fquantum-butterfly-field\u002Fscreenshot.webp",[22,1744,1746],{"id":1745},"more-than-two-qubits","More than two qubits",[12,1748,1749,1750,1752,1753,1755],{},"Two qubits is the smallest case. With more, they can all share one state, a GHZ state, where every qubit comes out ",[73,1751,164],{}," together or ",[73,1754,118],{}," together:",[60,1757,1760],{"name":1758,"run-href":1759,"tag":64},"ghz_state.py","\u002Fu\u002Fqollab\u002Fscaled-entanglement",[66,1761,1763],{"className":68,"code":1762,"language":70,"meta":71,"style":71},"from qiskit import QuantumCircuit\n\nn = 5\nqc = QuantumCircuit(n, n)\nqc.h(0)\nfor i in range(n - 1):\n    qc.cx(i, i + 1)\nqc.measure(range(n), range(n))\n# All five qubits now share one state: you only ever see |00000⟩ or |11111⟩.\n",[73,1764,1765,1777,1783,1795,1808,1822,1843,1859,1879,1886],{"__ignoreMap":71},[76,1766,1767,1769,1771,1773,1775],{"class":78,"line":79},[76,1768,84],{"class":82,"aria-hidden":83},[76,1770,97],{"class":96},[76,1772,101],{"class":100},[76,1774,104],{"class":96},[76,1776,107],{"class":100},[76,1778,1779,1781],{"class":78,"line":91},[76,1780,84],{"class":82,"aria-hidden":83},[76,1782,115],{},[76,1784,1785,1787,1790,1792],{"class":78,"line":110},[76,1786,84],{"class":82,"aria-hidden":83},[76,1788,1789],{"class":100},"n ",[76,1791,129],{"class":128},[76,1793,1794],{"class":139}," 5\n",[76,1796,1797,1799,1801,1803,1805],{"class":78,"data-cue":118,"line":119},[76,1798,118],{"class":122},[76,1800,125],{"class":100},[76,1802,129],{"class":128},[76,1804,133],{"class":132},[76,1806,1807],{"class":100},"(n, n)\n",[76,1809,1810,1812,1814,1816,1818,1820],{"class":78,"data-cue":140,"line":151},[76,1811,140],{"class":122},[76,1813,156],{"class":100},[76,1815,159],{"class":132},[76,1817,136],{"class":100},[76,1819,164],{"class":139},[76,1821,148],{"class":100},[76,1823,1824,1826,1828,1830,1832,1834,1837,1839,1841],{"class":78,"line":170},[76,1825,84],{"class":82,"aria-hidden":83},[76,1827,833],{"class":96},[76,1829,1249],{"class":100},[76,1831,839],{"class":96},[76,1833,1254],{"class":128},[76,1835,1836],{"class":100},"(n ",[76,1838,1664],{"class":128},[76,1840,1279],{"class":139},[76,1842,1261],{"class":100},[76,1844,1845,1847,1849,1851,1853,1855,1857],{"class":78,"data-cue":169,"line":191},[76,1846,169],{"class":122},[76,1848,627],{"class":100},[76,1850,177],{"class":132},[76,1852,1273],{"class":100},[76,1854,1276],{"class":128},[76,1856,1279],{"class":139},[76,1858,148],{"class":100},[76,1860,1861,1863,1865,1867,1869,1871,1874,1876],{"class":78,"data-cue":190,"line":222},[76,1862,190],{"class":122},[76,1864,156],{"class":100},[76,1866,198],{"class":132},[76,1868,136],{"class":100},[76,1870,1626],{"class":128},[76,1872,1873],{"class":100},"(n), ",[76,1875,1626],{"class":128},[76,1877,1878],{"class":100},"(n))\n",[76,1880,1881,1883],{"class":78,"line":230},[76,1882,84],{"class":82,"aria-hidden":83},[76,1884,1885],{"class":87},"# All five qubits now share one state: you only ever see |00000⟩ or |11111⟩.\n",[296,1887,1888,1895,1902,1909],{"class":298},[300,1889,1890,1892],{"data-cue":118},[76,1891,118],{"class":122},[76,1893,1894],{"class":306},"Five qubits this time, and five ordinary bits to read them into.",[300,1896,1897,1899],{"data-cue":140},[76,1898,140],{"class":122},[76,1900,1901],{"class":306},"Put the first qubit into superposition, exactly as in the Bell state.",[300,1903,1904,1906],{"data-cue":169},[76,1905,169],{"class":122},[76,1907,1908],{"class":306},"Then pass it along the line: 0 entangles 1, 1 entangles 2, and so on to the end.",[300,1910,1911,1913],{"data-cue":190},[76,1912,190],{"class":122},[76,1914,1915,1916,1919],{"class":306},"Measure all five at once. ",[73,1917,1918],{},"range(n)"," is just qubits 0 to 4, read into bits 0 to 4.",[12,1921,1922],{},"A GHZ state is all-or-nothing: measure any one qubit and the other four are decided with it, and lose one and the rest fall out of the shared state. That fragility is why it is a standard test of a quantum computer, and its correlations are what error correction and precision sensing build on.",[12,1924,1925],{},"Counts show the outcomes, and for a GHZ state they could not be simpler.",[12,1927,1928],{},"You can dig pair correlations out of them by hand, but only in the basis you measured, and reading a whole circuit that way is work. QCFlows draws it directly, as a graph: run a GHZ state through it and every qubit links to every other.",[531,1930],{"alt":1931,"caption":1932,"no":71,"src":1933,"url":1934},"The QCFlows dashboard rendering a circuit as a graph of correlations between qubits","QCFlows draws a circuit's correlations as a live graph. Open the live app.","\u002F_content\u002Fimages\u002Fqcflows\u002Fhero.webp","https:\u002F\u002Fapp.qcflows.net\u002F",[22,1936,1938],{"id":1937},"what-survives-on-real-hardware","What survives on real hardware",[12,1940,1941],{},"Every listing above runs in two very different places, and for entanglement the difference is most of the story.",[12,1943,1944,1945,1949],{},"A simulator holds the state as numbers. Ask it for a Bell pair and it hands back the amplitudes, entanglement and all, with nothing left to infer. That is how the ",[714,1946,1948],{"href":1947},"#neither-half-has-a-state-of-its-own","2-qubit visualiser"," draws what it draws, and it is reading a state, which no quantum computer will ever let you do.",[12,1951,1952],{},"Hardware gives you counts and nothing else, so the Bell state example ends by squeezing what it can out of them.",[60,1954,1955],{"name":62,"run-href":63,"tag":555},[66,1956,1958],{"className":68,"code":1957,"language":70,"meta":71,"style":71},"correlated = counts.get(\"00\", 0) + counts.get(\"11\", 0)\nuncorrelated = counts.get(\"01\", 0) + counts.get(\"10\", 0)\nprint(f\"\\nCorrelated (|00⟩+|11⟩): {100*correlated\u002Fshots:.1f}%\")\nprint(f\"Uncorrelated (|01⟩+|10⟩): {100*uncorrelated\u002Fshots:.1f}%\")\n\nif correlated \u002F shots > 0.95:\n    print(\"✓ Strong entanglement confirmed!\")\nelse:\n    print(\"⚠ Noise detected — some uncorrelated outcomes\")\n",[73,1959,1960,2004,2045,2090,2122,2128,2151,2165,2174,2187],{"__ignoreMap":71},[76,1961,1962,1964,1967,1969,1972,1975,1977,1980,1982,1984,1987,1989,1991,1993,1995,1998,2000,2002],{"class":78,"data-cue":118,"line":79},[76,1963,118],{"class":122},[76,1965,1966],{"class":100},"correlated ",[76,1968,129],{"class":128},[76,1970,1971],{"class":100}," counts.",[76,1973,1974],{"class":132},"get",[76,1976,136],{"class":100},[76,1978,1979],{"class":1135},"\"00\"",[76,1981,143],{"class":100},[76,1983,164],{"class":139},[76,1985,1986],{"class":100},") ",[76,1988,1276],{"class":128},[76,1990,1971],{"class":100},[76,1992,1974],{"class":132},[76,1994,136],{"class":100},[76,1996,1997],{"class":1135},"\"11\"",[76,1999,143],{"class":100},[76,2001,164],{"class":139},[76,2003,148],{"class":100},[76,2005,2006,2008,2011,2013,2015,2017,2019,2022,2024,2026,2028,2030,2032,2034,2036,2039,2041,2043],{"class":78,"data-cue":140,"line":91},[76,2007,140],{"class":122},[76,2009,2010],{"class":100},"uncorrelated ",[76,2012,129],{"class":128},[76,2014,1971],{"class":100},[76,2016,1974],{"class":132},[76,2018,136],{"class":100},[76,2020,2021],{"class":1135},"\"01\"",[76,2023,143],{"class":100},[76,2025,164],{"class":139},[76,2027,1986],{"class":100},[76,2029,1276],{"class":128},[76,2031,1971],{"class":100},[76,2033,1974],{"class":132},[76,2035,136],{"class":100},[76,2037,2038],{"class":1135},"\"10\"",[76,2040,143],{"class":100},[76,2042,164],{"class":139},[76,2044,148],{"class":100},[76,2046,2047,2049,2051,2053,2056,2059,2062,2065,2068,2071,2074,2077,2079,2082,2085,2088],{"class":78,"line":110},[76,2048,84],{"class":82,"aria-hidden":83},[76,2050,291],{"class":128},[76,2052,136],{"class":100},[76,2054,2055],{"class":96},"f",[76,2057,2058],{"class":1135},"\"",[76,2060,2061],{"class":128},"\\n",[76,2063,2064],{"class":1135},"Correlated (|00⟩+|11⟩): ",[76,2066,2067],{"class":139},"{100",[76,2069,2070],{"class":128},"*",[76,2072,2073],{"class":100},"correlated",[76,2075,2076],{"class":128},"\u002F",[76,2078,250],{"class":100},[76,2080,2081],{"class":96},":.1f",[76,2083,2084],{"class":139},"}",[76,2086,2087],{"class":1135},"%\"",[76,2089,148],{"class":100},[76,2091,2092,2094,2096,2098,2100,2103,2105,2107,2110,2112,2114,2116,2118,2120],{"class":78,"line":119},[76,2093,84],{"class":82,"aria-hidden":83},[76,2095,291],{"class":128},[76,2097,136],{"class":100},[76,2099,2055],{"class":96},[76,2101,2102],{"class":1135},"\"Uncorrelated (|01⟩+|10⟩): ",[76,2104,2067],{"class":139},[76,2106,2070],{"class":128},[76,2108,2109],{"class":100},"uncorrelated",[76,2111,2076],{"class":128},[76,2113,250],{"class":100},[76,2115,2081],{"class":96},[76,2117,2084],{"class":139},[76,2119,2087],{"class":1135},[76,2121,148],{"class":100},[76,2123,2124,2126],{"class":78,"line":151},[76,2125,84],{"class":82,"aria-hidden":83},[76,2127,115],{},[76,2129,2130,2132,2134,2137,2139,2142,2145,2148],{"class":78,"data-cue":169,"line":170},[76,2131,169],{"class":122},[76,2133,617],{"class":96},[76,2135,2136],{"class":100}," correlated ",[76,2138,2076],{"class":128},[76,2140,2141],{"class":100}," shots ",[76,2143,2144],{"class":128},">",[76,2146,2147],{"class":139}," 0.95",[76,2149,2150],{"class":100},":\n",[76,2152,2153,2155,2158,2160,2163],{"class":78,"line":191},[76,2154,84],{"class":82,"aria-hidden":83},[76,2156,2157],{"class":128},"    print",[76,2159,136],{"class":100},[76,2161,2162],{"class":1135},"\"✓ Strong entanglement confirmed!\"",[76,2164,148],{"class":100},[76,2166,2167,2169,2172],{"class":78,"line":222},[76,2168,84],{"class":82,"aria-hidden":83},[76,2170,2171],{"class":96},"else",[76,2173,2150],{"class":100},[76,2175,2176,2178,2180,2182,2185],{"class":78,"line":230},[76,2177,84],{"class":82,"aria-hidden":83},[76,2179,2157],{"class":128},[76,2181,136],{"class":100},[76,2183,2184],{"class":1135},"\"⚠ Noise detected — some uncorrelated outcomes\"",[76,2186,148],{"class":100},[296,2188,2189,2196,2203],{"class":298},[300,2190,2191,2193],{"data-cue":118},[76,2192,118],{"class":122},[76,2194,2195],{"class":306},"The two outcomes a Bell state is allowed to produce.",[300,2197,2198,2200],{"data-cue":140},[76,2199,140],{"class":122},[76,2201,2202],{"class":306},"The two it is not. On an ideal simulator this comes out zero every single time.",[300,2204,2205,2207],{"data-cue":169},[76,2206,169],{"class":122},[76,2208,2209],{"class":306},"A threshold picked by hand. Below it, the device has leaked more shots into the impossible outcomes than this example is willing to call clean.",[12,2211,2212,2213,396,2215,2217],{},"Be exact about what that threshold establishes, because the second-basis test above is the tool for checking it. ",[73,2214,386],{},[73,2216,389],{}," are impossible for a Bell state. Every shot that lands there came from the device rather than from the circuit, so the percentage is a noise reading and a useful one.",[12,2219,2220,2221,2225],{},"What it cannot establish is entanglement. A pair of gloves clears 95% correlated as comfortably as a Bell pair does. That is ",[714,2222,2224],{"href":2223},"#the-smallest-one-you-can-make","the gloves problem from the top of this page",", and a single basis cannot separate the two. Confirming entanglement takes the second-basis run, which is another job on the machine.",[12,2227,2228],{},"Which is the honest answer to why you would use hardware at all. A simulator hands you a flawless Bell pair every time. So it can never tell you the one thing you want to know about a real device: how much entanglement is left by the time the circuit ends. A GHZ state across five qubits is a standard benchmark for that reason. Entanglement is the first thing noise takes, which makes it the most sensitive thing on the machine to count.",[12,2230,2231,2232,2236],{},"Why a device hands you a tally and never a state is a subject of its own, and ",[714,2233,2235],{"href":2234},"\u002Flearn\u002Fquantum-measurement","Understanding Quantum Measurement"," is the article about it.",[22,2238,2240],{"id":2239},"start-with-two-qubits","Start with two qubits",[12,2242,2243],{},"Every project on this page uses the same ingredient: an entangling operation on qubits that then share one state. The game, the body, the garden, the music, the butterflies and the two visualisers each do something different with it. They also differ in how much of it their measurements let you see.",[12,2245,2246],{},"The Bell state is the smallest version, two gates and a measurement, and the second-basis check above is what separates it from a pair of gloves. Each project shows the line where the entangling happens, or the line where one added gate would start it, so you can change it.",[2248,2249,2251],"make-it-yours",{"fork-href":63,"title":2250},"Run it, then build on it.",[12,2252,2253,2254],{},"Fork the Bell state, run it, and watch the two qubits agree. Then open any project above and see the same idea doing something else. ",[2255,2256,2257],"strong",{},"Everything here is open and yours to build on.",[2259,2260,2261],"style",{},"html pre.shiki code .sV9Aq, html code.shiki .sV9Aq{--shiki-default:#7F848E;--shiki-default-font-style:italic}html pre.shiki code .seHd6, html code.shiki .seHd6{--shiki-default:#C678DD}html pre.shiki code .sn6KH, html code.shiki .sn6KH{--shiki-default:#ABB2BF}html pre.shiki code .sjrmR, html code.shiki .sjrmR{--shiki-default:#56B6C2}html pre.shiki code .sVbv2, html code.shiki .sVbv2{--shiki-default:#61AFEF}html pre.shiki code .sVC51, html code.shiki .sVC51{--shiki-default:#D19A66}html pre.shiki code .s_ZVi, html code.shiki .s_ZVi{--shiki-default:#E06C75;--shiki-default-font-style:italic}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .subq3, html code.shiki .subq3{--shiki-default:#98C379}",{"title":71,"searchDepth":91,"depth":91,"links":2263},[2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275],{"id":24,"depth":91,"text":25},{"id":54,"depth":91,"text":55},{"id":417,"depth":91,"text":418},{"id":522,"depth":91,"text":523},{"id":733,"depth":91,"text":734},{"id":1043,"depth":91,"text":1044},{"id":1200,"depth":91,"text":1201},{"id":1397,"depth":91,"text":1398},{"id":1562,"depth":91,"text":1563},{"id":1745,"depth":91,"text":1746},{"id":1937,"depth":91,"text":1938},{"id":2239,"depth":91,"text":2240},[2277,2278,2279],"Qollab","Learn","Quantum entanglement",[2281],{"username":7,"name":2282,"role":2283,"avatar":2284,"bio":2285,"links":2286},"Nicolaas Spijker","Community manager, Qollab","\u002F_content\u002Fimages\u002Fbuilders\u002Fnicolaas-spijker.webp","Nico runs the builder community at Qollab. These concept articles come out of that work: forking the projects people publish and running them. And talking with authors to learn more about their projects.",[2287,2290],{"label":2288,"href":2289},"Qollab ↗","https:\u002F\u002Fqollab.xyz\u002Fu\u002Fnico",{"label":2291,"href":2292},"GitHub ↗","https:\u002F\u002Fgithub.com\u002Fnicolaasspijker",{"username":7,"name":2282,"role":2283,"avatar":2284},null,"What entanglement means, where the idea came from, and real projects built on it that you can run and fork.","What quantum entanglement means, where it came from, and real projects built on it that you can run and fork on Qollab.",false,"md",{"href":63,"label":2300},"Fork the Bell state","article",{},true,"\u002F_content\u002Fimages\u002Fentanglement\u002Fog.png","\u002Fblog\u002Flearn\u002Fquantum-entanglement","2026-09-07","16 min read",[],{"title":2310,"description":2311},"Quantum Entanglement Examples You Can Run and Fork","What quantum entanglement means and where it came from, shown through real projects: a Bell state, a game, generative art, and music, each one you can run and fork.","blog\u002Flearn\u002Fquantum-entanglement",[720,2314,2315],"education","quantum","6NshNuGd455KKcFsI3xiYzfNl15Uc0BxOVriZv_2E7o",[],[],1788974865921]