Twist - a new programming language for quantum computing - Analytics India Magazine


SOURCE: ANALYTICSINDIAMAG.COM
JAN 25, 2022

Scientists from MIT’s Computer Science and Artificial Intelligence (CSAIL) have created Twist – a programming language for quantum computing. The language uses a concept called purity, which enforces the absence of entanglement and results in intuitive programs, with fewer bugs. Twist can describe and verify which pieces of data are entangled in a quantum program, using a language a programmer can understand.

Programming quantum computers requires awareness of entanglement. When two qubits are entangled, actions on one qubit can change the value of the other, even when they are physically separated. This potency is also a source of weakness. While programming, discarding one qubit without being mindful of its entanglement with another qubit can destroy the data stored in the other. This jeopardises the correctness of the program.

“Our language Twist allows a developer to write safer quantum programs by explicitly stating when a qubit must not be entangled with another,” said 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, affiliated with the MIT Research Laboratory of Electronics, as well as MIT Assistant Professor Michael Carbin. The research was presented at the 2022 Symposium on Principles of Programming conference in Philadelphia.

According to MIT scientists, Twist is expressive enough to write out programs for well-known quantum algorithms and identify bugs in their implementations. The next step for MIT is using Twist to create higher-level quantum programming languages.

“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,” said Fred Chong, Seymour Goodman Professor of Computer Science, University of Chicago and chief scientist, Super.tech.

The work was supported, in part, by the MIT-IBM Watson AI Lab, the National Science Foundation, and the Office of Naval Research.

Similar articles you can read