Luke Palmer wrote:

You know, \ and friends as xor is appealing to me.
Hmmmm. I quite like that too. :-)


Also, a question about superpositions: Is

    $x = 1 | 2 | 3

equivalent to

    $x = 1 | 2
    $x |= 3
No. The precedence is wrong.


or

    $x = (1 | 2) | 3
Yes.


or is there a difference at all?
No (if you mean between those two forms above).
Yes (if you mean between those two and C<all(1,2,3)>).

;-)


So the latter is either 3 or the
superposition 1 | 2.
Yes.


Does
$x == 1

still return true?
Yes.


I guess the root of my question is... do
superpositions search deep or shallow?
Think if it like this...

Suppose:

	$x1 = any(1,2,3)

and

	$x2 = 1|2|3;

$x1 has three superimposed states: C<1>, C<2>, and C<3>.
$x2 has two superimposed states: C<any(1,2)> and C<3>

If we write:

	$x1 == 1

that means:

	any(1,2,3) == 1

which means:

	1==1 || 2==1 || 3==1

which is true.

If we write:

	$x2==1

that means

	any(any(1,2),3) == 1

which means:

	any(1,2)==1 || 3==1

which means:

	1==1 || 2==1 || 3==1

which is true.

So the effect is the same either way.

The only time you'd notice any difference between $x1 and $x2 is if you
asked for their eigenstates, in which case $x1 would give you
three states (C<1>, C<2>, and C<3>) and $x2 would give you two states
(C<any(1,2)> and C<3>).

Damian

Reply via email to