Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
"be consistent"
 
PerlMonks  

Re: Re: Nested Quantum::Superpositions

by welchavw (Pilgrim)
on Nov 06, 2003 at 21:07 UTC ( #305152=note: print w/ replies, xml ) Need Help??


in reply to Re: Nested Quantum::Superpositions
in thread Nested Quantum::Superpositions

Thanks for the reply. I'm not sure my grok meter is full yet, though.

Here's a snippet from the docs...

More interestingly, since the individual states of a superposition are scalar values and a superposition is itself a scalar value, a superposition may have states that are themselves superpositions:

$ideal = any( all("tall", "rich", "handsome"), all("rich", "old"), all("smart","Australian","rich") );

Operations involving such a composite superposition operate recursively and in parallel on each its states individually and then recompose the result. For example:

while (@features = get_description) { if (any(@features) eq $ideal) { print "True love"; } }

The any(@features) eq $ideal equality is true if the input characteristics collectively match any of the three superimposed conjunctive superpositions. That is, if the characteristics collectively equate to each of "tall" and "rich" and "handsome", or to both "rich" and "old", or to all three of "smart" and "Australian" and "rich".

So...I guess I thought that the outer any would distribute across the results of the inner alls without affecting their meaning (if that makes "any" sense)? Maybe I just really don't understand the docs example.

,welchavw


Comment on Re: Re: Nested Quantum::Superpositions
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://305152]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-04-19 08:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (478 votes), past polls