Twist: MIT’s New Programming Language for Quantum Computing

Technology Communications Programming AI Concept

Time crystals. Microwaves. Diamonds. What do these three disparate things have in common?

Quantum computing. Unlike traditional computers that use bits, quantum computers use qubits to encode information as zeros or ones, or both at the same time. Coupled with a cocktail of forces from quantum physics, these refrigerator-sized machines can process a whole lot of information — but they’re far from flawless. Just like our regular computers, we need to have the right programming languages to properly compute on quantum computers.

Programming quantum computers requires awareness of something called “entanglement,” a computational multiplier for qubits of sorts, which translates to a lot of power. When two qubits are entangled, actions on one qubit can change the value of the other, even when they are physically separated, giving rise to Einstein’s characterization of “spooky action at a distance.” But that potency is equal parts a source of weakness. When programming, discarding one qubit without being mindful of its entanglement with another qubit can destroy the data stored in the other, jeopardizing the correctness of the program.

Scientists from IBM Quantum Computer Close

While the nascent field of quantum computing can feel flashy and futuristic, quantum computers have the potential for computational breakthroughs in classically unsolvable tasks, like cryptographic and communication protocols, search, and computational physics and chemistry. Credit: Graham Carlow/IBM

While the nascent field can feel a little flashy and futuristic, with images of mammoth wiry gold machines coming to mind, quantum computers have potential for computational breakthroughs in classically unsolvable tasks, like cryptographic and communication protocols, search, and computational physics and chemistry. One of the key challenges in computational sciences is dealing with the complexity of the problem and the amount of computation needed. Whereas a classical digital computer would need a very large exponential number of bits to be able to process such a simulation, a quantum computer could do it, potentially, using a very small number of qubits — if the right programs are there.

“Our language Twist allows a developer to write safer quantum programs by explicitly stating when a qubit must not be entangled with another,” says Charles Yuan, an MIT PhD student in electrical engineering and computer science and the lead author on a new paper about Twist. “Because understanding quantum programs requires understanding entanglement, we hope that Twist paves the way to languages that make the unique challenges of quantum computing more accessible to programmers.”

Yuan wrote the paper alongside Chris McNally, a PhD student in electrical engineering and computer science who is affiliated with the MIT Research Laboratory of Electronics, as well as MIT Assistant Professor Michael Carbin. They presented the research at last week’s 2022 Symposium on Principles of Programming conference in Philadelphia.

Untangling quantum entanglement

Imagine a wooden box that has a thousand cables protruding out from one side. You can pull any cable all the way out of the box, or push it all the way in.

After you do this for a while, the cables form a pattern of bits — zeros and ones — depending on whether they’re in or out. This box represents the memory of a classical computer. A program for this computer is a sequence of instructions for when and how to pull on the cables.

Now imagine a second, identical-looking box. This time, you tug on a cable, and see that as it emerges, a couple of other cables are pulled back inside. Clearly, inside the box, these cables are somehow entangled with each other.

The second box is an analogy for a quantum computer, and understanding the meaning of a quantum program requires understanding the entanglement present in its data. But detecting entanglement is not straightforward. You can’t see into the wooden box, so the best you can do is try pulling on cables and carefully reason about which are entangled. In the same way, quantum programmers today have to reason about entanglement by hand. This is where the design of Twist helps massage some of those interlaced pieces.

The scientists designed Twist to be expressive enough to write out programs for well-known quantum algorithms and identify bugs in their implementations. To evaluate Twist’s design, they modified the programs to introduce some kind of bug that would be relatively subtle for a human programmer to detect, and showed that Twist could automatically identify the bugs and reject the programs.

They also measured how well the programs performed in practice in terms of runtime, which had less than 4 percent overhead over existing quantum programming techniques.

For those wary of quantum’s “seedy” reputation in its potential to break encryption systems, Yuan says it’s still not very well known to what extent quantum computers will actually be able to reach their performance promises in practice. “There’s a lot of research that’s going on in post-quantum cryptography, which exists because even quantum computing is not all-powerful. So far, there’s a very specific set of applications in which people have developed algorithms and techniques where a quantum computer can outperform classical computers.”

An important next step is using Twist to create higher-level quantum programming languages. Most quantum programming languages today still resemble assembly language, stringing together low-level operations, without mindfulness towards things like data types and functions, and what’s typical in classical software engineering.

