Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 18 submissions in the queue.
posted by janrinok on Thursday January 27 2022, @01:44AM   Printer-friendly
from the has-it-been-endorsed-by-Chubby-Checker? dept.

Twist: MIT's New Programming Language for Quantum Computing:

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 MIT's Computer Science and Artificial Intelligence (CSAIL) aimed to do some unraveling by creating their own programming language for quantum computing called Twist. Twist can describe and verify which pieces of data are entangled in a quantum program, through a language a classical programmer can understand. The language uses a concept called purity, which enforces the absence of entanglement and results in more intuitive programs, with ideally fewer bugs. For example, a programmer can use Twist to say that the temporary data generated as garbage by a program is not entangled with the program's answer, making it safe to throw away.

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."

Reference:
Charles Yuan, Christopher McNally, and Michael Carbin. "Twist: Sound Reasoning for Purity and Entanglement in Quantum Programs" POPL 2022


Original Submission

Related Stories

Why Are There So Many Programming Languages? 68 comments

Over at ACM.org, Doug Meil posits that programming languages are often designed for certain tasks or workloads in mind, and in that sense most languages differ less in what they make possible, and more in terms of what they make easy:

I had the opportunity to visit the Computer History Museum in Mountain View, CA, a few years ago. It's a terrific museum, and among the many exhibits is a wall-size graph of the evolution of programming languages. This graph is so big that anyone who has ever written "Hello World" in anything has the urge to stick their nose against the wall and search section by section to try find their favorite languages. I certainly did. The next instinct is to trace the "influenced" edges of the graph with their index finger backwards in time. Or forwards, depending on how old the languages happen to be.

[...] There is so much that can be taken for granted in computing today. Back in the early days everything was expensive and limited: storage, memory, and processing power. People had to walk uphill and against the wind, both ways, just to get to the computer lab, and then stay up all night to get computer time. One thing that was easier during that time was that the programming language namespace was greenfield, and initial ones from the 1950's and 1960's had the luxury of being named precisely for the thing they did: FORTRAN (Formula Translator), COBOL (Common Business Oriented Language), BASIC (Beginner's All-purpose Symbolic Instruction Code), ALGOL (Algorithmic Language), LISP (List Processor). Most people probably haven't heard of SNOBOL (String Oriented and Symbolic Language, 1962), but one doesn't need many guesses to determine what it was trying to do. Had object-oriented programming concepts been more fully understood during that time, it's possible we would be coding in something like "OBJOL" —an unambiguously named object-oriented language, at least by naming patterns of the era.

It's worth noting and admiring the audacity of PL/I (1964), which was aiming to be that "one good programming language." The name says it all: Programming Language 1. There should be no need for 2, 3, or 4. Though PL/I's plans of becoming the Highlander of computer programming didn't play out like the designers intended, they were still pulling on a key thread in software: why so many languages? That question was already being asked as far back as the early 1960's.

The author goes on to reason that new languages are mostly created for control and fortune, citing Microsoft's C# as an example of their answer to Java for a middleware language they could control.

Related:
Non-Programmers are Building More of the World's Software
Twist: MIT's New Programming Language for Quantum Computing
10 Most(ly dead) Influential Programming Languages


Original Submission

This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 0) by Anonymous Coward on Thursday January 27 2022, @02:42AM (3 children)

    by Anonymous Coward on Thursday January 27 2022, @02:42AM (#1216024)

    Too bad there's no hardware to run it on.

    • (Score: 0) by Anonymous Coward on Thursday January 27 2022, @02:53AM (1 child)

      by Anonymous Coward on Thursday January 27 2022, @02:53AM (#1216025)

      Not true, provided your program doesn't need to count beyond 42.

      • (Score: 0) by Anonymous Coward on Thursday January 27 2022, @08:57AM

        by Anonymous Coward on Thursday January 27 2022, @08:57AM (#1216116)

        Not true, provided your program doesn't need to count beyond 42.

        So I just had to try it:

        verban = (42, twisty(whoopsie-daisy,1)).addition
        display (verban).value

        message: entanglement says No!

    • (Score: 0) by Anonymous Coward on Thursday January 27 2022, @08:51AM

      by Anonymous Coward on Thursday January 27 2022, @08:51AM (#1216115)

      Give it a week and there will be a pypy module you can bog your system down with to emulate the quantum magic.

      I wonder if the new language, especially eminating from MIT, will have gender-correct and sensitivies-aware terminology? (ducks and runs...)

(1)