News for hackers. Stuff that matters.
Re:Twist: MIT’s Quantum Programming Language by amluto on Monday February 21, 2022 @09:42PM (#30423486)
I would argue that a language that can prove that the result of teleporting a pure state is pure is fairly neat. It’s not quite as nice as proving that it’s equal to the initial state, but it’s still nifty.

I do agree that, for actual serious work on a hypothetical real large quantum computer, this ability may not be a high priority.

Re:Twist: MIT’s Quantum Programming Language by Strilanc on Tuesday February 22, 2022 @04:42AM (#30425861)
But the language can't prove that. In the paper they show that it thinks the output is mixed until you add a manual assertion telling it to simulate the thing to check.
Re:Twist: MIT’s Quantum Programming Language by amluto on Wednesday February 23, 2022 @11:52AM (#30443125)
It’s also an odd feature of a programming language. Imagine the classical equivalent:

    square : constant integer -> constant integer
square(2) is 4. square(4) is 8. square(readint()) doesn’t compile because readint() may return a mixture (if, say the user rolled a die and entered the result on the keyboard), so the input isn’t pure and you can’t square it. This is, of course, almost useless.

(Amusingly, gcc can do this. asm’s "i" has precisely this restriction. Use with caution.)