A method has been developed for transforming a program written in the probabilistic guarded-command language (pGCL) into an equivalent but reversible program. The method extends previous work on logical reversibility to that language and pertains to “demonic” nondeterminism and probability. Use is made of a formal definition of logical reversibility and the expectation-transformer semantics for pGCL. The method should be useful in the compilation of a general-purpose programming language for quantum computation.
Note: The Institute of Electrical and Electronics Engineers, Incorporated is distributing this Article with permission of the International Business Machines Corporation (IBM) who is the exclusive owner. The recipient of this Article may not assign, sublicense, lease, rent or otherwise transfer, reproduce, prepare derivative works, publicly display or perform, or distribute the Article.