“Quantum computers are error-prone and difficult to program. By introducing and reasoning about the ‘purity’ of program code, Twist takes a big step towards making quantum programming easier by guaranteeing that the quantum bits in a pure piece of code cannot be altered by bits not in that code,” says Fred Chong, the Seymour Goodman Professor of Computer Science at the

Source: SciTechDaily

35 Replies to “Twist: MIT’s New Programming Language for Quantum Computing”

  1. недорогие дома отдыха на выходные спа отели в павловске с бассейном
    янган тау санаторий черноморец гудаута отзывы три сосны феодосия официальный сайт
    коломна спа отель с бассейном горный алтай отдых с детьми доставка еды архипо осиповка

  2. гостиница марриотт аврора москва текирова турция отели 5 звезд
    где остановиться в москве недорого с детьми каширские роднички официальный сайт санаторий надежда в анапе цены на 2021
    санаторно курортная карта фото гостиница карелия санкт петербург официальный старинная анапа отель

  3. алтай резорт отзывы отель люмьер москва
    гостиница иремель в уфе санатории татнефть официальный сайт отель кают компания кимры
    отель bridge resort 4 сочи отель минима белорусская металлург санаторий 3 сочи

  4. белокуриха отель с бассейном кисловодск сан
    кисловодск санаторий самара фото санаторные путевки каисса 3 сочи
    санаторий буран сергиев посад отзывы пицунда санаторий самшитовая роща пятигорск санаторий им кирова официальный сайт

  5. вольгинский санаторий работа в абхазии для россиян с проживанием
    валуево с2 поселок валуево россия дома отдыха в кисловодске гостиница золотой лев ростов
    пансионаты в адлере с детьми туапсе зеленая долина великий новгород гостиницы цены

  6. гостиница островский кострома кисловодск канатка
    гостиница спутник киржач санаторий эллада фнс россии официальный отель ривьера казань официальный сайт
    отель алфавит отели в лдзаа абхазия на берегу моря где отдохнуть на алтае с детьми

  7. гостиница вестник старая русса официальный сайт зеленый гай отзывы
    гостиницы нового света ток золотой пляж феодосия взморье астрахань
    отель ольхон отель жемчужина пушкино аршан гостиницы

  8. виктория отдых пансионат отель на мирном обнинск
    лаптево сатка хостел добрый дом краснодар ель хостел и кофейня москва
    ak rose del mare сочи самшитовая роща тверская область отдых все включено

  9. гостевой дом маяк пицунда золотые барханы витязево официальный сайт
    шератон нижний новгород мин воды экскурсии цены алеан туры с кэшбэком
    гостиницы невинномысска на карте сочи санаторий русь отзывы отель рэдиссон в санкт петербурге

  10. горлица глазов пансионат для парализованных после инсульта низкие цены
    новогодняя ночь в загородном отеле отели all inclusive в сочи русалочка гостиница
    ялта курорты гостиница 1001 ночь махачкала дом отдыха в калининграде на море

  11. магадан сочи официальный виктория дом отдыха в пушкино
    чистые пруды адлер эльбрус гостиницы санатории в тюмени с термальными источниками
    бутик отель 39 ростов на дону цены рэдиссон лазурная сочи на карте краснодар санаторий

  12. авито кисловодск снять посуточно отдых в крыму полный пансион
    геленджик пансионат кавказ официальный сайт отзывы о санатории ай даниль в крыму гостевой дом люмьер санкт петербург
    sigma sirius park сочи санатории мчс россии список на черном море дома отдыха казань

  13. клиника лиева кисловодск алеон махачкала отель
    виктория пансионат отдых в крыму оленевка санатории органов дыхания в россии
    отели сочи на побережье гостиница на мичуринском бассейн в ясенках

  14. песочная бухта отель севастополь санаторий беларуси цены на путевки
    ибис москва киевская телефон клязьма оздоровительный комплекс гостиничный комплекс жемчужина сочи
    гостиница уют богучаны отдых с ребенком в геленджике как доехать до сестрорецка

  15. лазурный берег отель комфорт гагра отзывы гостиница романтик архыз
    поселок крутушка гостиница атлант лазаревское официальный сайт гагра отель алекс резорт спа 4 абхазия
    отель гудаута акварель анапа отдых в сочи лазаревское

  16. livadiyskiy spa hotel жар птица пахомово
    гостиницы в жуковском недорого недорогой отдых в абхазии 2021 фуникулер геленджик
    гостиницы в пыть яхе путевки 2021 гостиница репинская санкт петербург официальный сайт

Comments are closed.