A team of scientists from the Computer Science and Artificial Intelligence (CSAIL) unit of the Massachusetts Institute of Technology (MIT) has created a programming language for quantum computing. The new programming language called ‘Twist’ will be able to describe and verify the kind of data entangled in a quantum program, with the use of a language that can be easily understandable by a classical programmer.
The language utilizes a concept known as ‘purity’ that enforces entanglement absence, resulting in more intuitive programs that have lesser bugs. For instance, a programmer can use the ‘Twist’ programming language to posit that the temporary data generated as garbage by a program is not entangled with the program’s answer, in the process making it safe to throw away.
With quantum computers having the potential for computational breakthroughs in classically unsolvable tasks, like cryptographic and communication protocols, search, and computational physics and chemistry, a key challenge in dealing in the science of computation is the complexity of the problem and the amount of computation needed.
A normal digital computer may need a sizeable number of bits to process such stimulation, a quantum computer on the other hand do not need such large number as it could do with the use of a very small number of qubits, provided the right programs are ingrained.
Charles Yuan, an MIT PhD student in electrical engineering and computer science and the lead author on a new paper about Twist highlighted the function further when he said:
“Our language Twist allows a developer to write safer quantum programs by explicitly stating when a qubit must not be entangled with another. 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.”
The paper was written by Yuan together with 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. The work was supported, in part, by the MIT-IBM Watson AI Lab, the National Science Foundation, and the Office of Naval Research.
The team presented the research paper at last week’s 2022 Symposium on Principles of Programming conference in Philadelphia.
Yuan and his team designed Twist in a way that it can be expressive enough on its own volition so as to be able to write out programs for conventional algorithms, while identifying bugs in their implementations. The scientists modified the programs to introduce a kind of bug that would make it suitable for a normal programmer to easily detect, while showing that Twist on its own automatically identify the bugs, in the process rejecting the programs, a team evaluation of Twist’s design.
The team also measured the performances of the programs in terms of runtime and discovered it has less than 4 percent overhead over existing quantum programming techniques.
According to Yuan, it’s still not very well known to what extent quantum computers will actually be able to reach their performance promises in practice, in reference to those wary of quantum’s “seedy” reputation in its potential to break encryption systems.
“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”, he said.
The next vital step will be to use Twist to create higher-level quantum programming languages, which the team took cognizance of, with majority of today’s quantum programming languages looking like that of assembly language, while 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 University of Chicago and chief scientist at Super.tech .