Index index by Group index by Distribution index by Vendor index by creation date index by Name Mirrors Help Search

perl-Quantum-Superpositions-2.03-1.23 RPM for noarch

From OpenSuSE Tumbleweed for noarch

Name: perl-Quantum-Superpositions Distribution: openSUSE Tumbleweed
Version: 2.03 Vendor: openSUSE
Release: 1.23 Build date: Fri Feb 2 17:31:23 2024
Group: Development/Libraries/Perl Build host: i03-ch1b
Size: 41000 Source RPM: perl-Quantum-Superpositions-2.03-1.23.src.rpm
Packager: https://bugs.opensuse.org
Url: http://search.cpan.org/dist/Quantum-Superpositions/
Summary: QM-like superpositions in Perl
The Quantum::Superpositions module adds two new operators to Perl: 'any'
and 'all'.

Each of these operators takes a list of values (states) and superimposes
them into a single scalar value (a superposition), which can then be stored
in a standard scalar variable.

The 'any' and 'all' operators produce two distinct kinds of superposition.
The 'any' operator produces a disjunctive superposition, which may
(notionally) be in any one of its states at any time, according to the
needs of the algorithm that uses it.

In contrast, the 'all' operator creates a conjunctive superposition, which
is always in every one of its states simultaneously.

Superpositions are scalar values and hence can participate in arithmetic
and logical operations just like any other type of scalar. However, when an
operation is applied to a superposition, it is applied (notionally) in
parallel to each of the states in that superposition.

For example, if a superposition of states 1, 2, and 3 is multiplied by 2:

	$result = any(1,2,3) * 2;

the result is a superposition of states 2, 4, and 6. If that result is then
compared with the value 4:

	if ($result == 4) { print "fore!" }

then the comparison also returns a superposition: one that is both true and
false (since the equality is true for one of the states of '$result' and
false for the other two).

Of course, a value that is both true and false is of no use in an 'if'
statement, so some mechanism is needed to decide which superimposed boolean
state should take precedence.

This mechanism is provided by the two types of superposition available. A
disjunctive superposition is true if any of its states is true, whereas a
conjunctive superposition is true only if all of its states are true.

Thus the previous example does print "fore!", since the 'if' condition is
equivalent to:

	if (any(2,4,6) == 4)...

It suffices that any one of 2, 4, or 6 is equal to 4, so the condition is
true and the 'if' block executes.

On the other hand, had the control statement been:

        if (all(2,4,6) == 4)...

the condition would fail, since it is not true that all of 2, 4, and 6 are
equal to 4.

Operations are also possible between two superpositions:

        if (all(1,2,3)*any(5,6) < 21)
                { print "no alcohol"; }

        if (all(1,2,3)*any(5,6) < 18)
                { print "no entry"; }

        if (any(1,2,3)*all(5,6) < 18)
                { print "under-age" }

In this example, the string "no alcohol" is printed because the
superposition produced by the multiplication is the Cartesian product of
the respective states of the two operands: 'all(5,6,10,12,15,18)'. Since
all of these resultant states are less that 21, the condition is true. In
contrast, the string "no entry" is not printed, because not all the
product's states are less than 18.

Note that the type of the first operand determines the type of the result
of an operation. Hence the third string -- "underage" -- is printed,
because multiplying a disjunctive superposition by a conjunctive
superposition produces a result that is disjunctive:
'any(5,6,10,12,15,18)'. The condition of the 'if' statement asks whether
any of these values is less than 18, which is true.

Provides

Requires

License

Artistic-1.0

Changelog

* Mon Jul 09 2018 coolo@suse.com
  - updated to 2.03
    see /usr/share/doc/packages/perl-Quantum-Superpositions/Changes
    2.0.2   Sun Jul  8 15:28:31 CDT 2018
    - POD, thanks for Florian Schlichting
* Fri Nov 18 2011 coolo@suse.com
  - use original tar.gz
* Wed Dec 01 2010 coolo@novell.com
  - switch to perl_requires macro
* Mon Nov 29 2010 coolo@novell.com
  - remove /var/adm/perl-modules
* Sun Jan 10 2010 jengelh@medozas.de
  - enable parallel build
* Wed Jan 25 2006 mls@suse.de
  - converted neededforbuild to BuildRequires
* Sun Jan 11 2004 adrian@suse.de
  - build as user
* Fri Aug 22 2003 mjancar@suse.cz
  - require the perl version we build with
* Thu Jul 24 2003 mjancar@suse.cz
  - update to 2.02
* Thu Jul 17 2003 mjancar@suse.cz
  - adapt to perl-5.8.1
  - use %perl_process_packlist

Files

/usr/lib/perl5/vendor_perl/5.38.2/Quantum
/usr/lib/perl5/vendor_perl/5.38.2/Quantum/Superpositions.pm
/usr/share/doc/packages/perl-Quantum-Superpositions
/usr/share/doc/packages/perl-Quantum-Superpositions/Changes
/usr/share/man/man3/Quantum::Superpositions.3pm.gz


Generated by rpm2html 1.8.1

Fabrice Bellet, Sat Mar 30 23:40:51 2024