use strict; use Quantum::Superpositions; my $s = any( 1 .. 4 ); $s = $s != 1; $s = $s != 2; my @e = eigenstates( $s ); print "Am I on to something? @e\n";
The eigen states are (helpfully) 3 and 4. Now, suppose I have another superposition that's also any 1 through 4 that isn't equal to $t? Then what? I'd expect ...
... to give me a super postion of 1 .. 4, but it gives 3 and 4 instead. Sadly, it's also pretty obvious that it doesn't have the capacity to retain all the implications of $t != $s and $s != 1 and $s != 2 — which would make $t 1 through 4 remembering somehow that it's not equal to $s. I tried one more thing before I realized I either didn't know how to approach the problem, or it simply wasn't possible without magic:my $t = any(1 .. 4); $t = $t != $s;
$t = $t != $_ for eigenstates( $s );
Unhelpfully, this makes $t the superposition of 1 and 2, which isn't quite what I was going for... But it at least made me realize I didn't have any idea what to do next.
I'd give up and forget the topic completely, but supposedly perl6 will have this sort of stuff (called junctions), so I'd like to learn more about the kinds of problems you can try to (and will never be able to) solve with this stuff.
Is solving sudoku puzzles with QS and/or junctions even remotely possible?
-Paul
In reply to sudoku via superpositions by jettero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |