2,825 research outputs found
Layer by layer - Combining Monads
We develop a method to incrementally construct programming languages. Our
approach is categorical: each layer of the language is described as a monad.
Our method either (i) concretely builds a distributive law between two monads,
i.e. layers of the language, which then provides a monad structure to the
composition of layers, or (ii) identifies precisely the algebraic obstacles to
the existence of a distributive law and gives a best approximant language. The
running example will involve three layers: a basic imperative language enriched
first by adding non-determinism and then probabilistic choice. The first
extension works seamlessly, but the second encounters an obstacle, which
results in a best approximant language structurally very similar to the
probabilistic network specification language ProbNetKAT
A Recipe for State-and-Effect Triangles
In the semantics of programming languages one can view programs as state
transformers, or as predicate transformers. Recently the author has introduced
state-and-effect triangles which capture this situation categorically,
involving an adjunction between state- and predicate-transformers. The current
paper exploits a classical result in category theory, part of Jon Beck's
monadicity theorem, to systematically construct such a state-and-effect
triangle from an adjunction. The power of this construction is illustrated in
many examples, covering many monads occurring in program semantics, including
(probabilistic) power domains
Probabilistic Logic Programming with Beta-Distributed Random Variables
We enable aProbLog---a probabilistic logical programming approach---to reason
in presence of uncertain probabilities represented as Beta-distributed random
variables. We achieve the same performance of state-of-the-art algorithms for
highly specified and engineered domains, while simultaneously we maintain the
flexibility offered by aProbLog in handling complex relational domains. Our
motivation is that faithfully capturing the distribution of probabilities is
necessary to compute an expected utility for effective decision making under
uncertainty: unfortunately, these probability distributions can be highly
uncertain due to sparse data. To understand and accurately manipulate such
probability distributions we need a well-defined theoretical framework that is
provided by the Beta distribution, which specifies a distribution of
probabilities representing all the possible values of a probability when the
exact value is unknown.Comment: Accepted for presentation at AAAI 201
New Directions in Categorical Logic, for Classical, Probabilistic and Quantum Logic
Intuitionistic logic, in which the double negation law not-not-P = P fails,
is dominant in categorical logic, notably in topos theory. This paper follows a
different direction in which double negation does hold. The algebraic notions
of effect algebra/module that emerged in theoretical physics form the
cornerstone. It is shown that under mild conditions on a category, its maps of
the form X -> 1+1 carry such effect module structure, and can be used as
predicates. Predicates are identified in many different situations, and capture
for instance ordinary subsets, fuzzy predicates in a probabilistic setting,
idempotents in a ring, and effects (positive elements below the unit) in a
C*-algebra or Hilbert space. In quantum foundations the duality between states
and effects plays an important role. It appears here in the form of an
adjunction, where we use maps 1 -> X as states. For such a state s and a
predicate p, the validity probability s |= p is defined, as an abstract Born
rule. It captures many forms of (Boolean or probabilistic) validity known from
the literature. Measurement from quantum mechanics is formalised categorically
in terms of `instruments', using L\"uders rule in the quantum case. These
instruments are special maps associated with predicates (more generally, with
tests), which perform the act of measurement and may have a side-effect that
disturbs the system under observation. This abstract description of
side-effects is one of the main achievements of the current approach. It is
shown that in the special case of C*-algebras, side-effect appear exclusively
in the non-commutative case. Also, these instruments are used for test
operators in a dynamic logic that can be used for reasoning about quantum
programs/protocols. The paper describes four successive assumptions, towards a
categorical axiomatisation of quantitative logic for probabilistic and quantum
systems
Alternation in Quantum Programming: From Superposition of Data to Superposition of Programs
We extract a novel quantum programming paradigm - superposition of programs -
from the design idea of a popular class of quantum algorithms, namely quantum
walk-based algorithms. The generality of this paradigm is guaranteed by the
universality of quantum walks as a computational model. A new quantum
programming language QGCL is then proposed to support the paradigm of
superposition of programs. This language can be seen as a quantum extension of
Dijkstra's GCL (Guarded Command Language). Surprisingly, alternation in GCL
splits into two different notions in the quantum setting: classical alternation
(of quantum programs) and quantum alternation, with the latter being introduced
in QGCL for the first time. Quantum alternation is the key program construct
for realizing the paradigm of superposition of programs.
The denotational semantics of QGCL are defined by introducing a new
mathematical tool called the guarded composition of operator-valued functions.
Then the weakest precondition semantics of QGCL can straightforwardly derived.
Another very useful program construct in realizing the quantum programming
paradigm of superposition of programs, called quantum choice, can be easily
defined in terms of quantum alternation. The relation between quantum choices
and probabilistic choices is clarified through defining the notion of local
variables. We derive a family of algebraic laws for QGCL programs that can be
used in program verification, transformations and compilation. The expressive
power of QGCL is illustrated by several examples where various variants and
generalizations of quantum walks are conveniently expressed using quantum
alternation and quantum choice. We believe that quantum programming with
quantum alternation and choice will play an important role in further
exploiting the power of quantum computing.Comment: arXiv admin note: substantial text overlap with arXiv:1209.437
Formal verification of higher-order probabilistic programs
Probabilistic programming provides a convenient lingua franca for writing
succinct and rigorous descriptions of probabilistic models and inference tasks.
Several probabilistic programming languages, including Anglican, Church or
Hakaru, derive their expressiveness from a powerful combination of continuous
distributions, conditioning, and higher-order functions. Although very
important for practical applications, these combined features raise fundamental
challenges for program semantics and verification. Several recent works offer
promising answers to these challenges, but their primary focus is on semantical
issues.
In this paper, we take a step further and we develop a set of program logics,
named PPV, for proving properties of programs written in an expressive
probabilistic higher-order language with continuous distributions and operators
for conditioning distributions by real-valued functions. Pleasingly, our
program logics retain the comfortable reasoning style of informal proofs thanks
to carefully selected axiomatizations of key results from probability theory.
The versatility of our logics is illustrated through the formal verification of
several intricate examples from statistics, probabilistic inference, and
machine learning. We further show the expressiveness of our logics by giving
sound embeddings of existing logics. In particular, we do this in a parametric
way by showing how the semantics idea of (unary and relational) TT-lifting can
be internalized in our logics. The soundness of PPV follows by interpreting
programs and assertions in quasi-Borel spaces (QBS), a recently proposed
variant of Borel spaces with a good structure for interpreting higher order
probabilistic programs
The Expectation Monad in Quantum Foundations
The expectation monad is introduced abstractly via two composable
adjunctions, but concretely captures measures. It turns out to sit in between
known monads: on the one hand the distribution and ultrafilter monad, and on
the other hand the continuation monad. This expectation monad is used in two
probabilistic analogues of fundamental results of Manes and Gelfand for the
ultrafilter monad: algebras of the expectation monad are convex compact
Hausdorff spaces, and are dually equivalent to so-called Banach effect
algebras. These structures capture states and effects in quantum foundations,
and also the duality between them. Moreover, the approach leads to a new
re-formulation of Gleason's theorem, expressing that effects on a Hilbert space
are free effect modules on projections, obtained via tensoring with the unit
interval.Comment: In Proceedings QPL 2011, arXiv:1210.029
Simple characterizations for commutativity of quantum weakest preconditions
In a recent letter [Information Processing Letters~104 (2007) 152-158], it
has shown some sufficient conditions for commutativity of quantum weakest
preconditions. This paper provides some alternative and simple
characterizations for the commutativity of quantum weakest preconditions, i.e.,
Theorem 3.1, Theorem 3.2 and Proposition 3.3 in what follows. We also show that
to characterize the commutativity of quantum weakest preconditions in terms of
() is hard in the sense of Proposition 4.1 and Proposition 4.2.Comment: Re-written, comments are welcom
- …