Full Chapter Reversible Computation 12Th International Conference RC 2020 Oslo Norway July 9 10 2020 Proceedings Ivan Lanese PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Reversible Computation 12th

International Conference RC 2020 Oslo


Norway July 9 10 2020 Proceedings
Ivan Lanese
Visit to download the full and correct content document:
https://textbookfull.com/product/reversible-computation-12th-international-conference-
rc-2020-oslo-norway-july-9-10-2020-proceedings-ivan-lanese/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Reversible Computation 6th International Conference RC


2014 Kyoto Japan July 10 11 2014 Proceedings 1st
Edition Shigeru Yamashita

https://textbookfull.com/product/reversible-computation-6th-
international-conference-rc-2014-kyoto-japan-
july-10-11-2014-proceedings-1st-edition-shigeru-yamashita/

Reversible Computation 10th International Conference RC


2018 Leicester UK September 12 14 2018 Proceedings
Jarkko Kari

https://textbookfull.com/product/reversible-computation-10th-
international-conference-rc-2018-leicester-uk-
september-12-14-2018-proceedings-jarkko-kari/

Games and Learning Alliance 9th International


Conference GALA 2020 Laval France December 9 10 2020
Proceedings Iza Marfisi-Schottman

https://textbookfull.com/product/games-and-learning-alliance-9th-
international-conference-gala-2020-laval-france-
december-9-10-2020-proceedings-iza-marfisi-schottman/

Mathematical Optimization Theory and Operations


Research 19th International Conference MOTOR 2020
Novosibirsk Russia July 6 10 2020 Proceedings Alexander
Kononov
https://textbookfull.com/product/mathematical-optimization-
theory-and-operations-research-19th-international-conference-
motor-2020-novosibirsk-russia-july-6-10-2020-proceedings-
Bio inspired Information and Communication Technologies
12th EAI International Conference BICT 2020 Shanghai
China July 7 8 2020 Proceedings Yifan Chen

https://textbookfull.com/product/bio-inspired-information-and-
communication-technologies-12th-eai-international-conference-
bict-2020-shanghai-china-july-7-8-2020-proceedings-yifan-chen/

Embedded Computer Systems Architectures Modeling and


Simulation 20th International Conference SAMOS 2020
Samos Greece July 5 9 2020 Proceedings Alex Orailoglu

https://textbookfull.com/product/embedded-computer-systems-
architectures-modeling-and-simulation-20th-international-
conference-samos-2020-samos-greece-july-5-9-2020-proceedings-
alex-orailoglu/

Reasoning Web Declarative Artificial Intelligence 16th


International Summer School 2020 Oslo Norway June 24 26
2020 Tutorial Lectures Marco Manna

https://textbookfull.com/product/reasoning-web-declarative-
artificial-intelligence-16th-international-summer-
school-2020-oslo-norway-june-24-26-2020-tutorial-lectures-marco-
manna/

Artificial Intelligence in Education 21st International


Conference AIED 2020 Ifrane Morocco July 6 10 2020
Proceedings Part II Ig Ibert Bittencourt

https://textbookfull.com/product/artificial-intelligence-in-
education-21st-international-conference-aied-2020-ifrane-morocco-
july-6-10-2020-proceedings-part-ii-ig-ibert-bittencourt/

Artificial Intelligence in Education 21st International


Conference AIED 2020 Ifrane Morocco July 6 10 2020
Proceedings Part I Ig Ibert Bittencourt

https://textbookfull.com/product/artificial-intelligence-in-
education-21st-international-conference-aied-2020-ifrane-morocco-
july-6-10-2020-proceedings-part-i-ig-ibert-bittencourt/
Ivan Lanese
Mariusz Rawski (Eds.)
LNCS 12227

Reversible Computation
12th International Conference, RC 2020
Oslo, Norway, July 9–10, 2020
Proceedings
Lecture Notes in Computer Science 12227

Founding Editors
Gerhard Goos
Karlsruhe Institute of Technology, Karlsruhe, Germany
Juris Hartmanis
Cornell University, Ithaca, NY, USA

Editorial Board Members


Elisa Bertino
Purdue University, West Lafayette, IN, USA
Wen Gao
Peking University, Beijing, China
Bernhard Steffen
TU Dortmund University, Dortmund, Germany
Gerhard Woeginger
RWTH Aachen, Aachen, Germany
Moti Yung
Columbia University, New York, NY, USA
More information about this series at http://www.springer.com/series/7408
Ivan Lanese Mariusz Rawski (Eds.)

Reversible Computation
12th International Conference, RC 2020
Oslo, Norway, July 9–10, 2020
Proceedings

123
Editors
Ivan Lanese Mariusz Rawski
University of Bologna University of Warsaw
Bologna, Italy Warsaw, Poland

ISSN 0302-9743 ISSN 1611-3349 (electronic)


Lecture Notes in Computer Science
ISBN 978-3-030-52481-4 ISBN 978-3-030-52482-1 (eBook)
https://doi.org/10.1007/978-3-030-52482-1
LNCS Sublibrary: SL2 – Programming and Software Engineering

© Springer Nature Switzerland AG 2020


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication
does not imply, even in the absence of a specific statement, that such names are exempt from the relevant
protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are
believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors
give a warranty, express or implied, with respect to the material contained herein or for any errors or
omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in
published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface

This volume contains the papers presented at the 12th Conference on Reversible
Computation (RC 2020), held during July 9–10, 2020, online due to the COVID-19
pandemic, while initially expected to take place virtually in Oslo, Norway, hosted by
the Institute for Informatics, University of Oslo.
The RC conference brings together researchers from computer science, mathemat-
ics, engineering, and physics to discuss new developments and directions for future
research in the emerging area of Reversible Computation. This includes, for example,
reversible formal models, reversible programming languages, reversible circuits, and
quantum computing.
The conference received 23 submissions with authors from 16 countries. All papers
were reviewed by at least three members of the Program Committee. After careful
deliberations, the Program Committee selected 17 papers for presentation. In addition
to these papers, this volume contains the abstracts of the two invited talks: “Problems
and Prospects for Bidirectional Transformations” by Perdita Stevens (University of
Edinburgh, UK) and “Inverse Problems, Constraint Satisfaction, Reversible Logic,
Invertible Logic and Grover Quantum Oracles for Practical Problems” by Marek
Perkowski (Portland State University, USA).
Of course the COVID-19 pandemic had a strong impact on the conference, as well
as on research and the society in general. This was the first edition of RC to be held
online, similar to other conference scheduled for this time. This is of course a difficulty,
since in-person presence makes interaction much easier, but also a challenge and an
occasion. Indeed, an online conference stimulates larger participation, in particular
from persons whose budget or constraints may not allow in-person participation, not
even under normal circumstances.
The conference would not be possible without the enthusiasm of the members of the
Program Committee; their professionalism and their helpfulness was exemplary. For
the work of the Program Committee and the compilation of the proceedings, the
extremely useful EasyChair conference managment system was employed. Finally, we
would like to thank all the authors for their submissions, their willingness to continue
improving their papers, and their wonderful presentations during RC 2020.

April 2020 Ivan Lanese


Mariusz Rawski
Organization

Program Committee
Gerhard Dueck University of New Brunswick, Canada
Robert Glück University of Copenhagen, Denmark
Jarkko Kari University of Turku, Finland
Jean Krivine CNRS, France
Ivan Lanese University of Bologna, Italy, and INRIA, France
Martin Lukac Nazarbayev University, Kazakhstan
Kazutaka Matsuda Tohoku University, Japan
Claudio Antares Mezzina Università di Urbino, Italy
Lukasz Mikulski Nicolaus Copernicus University, Poland
Torben Ægidius Mogensen University of Copenhagen, Denmark
Claudio Moraga TU Dortmund, Germany
Iain Phillips Imperial College London, UK
Krzysztof Podlaski University of Lodz, Poland
Mariusz Rawski Warsaw University of Technology, Poland
Markus Schordan Lawrence Livermore National Laboratory, USA
Peter Selinger Dalhousie University, Canada
Mathias Soeken École Polytechnique Fédérale de Lausanne,
Switzerland
Milena Stankovic University of Nis, Serbia
Himanshu Thapliyal University of Kentucky, USA
Irek Ulidowski University of Leicester, UK
German Vidal MiST, VRAIN, Universitat Politecnica de Valencia,
Spain
Robert Wille Johannes Kepler University Linz, Austria
Tetsuo Yokoyama Nanzan University, Japan

Additional Reviewers

Gogolinska, Anna
Hoey, James
Kirkeby, Maja
Mróz, Andrzej
Varacca, Daniele
Abstracts of Invited Talks
Problems and Prospects For Bidirectional
Transformations

Perdita Stevens

School of Informatics, University of Edinburgh

Abstract. Bidirectional transformations maintain consistency between two, or


more, sources of information. These information sources can be code, docu-
ments, database views, etc.: the general term “model” covers them all. I will
explain why I think bidirectional transformations have the potential to transform
software development and help solve the “capacity crisis”, in which the demand
for software engineering outstrips the supply of people able to do it. In order to
bring this to fruition we need to solve many problems; for example I have
recently been working on how to manage networks of many models, not just
two. It turns out that reversibility – whose relationship with bidirectionality is, in
general, not as obvious as we might think at first sight – is relevant to some
outstanding problems. I will describe progress and indicate some possible
directions for future work.
Inverse Problems, Constraint Satisfaction,
Reversible Logic, Invertible Logic and Grover
Quantum Oracles for Practical Problems

Marek Perkowski

Department of Electrical and Computer Engineering, Portland State University,


Portland, OR 97207, USA
mperkows@ee.pdx.edu

Abstract. It is well-known that the “Unsorted Database” quantum algorithm by


Grover gives quadratic speedup to several important combinatorial and enu-
merative problems, such as: SAT, Graph Coloring, Maximum Cliques, Trav-
elling Salesman and many others. Recently, quantum programming languages
such as Quipper start to be used to design, verify and simulate practical quantum
algorithms for important problems in Quantum Machine Learning. So far,
however, no methodologies have been created to program Grover Oracles for
particular classes of problems. In contrast, such methodologies have been
already created for classical Constraint Satisfaction Problems. The goal of this
invited talk is to show results of some initial research towards creating sys-
tematic methodologies to program quantum computers that solve search prob-
lems in Artificial Intelligence, Logic Design and Machine Learning. Our
methods are based on unified oracle blocks for such problem representations as
set partition algebra, cube calculus and optimal mappings. For instance, several
important problems in CAD and Machine Learning can be solved using only
two basic operations on set partitions; P1  P2 and P1 P2. Moreover, building
oracles is the fundamental concept in the new approach to solve CSP proposed
here and based on Invertible Logic introduced recently by Supriyo Datta and his
team.
Contents

Invited Talks

Inverse Problems, Constraint Satisfaction, Reversible Logic, Invertible


Logic and Grover Quantum Oracles for Practical Problems . . . . . . . . . . . . . 3
Marek Perkowski

Foundations

Reversible Occurrence Nets and Causal Reversible Prime


Event Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Hernán Melgratti, Claudio Antares Mezzina, Iain Phillips,
G. Michele Pinna, and Irek Ulidowski

Involutory Turing Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54


Keisuke Nakano

Event Structures for the Reversible Early Internal p-Calculus . . . . . . . . . . . . 71


Eva Graversen, Iain Phillips, and Nobuko Yoshida

Programming Languages

Hermes: A Language for Light-Weight Encryption . . . . . . . . . . . . . . . . . . . 93


Torben Ægidius Mogensen

Reversible Programming Languages Capturing Complexity Classes . . . . . . . . 111


Lars Kristiansen

On the Expressivity of Total Reversible Programming Languages . . . . . . . . . 128


Armando B. Matos, Luca Paolini, and Luca Roversi

Toward a Curry-Howard Equivalence for Linear, Reversible Computation:


Work-in-Progress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Kostia Chardonnet, Alexis Saurin, and Benoît Valiron

A Tutorial Introduction to Quantum Circuit Programming in Dependently


Typed Proto-Quipper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Peng Fu, Kohei Kishida, Neil J. Ross, and Peter Selinger

Fractional Types: Expressive and Safe Space Management


for Ancilla Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Chao-Hong Chen, Vikraman Choudhury, Jacques Carette,
and Amr Sabry
xii Contents

Circuit Synthesis

Quantum CNOT Circuits Synthesis for NISQ Architectures


Using the Syndrome Decoding Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Timothée Goubault de Brugière, Marc Baboulin, Benoît Valiron,
Simon Martiel, and Cyril Allouche

Maximality of Reversible Gate Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206


Tim Boykett

Search-Based Transformation Synthesis for 3-Valued Reversible Circuits . . . . 218


D. Michael Miller and Gerhard W. Dueck

Tools and Applications

ReverCSP: Time-Travelling in CSP Computations. . . . . . . . . . . . . . . . . . . . 239


Carlos Galindo, Naoki Nishida, Josep Silva, and Salvador Tamarit

Reversible Computations in Logic Programming . . . . . . . . . . . . . . . . . . . . . 246


Germán Vidal

Towards a Formal Account for Software Transactional Memory . . . . . . . . . . 255


Doriana Medić, Claudio Antares Mezzina, Iain Phillips,
and Nobuko Yoshida

Encoding Reversing Petri Nets in Answer Set Programming. . . . . . . . . . . . . 264


Yannis Dimopoulos, Eleftheria Kouppari, Anna Philippou,
and Kyriaki Psara

A Reversible Runtime Environment for Parallel Programs . . . . . . . . . . . . . . 272


Takashi Ikeda and Shoji Yuen

Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281


Invited Talks
Inverse Problems, Constraint Satisfaction,
Reversible Logic, Invertible Logic and Grover
Quantum Oracles for Practical Problems

Marek Perkowski(&)

Department of Electrical and Computer Engineering, Portland State University,


Portland, OR 97207, USA
mperkows@ee.pdx.edu

Abstract. It is well-known that the “Unsorted Database” quantum algorithm by


Grover gives quadratic speedup to several important combinatorial and enu-
merative problems, such as: SAT, Graph Coloring, Maximum Cliques, Travel-
ling Salesman and many others. Recently, quantum programming languages such
as Quipper start to be used to design, verify and simulate practical quantum
algorithms for important problems in Quantum Machine Learning. So far,
however, no methodologies have been created to program Grover Oracles for
particular classes of problems. In contrast, such methodologies have been already
created for classical Constraint Satisfaction Problems. The goal of this invited
talk is to show results of some initial research towards creating systematic
methodologies to program quantum computers that solve search problems in
Artificial Intelligence, Logic Design and Machine Learning. Our methods are
based on unified oracle blocks for such problem representations as set partition
algebra, cube calculus and optimal mappings. For instance, several important
problems in CAD and Machine Learning can be solved using only two basic
operations on set partitions; P1  P2 and P1  P2. Moreover, building oracles
is the fundamental concept in the new approach to solve CSP proposed here and
based on Invertible Logic introduced recently by Supriyo Datta and his team.

Keywords: Inverse problems  Oracles  Grover algorithm  Invertible logic

1 Introduction

There are two important and large classes of problems: Constraint Satisfaction Prob-
lems (CSP) and optimization problems. CSP problems are specified just by a set of
constraints that the solution has to satisfy. To solve a CSP problem we want to find a
solution that satisfies all the constraints (like for a robot passing a labyrinth without
bouncing any wall). In optimization problems we want to find the solution that opti-
mizes some cost function (like a robot driving from room A to room B in the labyrinth
using minimum energy from its battery). Mathematical problem formulations such as
Graph Coloring or Shortest Path are abstractions of many problems from real life.
Mathematical optimization problems can be reduced to repeated applications of con-
straint satisfaction problems. Every next problem in the sequence is solved with added
and modified constraints.

© Springer Nature Switzerland AG 2020


I. Lanese and M. Rawski (Eds.): RC 2020, LNCS 12227, pp. 3–32, 2020.
https://doi.org/10.1007/978-3-030-52482-1_1
4 M. Perkowski

For instance, the Node Coloring Problem in a graph can be formulated as a problem
of coloring nodes with some restricted number of colors such that every two nodes ni
and nj that share the same edge eij = (ni, nj) obtain different colors. The chromatic
number of the graph is the minimum number of colors used to color this graph. When
we want to find the chromatic number of the graph (and the respective actual coloring)
we can proceed as follows. We set some number K for which a correct coloring exists,
this can be the number of nodes in the worst case. Next we exactly solve the constraint
satisfaction problem for this graph, assuming that the graph is K-colorable. When we
are able to color the graph with K colors, we guess that we can color the graph with K-1
colors. If we were able to do this, then we repeat coloring again as a new constraint
satisfaction problem with K-2 colors, and so on. If we were not able to color the graph
with K-2 colors but we were able to color it with K-1 colors then K-1 is the chromatic
number of the graph. This simple principle of “reducing optimization problem to the
repeated constraint satisfaction problem with some changed constraints” is applicable
to very many, if not all, optimization problems. The key idea here is to formulate the
problem as the Constraint Satisfaction Problem and next to generate the Oracle for this
problem. If this oracle is realized in hardware as a circuit built especially for every
problem instance, the solution can be very fast. Oracle can be realized as a quantum
reversible circuit and used in Grover Algorithm. Here we will show that the oracle can
be also built in standard binary logic or in the recently proposed Invertible Logic
[5, 17]. To exercise Oracle in classical and quantum logic we need also a Generator that
creates combinations to be verified by the Oracle. We call that the Oracle is exercised
by the Generator.
This paper presents the universality and power of systematic creation of oracles that
are next mapped to one of the three types of oracles: classical, quantum and invertible.
Section 2 formulates the general idea of formulating oracles for CSP problems, used to
solve both the decision and optimization problems. Section 3 presents how to solve this
class of problems using classical Boolean logic. The oracle model introduced in this
section is universal for quantum and Invertible Logic circuits. Section 4 explains
briefly Grover Algorithm and reversible oracles for it. We illustrate how to modify the
oracle in a succession of Grover Algorithm runs. Section 5 discusses how to modify or
design the oracles realized in Invertible logic for this class of problems. In Sect. 6 we
present how the logic programming language Prolog is used to design and verify
oracles and especially the Invertible Logic oracles. Section 7 gives conclusions on this
new approach to solve a large class of practical problems.

2 Classical Grover Oracles Versus Invertible Logic Oracles

Because optimization problems are reducible to CSP, let us concentrate on the Con-
straint Satisfaction Problem, which has by itself very many applications in logic design,
logic, cryptography, robotics, Machine Learning and control. There is also some evi-
dence that animals, and even bacteria, solve the constraint satisfaction problems by
blind probabilistic mechanisms just to survive [29]. Let us present some simple CSP
examples.
Inverse Problems, Constraint Satisfaction, Reversible Logic, Invertible Logic 5

Graph coloring is a simple constraint satisfaction problem formulated as follows:


Given is graph G with N nodes and E edges, edges being pairs of nodes eij = (ni,
nj). Nodes are colored with function COLOR: N ! C where C is a set with
K elements called colors. COLOR(n1) = red means coloring node n1 with
color red. For every edge eij = (ni, nj) the constraint COLOR(ni) 6¼ COLOR
(nj) which means that every two adjacent (neighbor) nodes have different
colors. Correct coloring is one that the constraint is satisfied for every edge.
Find a solution to the following problem:
Is it possible to correctly color graph G with K colors? If yes, graph G is K-
colorable, its chromatic number is K or less. The CSP algorithm constructively
demonstrates the correct coloring and the user can easily verify the correctness of the
coloring found. Note, that the above formulation is a decision version of graph col-
oring, not the optimization version. The answer is of type Yes/No.
Another CSP problem is Satisfiability or SAT Problem. Given is a formula F in
some logic (possibly Boolean logic) and we ask “is this formula satisfiable?” Which
means, “can we find a specific value for every variable that the formula F = 1?”. For
instance, formula F(a, b) = (a + b) * (a′ + b) * (a + b′) * (a′ + b′) in Boolean logic is
not satisfiable. But this formula is 3-satisfiable, which means that when we remove any
single one of the four OR-terms from the product F(a, b) above, the formula would be
satisfiable. For instance, formula F1(a, b) = (a + b) * (a′ + b) * (a + b′) = (a + bb′)
(a′ + b) = a(a′ + b) = ab, thus for a = 1 and b = 1 the formula is satisfied. This fun-
damental problem has hundreds applications in real life engineering problems that can
be reduced to it. Problems such as optimizing digital designs, and also practical life
problems such as finding the best escape routes from some territory after Nuclear Plant
disaster.
SAT Problem can be also reduced to CSP. Similarly, CSP problems can be reduced
to SAT. One more problem of CSP type is a crypto arithmetic problem: SEND +
MORE = MONEY in which we have to substitute digits 0–9 for letters S, E, N, D, M,
O, R, Y in an unique mapping (a mapping function) such that the symbolic equation
above is converted to a valid arithmetic addition on digits. This toy problem is a
simplification of similar problems in cryptography, a research area with huge military
and security impacts. The same way as the SAT Problem, graph coloring, or any CSP
problem, this problem can be solved using an oracle, in our case a hardware oracle. For
this kind of problems, the oracle is built from logic gates AND, OR, NOT, logic blocks
such as predicates (A = B) or (A > C) and arithmetic blocks such as adders and
multipliers.
Building oracles in reversible logic is the fundament of quantum Grover algorithm.
The oracle is problem-dependent and even problem-instance dependent. Quantum
algorithms are circuits from quantum gates. A quantum oracle is the heart of Grover
circuit, other gates in this circuit are always the same, easy and well-known. Practically,
applying Grover Algorithm to a new problem means to design an oracle for the
constraint satisfaction problem to be solved. When we know how to build the oracle in
Boolean Logic and using standard arithmetic, we can convert the Boolean circuit of the
oracle to a quantum oracle in reversible logic just by a conversion of Boolean gates and
blocks to equivalent reversible logic gates such as Toffoli, Fredkin and Feynman and
“reversible blocks” such as a quantum adder.
6 M. Perkowski

Reversible functions are mathematical functions which are one-to-one mappings of


input vectors to output vectors and vice versa. If a function to be mapped is not
reversible, which is frequently the case in oracles, it can be mapped to reversible gates
and blocks but it requires ancilla qubits. Most Boolean Functions (single or multiple-
output) are not reversible, but building quantum oracles we want to realize them with
quantum gates that are reversible. This means that we need to add ancilla qubits
initialized to 0 or 1, to be able to perform this mapping. Therefore, what we call
“reversible gates” and “reversible blocks” are not reversible functions in mathematical
sense because many of them require ancilla qubits. Thus they may correspond to
mathematical Boolean functions that are not reversible, but allow the designer familiar
with classical digital design of combinational circuit to use immediately his knowledge
to build optimized and tricky quantum oracles [11, 15].
Let us make a strong point here, that the very idea of hardware oracle is much more
than a Grover Oracle and quantum circuits. One can build a Boolean circuit of the
oracle in FPGA [2, 26, 44] and find as the solution to this hardware oracle the input
vectors which lead to satisfaction F = 1 observed on oracle’s output. Oracles are thus
hardware devices to solve the inverse function problem that is known in many areas of
mathematics and practical applications. Very little is published about using oracles in
hardware with logic circuits that are different than quantum reversible oracles. Grover
Algorithm [9] uses oracles built from various quantum reversible gates, plus blocks
such as quantum adders or quantum comparators built from quantum gates. Grover
algorithm gives a quadratic speedup over classical exhaustive search algorithms for the
same problem. Although other quantum algorithms such as the Shor Algorithm [19]
give exponential speedup, Grover Algorithm is very important because very many
problems of big practical importance can be reformulated for Grover, and not that many
problems can be reduced to Shor Algorithm. Several publications of various authors
found solutions to important problems based on Grover Algorithm but the authors
usually do not build these oracles from gates so that they cannot evaluate their practical
complexity. They just show that this can be done by formulating for instance circuits as
unitary matrices. In contrast, work of our PSU team designs the oracles in detail,
bottom-up and using practical and experimentally verified “truly quantum gates” [23]
or “quantum reversible” gates and blocks [3, 8, 11, 12, 15, 16, 21–24, 29, 32, 45].
When one realizes that the fundamental, most important idea in Grover Algorithm
is to find the inverse function, one can realize that quantum is not the only technology
in which we can build efficient oracles and obtain speedup of algorithms when com-
pared to classical circuits, classical algorithms or parallel algorithms. One naive method
would be to build the oracle in classical Boolean logic with standard Boolean gates and
logical/arithmetical blocks. Next this oracle could be exercised (exhaustively or ran-
domly) from input to output. Whenever the output equal value 1 is found, the state of
the binary input vector gives the solution to the constraint satisfaction problem
described by the oracle. Although this method was used in several designs [2, 26, 44],
it is harmed by the very slow speed when solving problems of practical size, like those
SAT problems encountered in industrial CAD applications. This is because for the
Boolean function of n variables in the worst case the oracle needs to be evaluated 2n
times (for each of its minterms representing the Boolean function that corresponds to
this oracle). Minterms for a Boolean function of n variables are products of all n literals
Inverse Problems, Constraint Satisfaction, Reversible Logic, Invertible Logic 7

of this function. True minterms are those for which value of the function is 1. Circuits
with quantum oracles are better that classical Boolean circuits because they operate
using quantum parallelism and quantum superposition - on all vectors being potential
solutions at the same time (all minterms). Thus quantum oracle iterated sufficiently
many times as part of the “Grover Loop” highly increases the probability of finding one
of the solutions in a single measurement of all input qubits together with the output
qubit of the Boolean function realized in the oracle. Grover Algorithm implemented in
quantum circuits gives a quadratic speedup when compared to exhaustive classical
circuit (algorithm) for the same problem.
Recently a new and very powerful concept was found in the area of recursive Deep
Neural Networks (DNN) and this is the idea of Invertible Logic [5, 6, 17, 18, 20, 27].
This logic can be realized with magnetic spins [6], but it can be also emulated using
FPGAs (sacrifying speed, FPGAs used mainly for verification). So far very few
applications of this idea were published and they are reduced to adders, multipliers,
number factorization [14] and one class of neural networks [10]. In contrast, here we
present a unified methodology to solve CSP and optimization problems by building and
exercising oracles that can be realized very similarly in Quantum and Invertible Logic.
Let us compare three types of logic realized in circuits:
1. Classical Boolean combinational logic
2. Reversible (permutative) logic as used in quantum oracles
3. Invertible Logic of Supriyo Datta et al.
Classical Boolean logic propagates signals from inputs to outputs. In inverse
problems we want to find the input vectors with the given output value (like F = 1
here). Thus if we want to find solutions to non-trivial inverse problems about which we
have no additional information (the proverbial “Unsorted Database” in Grover case) we
have to go through all or many input combinations before we find the input vector for
which F = 1. Creating the binary input vectors, the solution candidates for this pro-
cedure can be done with a sequential counter or with a random number generator
(RNG) such as LFSR on the input to the oracle circuit.
For a motivating example, let us assume that the oracle circuit of function F2 is just
a tree of two-input AND gates with 64 inputs in total, but the function (or its circuit) is
not known to the observer. To find this function, the oracle in classical logic would be
evaluated 264 number of times, which is an astronomical number. Grover Algorithm
would evaluate the oracle “only” 2^ (64/2) = 232 times which may be also not practical.
However, in Invertible logic in which one propagates the signals from output to inputs,
the Invertible Logic method would need only one evaluation of the oracle realized with
invertible gates. The main principle is that the Invertible Logic Gates can propagate
signals in any direction. In Invertible Logic a two-input C = AND(A, B) gate with
output fixed to C = 1 creates the input value “1” on both its inputs: A = 1, B = 1.
Therefore in we start from output F2 = 1 in the above 64-input tree of AND gates,
value 1 will be propagated from the function F2 output to previous levels of the tree
and ultimately will create values 1 on all 64 inputs without backtracking and in one
value propagation process. If one gives value 0 to the output of two-input AND
invertible gate, on inputs the sequence (A, B) = (0, 0), (0, 1) and (1, 0) appears in
random order, because the values (A, B) = (0, 0), (0, 1), (1, 0) all create a 0 on the
8 M. Perkowski

output of classical AND gate. Thus if one gives value 0 on the function F2 output in
this example, the circuit realized in Invertible Logic will create sequentially (randomly
and with repetitions) all 264 − 1 primary input that produce F2 = 0. Concluding,
Invertible Logic allows to find solutions to all kinds of CSP problems and for some of
them it can find a solution faster than the quantum algorithm of Grover. Active research
is on technologies in which this logic can be practically realized [1, 4–6, 17, 20, 25].
Next section will relate classical Boolean Oracles, Quantum and Invertible Logic
oracles, and how to design them in an uniform way, methodologically and efficiently.

3 Classical Boolean Oracles

3.1 Cryptoarithmetic Example and Discussion of TWO + TWO = FOUR


Oracle
Our first larger example is to build classical Boolean Logic Oracle [2, 44]. To evaluate
the standard FPGA realization of a classical Boolean Logic Oracle we used the crypto-
arithmetic problem TWO + TWO = FOUR. Each letter of this symbolic equation can
be substituted with values 0–9. The purpose of our oracle is to find all possible
solutions to this problem. In other words, we look for all binary input combinations to
this oracle that satisfy all partial constraints. The research problems are: (1) is how to
build such oracle, (2) how to exercise this oracle from a Generator, (3) how to build the
Generator, (4) How to select the best overall design of the Generator-Verifier system
that would minimize the cost and maximize the speed.
Let us discuss few strategies how to solve this problem. Mathematically this
problem can be formulated as follows. Given are sets L = {T, W, O, F, U, R} and
D = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9). Find a mapping L ! D such that 8 l1, l2 2 L [MAP(l1)
6¼ MAP(l2)] and all arithmetic constraints of addition TWO + TWO = FOUR are
satisfied. The naive solution dictated directly by the problem formulation is this. We
create a tree [49] with all 10 combinations for node with letter T in first tree level, next
for every node of the second level we create all 10 combinations for letter W, next the
same is done for letter O and so on. The tree will have 6 levels and the branching factor
for every level is 10. Thus we will have to check 106 = 1,000,000 cases for arithmetic
correctness in the Oracle. A better idea is to observe that in standard notation for
addition formulas the value of F cannot be a 0. Moreover, it is obvious that it must be a
1. Therefore we have now not 6 letters but only 5 letters T, W, O, F, U, R for
substitutions. We also know that F = 1, so now our tree will have 5 levels, with
branching factor 9 where we select for every letter one of {0, 2, 3, 4, 5, 6, 7, 8, 9}. This
leads to 59,049 cases of leafs of the tree, they are the mappings to be verified with use
of arithmetic constraints in the Oracle. This simple common sense trick gave us a big
gain in the size of the solution space, from = 1,000,000 to 59,049. Next observation is
that while in the first level we branch for 9 letters, in the next level we should branch
for 8, next for 7, etc. So in total the number of leaves of the tree will be
98765432 = 15,120. Further reduction. In this case the trick was trivial, but in
general it can be much more sophisticated. Our design goal for any type of oracle is to
reformulate the problem in order to build a better generator and a better Oracle to
Inverse Problems, Constraint Satisfaction, Reversible Logic, Invertible Logic 9

decrease the size of the solution space as much as possible. After this redesign, the tree
would still generate solutions with more than one digit assignment for letters, a large
redundancy. Thus, instead of generating Cartesian Product {0, 2, 3, 4, 5, 6, 7, 8,
9}5 = {0, 2, 3, 4, 5, 6, 7, 8, 9}  {0, 2, 3, 4, 5, 6, 7, 8, 9}  {0, 2, 3, 4, 5, 6, 7, 8,
9}  {0, 2, 3, 4, 5, 6, 7, 8, 9}  {0, 2, 3, 4, 5, 6, 7, 8, 9} we generate combinations
without repetitions of five out of nine, which is 9!/(9 − 5)! = 15,120. A more
sophisticated reasoning can lead in this particular problem to finding a solution without
much search that can be done “by hand”. This reasoning leads for instance to solution
734 + 734 = 1468, which means T = 7, O = 4, W = 6, R = 8. If we want however to
create a general method for solving ALL this kind of puzzles, we reason differently.
Our goal is to create a generator for the binary oracle that will create systematically all
possible “combinations without repetitions of five out of nine” for letters T, W, O, U, R.
(Pay attention that F is already mapped to 1 so it does not appear in the set of letters).
As usually, the entire problem is solved by the Generator and the Oracle (Verifier). In
this case the Selector and the Permuter (plus generator of carries C1 and C2) are the
Generator Part and the Arithmetic Checker is the Oracle (combinational circuit).
Observe that in general the boundary between generation and verification is not fixed
and some parts can be shifted from generator to verifier, the trick that is used in
quantum oracles and Invertible Logic Oracles.

b) T W O

a)
+ T W O
F O U R

Fig. 1. (a) Schematics of the TWO + TWO = FOUR Generator (Selector and Permuter) and
Oracle (Arithmetic Checker). Additional blocks Memory and HexDisplay are also shown from
FPGA realization. The answers for the problem are displayed on a LCD display. (b) The
representation of the TWO + TWO = FOUR problem that helps to create equations for the
oracle of this problem.

The purpose of the oracle is to select a value for every letter from set {T, W, O, U,
R}. In numerical terms, this means we verify all candidates that are “five out of nine
combinations without repetitions” of digits 0, 2, 3, 4, 5, 6, 7, 8, 9 assigned to vector <T,
W, O, U, R>. All candidates for mapping are like this: <T, W, O, U, R> = <0, 2, 3, 4,
5>, <T, W, O, U, R> = <0, 2, 3, 5, 4> ,…, <T, W, O, U, R> = <5, 6, 7, 8, 9>. The
generation of all candidate solutions for the Oracle can be done by selecting subset of
five letters (binary codes of letters) out of nine and then doing all their permutations.
There is still a problem remaining how to generate the set of all solutions based on
combinations of five out of nine without repetitions. This must be done in the most
efficient way, possibly with one solution candidate at every clock cycle of the counter
(Generator), a requirement of optimality formulated in [26]. Schematic of our oracle is
shown in Fig. 1. There are three major blocks in our oracle: the Selector, the
10 M. Perkowski

Permuter, and the Arithmetic Checker (Oracle). In the practical FPGA design, there
are also smaller circuits in order to store and display the combinations: the RAM
(memory) module, the RAM counter, and the LCD display module. This
generator/oracle combination is an improved, optimized version of our previous oracle-
based designs for this and similar problems (SEND + MORE = MONEY). Opti-
mization is the result of a redesign aimed at reducing the size of the space of all
potential solutions. This limits the search, as explained in our “methodology” in
Sect. 3.2. The space reduction explained here is equally applicable to quantum and
Invertible Logic oracles.
To follow the above presented idea, the Selector from Fig. 1 is decomposed to two
blocks: the (sequential) Counter and the (combinational) Multiplexers. The counter
gives its outputs to the multiplexers (see Fig. 4). The Counter block of the Selector
simply counts up in the given modulo. The Counter block is decomposed to five Small
Counters (shown schematically as rectangles at the top of Fig. 4). Each of the small
counters has three outputs. In the problem of TWO + TWO = FOUR, since there are
five unique letters, the counter counts modulo 5 and the largest vector for every Small
Counter is 4 (selection states are 000, 001, 010, 011, and 100). Figure 2 shows the
beginning of the sample count sequence generated by the Counter to be used by the
Multiplexers inside the Selector block.

Fig. 2. Sample count sequence for the selector counter. In the actual circuit, the output signal is
3 bits, so that a value of 2 (in T = 6) is actually 010. Thus in time T = 6 the sequence generated
on output of selector has 5 * 3 = 15 bits and is 010 000 000 000 000.

The outputs of each Small Counter (Fig. 5) are then directly connected to control
the corresponding multiplexer located at the bottom of Fig. 4. Each multiplexer has
only five data inputs coming from top of the counter. The particular inputs to every
multiplexer are selected for it in different way. The multiplexers are controlled with
three bits each, coming from the left of MUX schematics. These signals come from
respective Small Counters from the top. Figure 3 shows initial steps of the resulting
output sequence generated by the entire Selector circuit.
Inverse Problems, Constraint Satisfaction, Reversible Logic, Invertible Logic 11

Fig. 3. Sample beginning of the sequence of combinations of five out of nine without
repetitions, generated by the Selector circuit. Each digit has 4 bits. For instance, 9 = 1001,
5 = 0101, 0 = 0000. Thus the output of the Selector has 5 * 4 = 20 bits, as shown on bottom of
Fig. 4.

The purpose of the Permuter (Fig. 6) is to permute in all possible ways the values
given by the Selector from Fig. 4. This allows for all possible number to letter com-
binations to be tested (as the selector does not repeat any set of numbers). Much like we
discussed for the Selector, in Permuter there are the Counter1 and Multiplexer1
blocks. (This follows a general principle of designing advanced Generators). The
Counter1 consists of 5 normal counters which select which of the inputs to use. The
Multiplexer1 contains the inputs of each of the numbers selected (from Selector). It
then goes through a 4C5, 3C4, and 2C3 to gradually lessen the input for each further
multiplexer. Figure 7 explains how signals C2, C1, C0 that control MUXes to select
input data in Fig. 6 are generated. Recall that C3 = F so C3 is not used as input
variable in the oracle. Figure 8 shows part of the sequence generated by the Permuter.

Fig. 4. Schematics of Selector composed of the Counter and Multiplexers circuits. The first
from left MUX selects between values 5, 4, 3, 2, 0. The second from left MUX selects between
values 6, 5, 4, 3, 2. The third from left MUX selects between values 7, 6, 5, 4, 3. The fourth from
left MUX selects between values 8, 7, 6, 5, 4. The right MUX selects between values 9, 8, 7, 6, 5.
The binary sequence on output of the selector has 5 * 4 = 20 bits. Above the sequence 0100
0110 0111 1000 1001 = 4 6 7 8 9 is shown.
12 M. Perkowski

Fig. 5. A single Small Counter out of five shown on top of Fig. 4. It counts in code 000, 001,
010, 011, 100. Its three-bit output out3 goes to respective multiplexer in block Multiplexers.

Fig. 6. Internals of the Permuter block. This circuit generates all permutations of data received
on inputs. The inputs on top come from the Selector. The outputs at the bottom go to the
Arithmetic Checker block from Fig. 10. Each of the five MUXes has 5 data inputs, 4 bits each.
These MUXes are controlled but the 3-bit control C2, C1, C0. On bottom we see 5 small
rectangles which represent counters, 4 bits each. At the left of Fig. 6 we see the encoded controls
C2, C1, C0 and the corresponding actions of this Permuter that is the so-called “Generalized
Register” type of “Micro-controlled Processor”. Above we show the case of controlling MUXes
with C2C1C0 = 000.
Inverse Problems, Constraint Satisfaction, Reversible Logic, Invertible Logic 13

Fig. 7. Explanation of the Finite State Machine Master to generate control variables C2, C1, C0.
C1 and C0 are also used as inputs to Oracle.

Fig. 8. Part of the sequence of all permutations of set {1, 2, 3, 4, 5} generated by the Permuter.

The purpose of the Arithmetic Checker is to check the arithmetic validity of the
solution proposed by the Generator using the outputs of the Permuter. The arithmetic
checker was designed just by converting arithmetic equations derived from the
TWO + TWO = FOUR problem. Figure 9 shows the derived equations.

Fig. 9. Equations derived from the TWO + TWO = FOUR problem.


14 M. Perkowski

The equations shown in Fig. 9 come from each column for the TWO + TWO =
FOUR problem (Fig. 1b). In this problem, it is assumed that F has to equal 1, not 0.
This is because if the value was 0, there is no need for a letter. It is also noticed that
carry positions were added, similar to the handwritten method of addition. The
Arithmetic Checker (Fig. 10) strictly follows the equations, by replacing the ‘+’, ‘*’,
and ‘=’ operators with their respective arithmetic and predicate blocks.

Fig. 10. Complete Arithmetic Checker Oracle circuit. The inputs are binary encodings of letters
T, W, O, F, U, R, the constants 1, 2 and 10 and intermediate binary variables C1 and C2 (not
discussed in more detail). This oracle is far from minimal logical design but it explains the
general method to create oracles from arithmetic/Boolean equations. It can be optimized using
methods from logic synthesis and digital design.

The RAM Module. Although when the circuits described above can make a complete
oracle, there is no way for a user to know what the successful combinations are. In
order to show what the combinations are, there first needs to be any type of memory to
store the successful combinations. This is done on the FPGA by utilizing its RAM
(Random Access Memory). The circuit used for the RAM of the FPGA is based on the
concept of vectors. In a vector, information can be inserted, as well as removed
according to a reference number. The circuit first stores the successful combinations
(combinations with an Arithmetic Checker output of 1) into the vector. In the post-
processing stage, the combinations in the vector can be displayed to the user by the
RAM Counter.

Fig. 11. Concept of a vector used for memory in the TWO + TWO = FOUR oracle.
Inverse Problems, Constraint Satisfaction, Reversible Logic, Invertible Logic 15

The RAM Counter. In order to cycle through all of the solutions to the problem, a
counter is required. The counter used to do the task is very similar to a normal counter,
incrementing its value by 1, but it has an adjustable limit. This limit is imposed on the
counter such that the counter won’t go to empty cells in the vector, leaving the counter
only counting the solutions.
The LCD Display. The LCD Display is required in order to display the solutions.
Without it, the user will not be able to see what the calculated answers are. The circuit
for the LCD is fairly simple; the output from the RAM is displayed on the LCD. Only
the initialization of special ports (to turn on the backlight and other functions) is
required.

3.2 Experimental Results for the TWO + TWO = FOUR Problem


The experiment of the “TWO + TWO = FOUR Problem” is a comparison between two
methods: a hardware optimized implementation of the oracle, and a software imple-
mentation of an arbitrary oracle. The hardware implementation is run on a Terasic DE2-
115 board, while the software implementation is run on a laptop with an Intel Core i5
CPU clocked at 2.40 GHz. These methods are compared for speed, or in this case, the
time it takes to find all solutions for the same given problem. Counters are implemented
in both the hardware and software oracles, yielding for more accurate results. The
answers of the hardware program are verified by the software program. The solutions
are: 938 + 938 = 1876, 928 + 928 = 1856, 867 + 867 = 1734, 846 + 846 = 1692,
836 + 836 = 1672, 765 + 765 = 1530, 734 + 734 = 1468. Since the Selector,
Permuter, and Arithmetic Checker operate under one clock pulse, theoretically stating,
without glitches in the circuit, it would take n clock pulses to go through n combinations.
The circuit has to go through 9C5 combinations, and from that number of combinations,
it has to go through 5P5 permutations. Solving it would figure out how many clock
pulses it would take in order to complete. Let us derive the number of clock pulses
required to solve the problem: ð9 C5 Þð5 P5 Þ ¼ ð126Þð120Þ ¼ 15; 120. The number of
clock pulses is then converted into time. 1 MHz is equivalent to 1000 kHz. Since the
clock on the DE2-115 is 50 MHz, it is equivalent to 50(1000) = 50,000 kHz. There is a
formula of 1/(KHz) which converts Kilohertz to milliseconds. Substituting 50,000 into
the equation, 1/50,000 is the result, the number of milliseconds per cycle. The number of
cycles, 15120, is multiplied to the factor, receiving 0.3024 as an answer, stating that the
computational time is 0.3024 ms. Theoretical predictions were perfectly verified in
experiments [2].

Table 1. Comparison of an oracle for hardware and software in terms of computational time for
TWO + TWO = FOUR.
Hardware (predicated) in Hardware (actual) in Software in
milliseconds milliseconds milliseconds
Trial 1 0.3024 0.3024 1105886
Trial 2 0.3024 0.3024 1136322
Trial 3 0.3024 0.3024 1136897
Average 0.3024 0.3024 1126368
16 M. Perkowski

From the data shown in Table 1, it can be concluded that the software computa-
tional speed was significantly slower than that of both hardware times. Also, the
hardware computational times were equivalent, therefore showing no signs of error in
calculation. In the average computational time comparison, the software took
1126368 ms to calculate, while the hardware only took a small fraction of 0.3024 ms.
Thus, from the data, the hardware has around 3724762 speed up time.
In conclusion of the TWO + TWO = FOUR experiment, the hardware imple-
mentation of the oracle performed significantly faster than the software implementation
in terms of computational time. For all trials tested, the hardware performed over three
million times faster than the software equivalent. The results of the predicted hardware
time and the actual hardware time were the same. Each trial always took exactly
0.3024 ms to calculate. This is because the circuits implemented in the FPGA operate
on every clock pulse, and it is very rare for the clock pulse to have a glitch. Thus, the
computational time of the FPGA can be proven by hand. There were no sources of
error while taking data, as the timers were implemented on the respective systems.
However, there can be lots of improvements to the experiment that could be made. First
of all, the software tested is for an arbitrary amount of problems, meaning that it is very
inefficient. Therefore, in order to have more accurate data, a specific oracle for the
TWO + TWO = FOUR problem needs to be made. Also, the clocks of both systems
are different (50 MHz on the FPGA versus 2.4 GHz on the computer). If one were to
measure the ratio of FPGA speed-up, the clocks would have to be equivalent.
We can observe that this problem can be solved differently without creating carry
variables C1, C2, C3 in Fig. 9. In the second variant the decimal adder can be designed
with binary-encoded digits and with internal binary carry signals that are not consid-
ered as input variables to the oracle. The oracle is not created as in Fig. 10 based on
equations from Fig. 9, but is just the adder with two inputs (T1, W1, O1) and (T2, W2,
O2) and outputs (F, O3, U, R). This adder realizes equation (T1, W1, O1) + (T2, W2,
O2) = (F, O3, U, R). But now in this second variant additional constraints are needed:
T1 = T2, W1 = W2, O1 = O2 = O3. This is a common tradeoff when designing
Generator-Oracle systems. While we call the first variant of oracle as shown here the
“Oracle with Control of Intermediate Signals”, the second type of the oracle we call the
“Oracle without Control of Intermediate Signals”, in this case carries C1, C2 and C3 are
these intermediate signals. Observe that in this variant we do not use sequential gen-
erator. All knowledge is in combinational oracle, which makes it a good candidate for
Grover oracle and for Invertible Logic Oracle. Both oracle types can have some
advantages and disadvantages, depending on the problem. These two design types of
oracles illustrate again the tradeoff that we deal with when designing efficient oracles.

3.3 Concluding on Boolean Oracles and Their Relation to Quantum


Oracles and Invertible Logic Oracles
Boolean Oracles realized in FPGAs are useful for problems for which the designer has
no information and no heuristics to solve the problem. There exists also no other than
exhaustive algorithm for these types of problems (in some problems dynamic pro-
gramming may be better, so there is in these cases no reason to create our type of
“unsorted database” approach based on generators and oracles). Under these conditions
Inverse Problems, Constraint Satisfaction, Reversible Logic, Invertible Logic 17

classical hardware oracles are better than software programs for small problems.
However, in case of large problems these oracles cannot be used because of the size of
hardware to exercise systematically and exhaustively all possible input combinations.
In software some efficient search algorithm can be used that will execute cuts in tree
branches early and can backtrack efficiently. For problems that have many solutions,
good design of the oracle plus good design of the generator help to solve problems [2]
that are difficult to solve otherwise, but still not too large in size. Tricks as those
illustrated in Sect. 3.1 are therefore used. Other good solution that may be helpful for
some problems is to design generators as special counters that count in advanced codes
that correspond to depth-first or breadth-first searches. Any sequences of binary vectors
can be simply created by adding large ROMs at outputs of standard counters. Con-
cluding, there is some combination of the problem size and problem type for which
hardware oracles based on classical logic are practical, realistic solutions. They may be
realized in ASIC, FPGA or any new nano-technology such as memristors.
Please note that designing classical generator/oracle systems is fundamental to our
general methodology. This is because the oracle concept is the base of our “CSP
methodology of problem-solving in hardware”. It is only a technical aspect to translate
Boolean oracles to reversible logic used in quantum computing or to invertible logic
used in magnetic spins. These are the two technologies that will prove useful to solve
these problems in future when the number of reliable qubits in quantum computers will
increase, and when larger Invertible Logic circuits with magnetic spins will be built. At
this time the ideas presented in this paper will become useful not only to better solve
toy problems as used for illustration here, but also to solve quickly practical problems
of large size.
The theoretical base to create quantum and Invertible Logic oracles already exists.
Actually, the literature presents many solutions to reversible/quantum arithmetic blocks
such as adders, multipliers, shifters, code converters, comparators and others. Thus
converting classical logic/arithmetic blocks to reversible blocks for Grover or other
Quantum Algorithm can be automated. General Boolean functions that can appear in
some oracles are more difficult to convert because in quantum the EXOR-based circuits
are better while in classical design the OR-based circuits are better. However, there are
many methods to convert SOP-based logic to EXOR-based logic such as Exclusive-Or-
Sum-of-Products (ESOP) [13]. Observe also that converting combinational Boolean
circuit to Invertible Logic is theoretically trivial because Hamiltonians are known for
every two-input binary gate ([4] and many papers by Biamonte), and Hamiltonians are
also known for many other gates and blocks such as adders and multipliers. There exist
also methods to realize arbitrary Hamiltonians built from smaller Hamiltonians.

3.4 General Methodology for Oracle Design


While designing a binary oracle the designer has to ask himself first – “what is the
problem type that I want to solve?” Knowledge of these problem types and blocks used
to solve them is very helpful. Let us explain the essence of this question. For any
realization of the oracle, especially quantum and classical, we need some generator that
would create a set of input vectors to exercise the oracle. In Grover Algorithm the
vector of Hadamard gates serves as this generator of all possible binary strings being
18 M. Perkowski

solution candidates. We want to reduce the size of the input vectors in order to reduce
(often dramatically) the size of the entire solution space and the cost and operation time
of the oracle. Knowing the type of the problem helps to find good encoding of data and
as the result helps to reduce the cost and increase the speed. Below we discuss this
problem.
Observe that starting from |0〉 the Hadamard gate creates superposition of |0〉 and
|1〉. Two Hadamard gates working in parallel create a superposition of |00〉, |01〉, |10〉
and |11〉, in another variant of Dirac’s notation |0〉, |1〉, |2〉 and |3〉. Therefore
n Hadamard gates working in parallel generate all binary numbers from 0 to 2n−1. We
can see that the parallel vector of Hadamard gates is a “quantum generator” of all
numbers from 0 to 2n−1. But also, assuming that the individual bits of these numbers
represent presence or absence of an item in the set of n elements, these numbers
represent all possible subsets of the set with n elements. For two-element set, like this: |
00〉 = empty set {}, |10〉 = {a}, |01〉 = {b}, |11〉 = {a, b}. Therefore, as also known
from Grover and quantum algorithms, the vector of Hadamard gates is a quantum
generator of all subsets of a set. This is used in Grover Oracles and also in other
quantum algorithms such as Bernstein–Vazirani. This property of Hadamard operator
leads to natural design of oracles in which we look for a solution being a subset of the
set [2, 49]. For instance, when the designer wants to find the best partition of a set to
two subsets X and Y, every binary vector represents a subset of bits with value 1 as
subset X and a subset of elements with value 0 as subset Y. The oracle evaluates if this
separation to two subsets satisfies all constraints. The same method can be used to
design oracles which look for a mapping from a set to a set. Several algebraic systems,
such as the “Partition Calculus” [12, 15, 16, 47] and “Cube Calculus” [46] are based
hierarchically on set operations and relations. Therefore these algebraic systems can use
the natural Hadamard-based encoding of solution candidates that are verified by con-
straints [21, 22, 30]. For instance, several important problems in CAD and Machine
Learning can be solved using only two basic operations on set partitions from Partition
Calculus; operator P1  P2 which finds the product of partitions, and relation (predi-
cate) P1  P2. These problems include Ashenhurst-Curtis Decomposition [12], Bi-
Decomposition, State Minimization, Concurrent State Minimization and Encoding,
ROM-based design and other.
In addition to algebraic models, it is important how the variables (symbols) are
encoded in various binary codes. Some problems may require other than standard
methods of information encoding, for instance using “one-hot encoding” or “ther-
mometer encoding” of numbers (data). Therefore, the first question is this: “what is my
problem type and how should I encode the data”. As an example, when we solve the
graph theory problems we may encode nodes while treating edges as pairs of nodes. Or
we can encode edges as bits in a set-theoretical representation with as many qubits as
edges in our graph. We can also encode a graph as a binary incidence matrix. Per-
mutation problems such as Traveling Salesman or Generalized Traveling Salesman
would require to deal with permutations. Few standard ways of dealing with permu-
tations have been created [8, 15, 31]. One method is to treat the binary input vector of
numbers as a single permutation of natural numbers with k successive bits for a number
and to use constraints that will not allow the repeated numbers to be considered as
solution candidates [31]. Other method to solve permutation problems with oracles is to
Another random document with
no related content on Scribd:
has sido tan amada, y separarte de estos chicos que has criado y que
como a madre te miran?...
El padre Alelí fijó en ella sus ojos, ávidos de leer en los de la joven
lo que de su alma saliese al rostro, si es que algo salía. El buen fraile
que a pesar de su decrepitud, ocasionada a perturbaciones mentales
conservaba algo de su antigua penetración, creyó ver en Sola una
pena muy viva. Esto le hacía sonreír, diciendo para su sayo: «mujercita
tenemos».
—Don Benigno no se casará —dijo ella—. ¿Será posible que caiga
en tan mala tentación? Yo de mí sé decir que si salgo de esta casa me
moriré de pena; tan tranquila, tan considerada y tan feliz he vivido en
ella. Y luego, estos diablillos del cielo, como yo les llamo; estos
muchachos, a quienes quiero tanto sin ser míos, y no tengo mejo
gusto que ocuparme de ellos... No, digo que don Benigno no se
casará. Sería un disparate; ya no está en edad para eso.
—¿Qué dices ahí, tontuela? —exclamó Alelí incorporándose con
enojo—. ¿Conque mi amigo no está en edad de casarse? ¿Es acaso
algún viejo chocho? ¿Está por ventura enfermo? No, más sana y
limpia está su persona y su sangre noble que la de todos esos
mozuelos del día.
Esto decía, cuando Juan Jacobo, cansado de estarse quieto tanto
tiempo y no teniendo interés en la conversación, empezó a tirarle de
los bigotes al gato, que dormido estaba en la falda del fraile. Sentirse
el animal tan malamente interrumpido en su sueño de canónigo y
empezar a dar bufidos y a sacar las uñas, fue todo uno. Alborotose e
fraile con los rasguños, y dio un coscorrón al chico; Sola le aplicó dos
nalgadas, y todo concluyó con enfadarse el muchacho y coger el gato
en brazos y marcharse con él a un rincón, donde le puso el sombrero
del mercedario para que durmiera.
—Eso es, sí, está mi sombrero para cama de gatos —refunfuñó
Alelí.
—¡Jesús qué criatura!... Le voy a matar —dijo Sola amenazándole
con la mano—. Trae acá el sombrero.
Juan trajo el sombrero, y aprovechándose del interés que en la
corversación tenían el fraile y la joven, rescató su molinillo y su
bandeja y bajó a la tienda para escaparse a la calle.
—Vaya con la tonta —dijo Alelí continuando su interrumpido tema
—. ¡Si Benigno es un muchacho, un chiquillo...! ¡Si me parece que fue
ayer cuando le vi arrastrándose a gatas por un cerrillo que hay delante
de su casa...! ¡Qué piernazas aquellas, qué brazos y qué manotas
tenía! ¡Y cómo se agarraba al pecho de su madre, y qué mordidas le
daba el muy antropófago! Yo le cogía en brazos y le daba unos
palmetazos en los muslos... Sabrás que fui al pueblo a restablecerme
de unas intermitentes que cogí en Madrid cuando vine a las elecciones
de la Orden. Entonces conocí al bueno de Jovellanos, un Voltaire
encubierto, dígase lo que se quiera, y al conde de Aranda, que era un
Pombal español, y a mi señor don Carlos III, que era un Federico de
Prusia españolizado...
—Al grano, al grano.
—Justo es que al grano vayamos. Cuando Nicolás Moratín y yo
disputábamos...
—Al grano.
—Pues digo que Benigno es un mozalbete. ¿No ves su arrogancia
su buen color, sus bríos? Bah, bah... Oye una cosa, hijita: Benigno se
casará, tú te quedarás sola, y entonces será bien añadir a tu nombre
otra palabra, llamándote Sola y Monda en vez de Sola a secas. Pero
aquí viene bien darte un consejo... ¿Sabes, hija mía, que me está
entrando un sueño tal, que la cabeza me parece de plomo?
—Pues deme su reverencia el consejo y duérmase después —
repuso ella con impaciencia.
—El consejo es que te cases tú también, y así, del matrimonio de
Benigno no podrá resultar ninguna desgracia... ¡Qué sueño, santo
Dios!
Sola se echó a reír.
—¡Casarme yo!... Qué bromas gasta el padrito.
—Hija, el sueño me rinde... no puedo más —dijo Alelí luchando con
su propia cabeza, que sobre el pecho se caía, y tirando de sus propios
párpados con nervioso esfuerzo para impedir que se cerraran cua
pesadas compuertas.
—Otro cigarrito.
—Sí..., chupetón..., humo —murmuró Alelí, cuya flaca naturaleza
era bruscamente vencida por la necesidad del reposo.
XIII

Sola corrió a buscar el despertador, y a su vuelta encontró al pobre


religioso más que medianamente dormido, la cabeza inclinada a un
lado, la boca entreabierta, roncando como un viejo y sonriendo como
un niño. No quiso despertarle, aunque tenía curiosidad por saber en
qué pararía aquel asunto del casamiento de su protector. Sospechaba
la intención del fraile y todo el intríngulis de aquella conferencia
cortada por el sueño, y se reía interiormente, considerando los rodeos
y la timidez de su protector.
Acomodó la cabeza del anciano en la almohada, le puso una manta
en las piernas para que no se enfriase, y le dejó dormir. Sentada en
una silla al pie de La Creación, le miró mucho, cual si en el semblante
frailesco estuvieran estampadas y legibles las palabras que Alelí había
dicho y las que no había tenido tiempo de decir. Profundo silencio
reinaba en el comedor. Oíase, sin embargo, el paseo igual y sereno de
la péndula y un roncar lejano, profundo, que tenía algo de la trompa
épica, y era la melopea del sueño de doña Crucita, cantada en tonante
estilo por sus órganos respiratorios. Los del reverendo Alelí no
tardaron en unir su voz a la que de la alcoba venía, y sonando primero
en aflautados preludios, después en rotundos períodos, llegaron a
concertarse tan bien con la otra música, que no parecía sino que e
mismo Haydn había andado en ello.
Entre las dos ventanas de la pieza, que recibían de un patio la poca
luz de que este podía disponer, había un armario lleno de loza fina, tan
bien dispuesta, que bastaba una ojeada para enterarse de las distintas
piezas allí guardadas. Las copas, puestas en fila y boca abajo
sustentando cada cual una naranja, parecían enanos con turbante
amarillos. En todas las tablas, las cenefas de papel recortado caían
graciosamente formando picos como un encaje, y de este modo los
arabescos de la loza tenían mayor realce. Algunas cafeteras y jarras
echaban hacia fuera sus picos como aves que, después de toma
agua, estiran el cuello para tragarla mejor, y las redondas soperas se
estaban muy quietas sobre su plato, como gallinas que sacan pollos
En el chinesco juego de té que regalaron a don Benigno el día de su
santo, las tacitas puestas en círculo, semejando la empolladura recién
salida y piando junto a la madre. Un alto y descomedido botellón, cuya
boca figuraba la de un animalejo, era el rey de toda aquella
muchedumbre porcelanesca; diríase que amenazaba a las piezas
vasallas con cierta ley escrita en el fondo de una fuente. Era un letrero
dorado que decía: «Me soy de Benigno Cordero de Paz. Año de
1827».
Junto al armario había una silla de tijera, en la cual estaba Sola con
los brazos cruzados. Miraba a Alelí, a la lámpara de cuatro brazos, a
La Creación, al monumento de Toledo y al suelo cubierto de estera
común. También fue objeto de sus miradas el aguamanil, cuya
llavecita, un poco desgastada, dejaba caer una gota de agua a cada
diez oscilaciones de la péndula. La caja de latón en que estaba e
agua tenía pintado un pajarillo picando una flor, con tan desdichado
arte, que más bien parecía que la flor se comía al ave. También miraba
Sola al techo, donde había cuatro ligeras manchas de humo
correspondientes a los cuatro quinquets de cada uno de los brazos de
la lámpara. Tales manchas eran las únicas nubes que empañaban e
azul de aquel cielo de yeso, que en verano se estrellaba de moscas.
A todas estas partes dirigía la joven sus ojos, cual si estuviese
buscando sus pensamientos perdidos y desparramados por la
estancia. Creeríase que habían salido a holgar, volando como
mariposas a distintos parajes, y que su dueña los iba recogiendo uno a
uno, o dos a dos, para traerlos a casa y someterlos al yugo de
raciocinio.
Y así era en efecto. Ella tenía que concertar algo en su cabeza y
discurrir. Convidábanla a ello la soledad en que estaba y la suave
sombra que empezaba a ocupar el comedor, dominando primero los
ángulos, el techo, y extendiéndose poco a poco y avanzando un paso
al compás de los que daba la péndula. Las voces, o dígase ronquidos
se apagaron un momento, cual si los músicos que las producían
descansasen para tomar más fuerza. La de doña Crucita empezó
luego a crecer, a crecer, desafiando a la del padre Alelí. La de este
sonaba entonces en el registro del caramillo pastoril, y parecía
convidar a la égloga con su gorjeo cariñoso.
Y en tanto, el murmullo de Crucita se tornaba de llamativo en
provocador y de provocador en insolente, cual si decir quisiera: «en
esta casa nadie ronca más que yo».
Indudablemente Sola discurría con muy buen juicio en medio de
estas músicas. Pensaba que era un disparate vivir tanto tiempo en un
mundo quimérico. La edad avanzaba; la juventud, aunque todavía
rozagante y lozana en ella, había dejado ya atrás una buena parte de
sí misma. Su vida marchaba ya muy cerca de aquel límite en que
están la razón y la prudencia, las posibilidades y las prosas, de ta
modo que las ilusiones se iban quedando atrás envueltas en brumas
de recuerdos, mal iluminados por la luz vespertina de esperanzas
desvanecidas. La fantasía se cansaba de su trabajo estéril, de aquella
fatigosa edificación de castillos llevados del viento y descompuestos
en aire como las bovedillas de la espuma, que no son más que juegos
del jabón, transformándose por un instante en pedrería de mil matices
Llegaba doña Sola y Monda a la edad en que parece verificarse en la
mente un despejo de todas las jugueterías y figuraciones que traemos
de la niñez, y queda aquel aposento de nuestro espíritu limpio de las
telarañas, que parecen tapices por capricho de la luz filtrada.
El sentimiento de la realidad empezaba a hacer en ella su tardía y
radical conquista, y así sentía la imposición ineludible de ciertas ideas
¿Cómo vivir más tiempo por y para un fantasma? ¿Cómo subordina
toda la existencia a lo que tal vez no tenía ya existencia real, o si la
tenía estaba tan distante que su alejamiento equivalía al no existir?
¿No podía suceder que, sin quererlo ella misma, se destruyesen en su
alma ciertos afectos, y que de las ruinas de estos nacieran otros con
menos intensidad y lozanía, pero con más condiciones de realidad y
firmeza?
Tan abstraída estaba, que no advirtió cuán bravamente aceptaba la
voz del padre Alelí el reto de los lejanos bramidos de doña Crucita, y
dejando el tono pastoril, iba aumentando en intensidad sonora hasta
llegar a un toque de clarines que habrían infundido ideas belicosas a
todo aquel que los oyera. Los cañones respiratorios del reverendo
decían seguramente en su enérgico lenguaje: «cuando yo ronco en
esta casa, nadie me levanta el gallo». Acobardada y humillada por tan
marcial alboroto, doña Crucita se recogió y se fue aplacando, hasta
que su música no fue más que un murmullo como el de los perezosos
beatos que rezan dentro de una vasta catedral, y luego se cambió en
el sollozo de las hojas de otoño arrancadas por el viento y bailando
con él.
A su vez, el victorioso ronquido de Alelí remedó el fagot de un coro
de frailes, y después dejo oír varias notas vagas, suspironas, fugitivas
como los murmullos del órgano cuando el organista pasa los dedos
sobre el teclado en tanto que el oficiante le da con sus preces la seña
de empezar. La música roncadora se había hecho triste, coincidiendo
con la oscuridad casi completa que llenaba la pieza.
Pero el alma de doña Sola y Monda no estaba triste. Había echado
una mirada al porvenir y lo había visto placentero, tranquilo, honroso y
honrado. Su corazón, al declararse vencido por las realidades un poco
brutales, como conquistadoras que eran, no estaba vacío de
sentimientos, antes bien se llenaba de los afectos más puros, más
delicados, más nobles. La vida nueva que se le ofrecía, debía
inaugurarse, eso sí, con un poco de tristeza; pero ¡cuánta dignidad en
aquella nueva vida!, ¡qué hermoso realce en la personalidad!, ¡qué
ocasión para mostrar los más nobles sentimientos, tales como la
abnegación, la constancia, la fidelidad, el trabajo!, ¡qué ocasión para
perfeccionarse constantemente y ser cada día mejor, realizando e
bien en todas las formas posibles y gozando en el sostenimiento de
esa deliciosa carga que se llama el deber!
¿Pero qué estruendo, qué fragor temeroso era aquel que Sola
sentía tan cerca y que interrumpía sus discretos pensamientos en lo
mejor de ellos? Sonaban ya sin duda las trompetas del Juicio final
pues no de otro modo debían llamarse los destemplados y altísonos
ronquidos de Crucita y el padre Alelí. Los de este se detuvieron
bruscamente, cual si fuera a despertar, y oyose su voz que entre
sueños decía:
—Vete, vete de mi celda, terrible democracio... ¿Qué buscas aquí?
¿a qué vienes a España y a Madrid, si no es a que te ahorquen?..
¡Vuélvete a la emigración de donde jamás debiste salir!..
¡Conspirador..., vagabundo!
Doña Sola y Monda se acercó al fraile para oír mejor lo que entre
dientes seguía diciendo.
Alelí extendió los brazos, quedándose un buen rato como un
crucifijo en sabroso estiramiento de músculos, y con voz clara y entera
dijo así:
—Esproncedilla..., busca-ruidos..., mequetrefe, no me
comprometas..., vete de mi celda.
Sola se acercó y le tomó una mano.
—¿Pero qué osscuridad es esta? ¿En dónde estoy?
—¡Vaya un modo de dormir y de disparatar! —replicó Sola riendo.
—¿Pues qué, he dormido yo?... Si no he hecho más que
aletargarme un instante, cinco minutos todo lo más... Vaya, que se
pone pronto el sol en esta dichosa casa... Chiquilla, dame m
sombrero, que me voy.
—Primero voy a traer luz —dijo la Hormiga saliendo.
Al poco rato volvió con una lámpara, cuyos rayos ofendieron la vista
del fraile.
—Yo creí que ya habían empezado a crecer los días... ¿Qué hora
es? Las cinco y media... Lo dicho, dicho, querida señorita..
¿Reflexionarás en lo que te he manifestado?
—¿Pues qué he de hacer sino reflexionar?
—¿Y comprenderás que se te entra por las puertas la fortuna, y que
vas a ser la más dichosa de las mujeres?
—Pues claro que sí.
—¡Bendita seas tú y bendito quien te trajo a esta casa! —exclamó
Alelí con acento muy evangélico.
Abriose con no poco estrépito la puerta del comedor, y apareció
Crucita de malísimo talante, diciendo:
—No he podido pegar los ojos en toda la tarde con la dichosa
conversación de la niña y el fraile.
—Quita allá, Cruz del Mal Ladrón —replicó Alelí—. Lo que ha sido
es que con la trompeta de tus roncamientos no me has dejado a m
descabezar un mal sueño.
—Sí, porque a fe que el padrito toca algún cascabelillo sordo
cuando duerme... Me habéis tenido toda la tarde despabilada como un
lince, primero con la charla de sus mercedes y luego con los
piporrazos de su reverencia... ¡Qué importunidad, Santo Dios! Busque
usted un momento de tranquilidad en esta casa.
—Cállate, serpiente del Paraíso, que así guardas silencio dormida
como despierta, y no hables de eso, que el que más y el que menos
todos, todos repicamos, y abur.
Echáronse a reír Sola y el fraile, y al fin también se rio un poco
Crucita, pues su genio arisco también tenía flores de cuando en
cuando, si bien estas eran como las plantas marinas, que están en e
fondo y casi siempre en el fondo mueren.
XIV

En la tienda, don Benigno preguntó con gran interés a su amigo po


el resultado de la conferencia que con Sola había tenido.
—Muy bien —dijo Alelí—, admirablemente bien.
Después se quedó perplejo, con los ojos fijos en el suelo y el dedo
sobre el labio, como revolviendo en el caótico montón de sus
recuerdos; y al cabo de tantas meditaciones, habló así:
—Pues, hijo, ahora caigo en que no llegué a decirle lo más
importante, porque me acometió un sueño tal, que no lo hubiera
podido vencer aunque me echaran encima un jarro de agua fría... Ya la
tenía preparada; ya, si no me engaño, había ella comprendido e
objeto de mi discurso, y manifestaba un gran contento por la felicidad
que Dios le depara, cuando... Yo no sé sino que me desperté en la
oscuridad de tu comedor, que parece la boca de un lobo... Y qué
quieres, hijo..., lo demás puedes decírselo tú, o se lo diré yo mañana
Quédate con Dios y con la Virgen.
Marchose Alelí, y don Benigno se quedó muy contrariado y ofendido
de la poca destreza de su amigo. Juró no volver a confiar misiones
delicadas a un viejo decrépito y medio lelo, y al mismo tiempo se
sentía él muy cobarde para desempeñar por sí mismo el papel que
había confiado al otro. Cuando subió, después de cerrar la tienda, en
compañía de Juan Jacobo, que había entrado de la calle con un
chichón en la frente, dijo a Sola:
—Ya estoy convencido de que ese estafermo de Alelí es el bobo de
Coria... Apreciabilísima Hormiga, quisiera hablar con usted...
—¿Hablar conmigo?... Ahora mismo; ya escucho —dijo ella
sonriendo de tal modo que a Cordero se le encandilaron los ojos.
Pero en el mismo instante le acometió la timidez de tal modo, que
no se atrevió a decir lo que decir quería, y solo balbució estas
palabras:
—Es que conviene ponerle a este enemigo una venda y dos cuartos
sobre el chichón, que es el mejor medio de curarlo.
Aquella noche don Benigno estuvo muy triste y se pasó algunas
horas en su cuarto, sin leer a Rousseau, aunque bien se le acordaba
aquel pasaje del libro quinto del Emilio:

«Emilio es hombre, Sofía es mujer... Sofía no enamora a


primer golpe de vista, pero agrada más cada día. Sus encantos
se van manifestando por grados en la intimidad del trato. Su
educación no es ni brillante ni estrecha. Tiene gusto sin estudio
talento sin arte, y criterio sin erudición... La desconformidad de
los matrimonios no nace de la edad, sino del carácter...».

Y luego añadía, alterando un poco el texto:

«Sofía había leído el Telémaco, y estaba prendada de él; pero


ya su tierno corazón ha cambiado de objeto y palpita por el buen
Mentor».

Después Cordero se reía de sí mismo y de su timidez, haciendo


juramento de vencerla al día siguiente, pues lo que él sentía era un
afecto decoroso, un sentimiento de gratitud y de respeto, y no pasión
ni capricho de mozalbete.
Al día siguiente, Sola mostraba excelente humor que rayaba en
festivo, lo que dio muy buena espina al héroe de Boteros. Canturreaba
entre dientes, cosa que no hacía todos los días, y en su cara se
notaba animación, si bien podía observarse que tenía los ojos algo
encendidos. Sin duda había visto y aceptado la posibilidad de un
destino nuevo, honrado y honroso en extremo, y se complacía en él
creyéndolo dispuesto por Dios con extraordinaria sabiduría. Pero si no
se entra en la vida sin llanto, también parece natural que no se entre
en las felicidades nuevas sin algo de lágrimas. Los nuevos estados
aunque sean muy buenos y hermosos, no siempre seducen tanto que
hagan aborrecible la situación vieja por detestable que haya sido. De
aquí venía, sin duda, el que estando de tan buen humor, tuviese en lo
encendido de sus ojos el testimonio de haber lloriqueado algo.
O quizás la alegría que mostraba venía más bien de la voluntad que
del corazón, como si su espíritu, tan hecho a la observancia de los
deberes, hubiese resuelto que convenía estar alegre. La razón sin
duda lo mandaba así, y la razón iba siendo la señora de ella... No hay
más sino que se dominaba maravillosamente, y lograba alcanzar tan
grande victoria sobre sí misma, que era al fin, si es permitido decirlo
así, un producto humano de todas las ideas razonables, una
conciencia puesta en acción.
Su protector le dijo que aquella tarde se verían los dos en su cuarto
para hablar a solas. El héroe se atrevía al fin. Prometió ella se
puntual, y esperó la hora. Pero Dios, que sin duda por móviles
altísimos o inexplicables quería estorbar los honestos impulsos de
héroe, dispuso las cosas de otra manera. Ya se sabe lo que significan
todas las voluntades humanas cuando Él quiere imponer la suya.
Sucedió que poco antes de la hora de comer, Juanito Jacobo
todavía vendado por los chichones del día anterior, andaba enredando
con una pelota. Trabáronse de palabras él y su hermano Rafaelito
sobre a quién pertenecía el tal juguete. Hay indicios y aun
antecedentes jurídicos para creer que el verdadero propietario era e
pequeñuelo, y así debió sentirlo en su conciencia Rafael; que tanto
imperio tiene la justicia en la conciencia humana aunque sea
conciencia en agraz.
Pero de reconocerlo en la conciencia a declararlo, hay gran
distancia, y si tal distancia no existiera, no habría abogados ni curiales
en el mundo. Por eso Rafael, no sintiéndose bastante egoísta para
apandar la pelota, ni bastante generoso para dejársela a su rival, hizo
lo que suelen hacer los chicos en estas contiendas, es a saber; cogió
la pelota y la arrojó a lo alto del armario del comedor, donde no podría
ser alcanzada ni por uno ni por otro.
¡Valiente hazaña la de Rafaelito!... Pero el pequeño Hércules no
había nacido para retroceder ante contrariedades tan tontas. ¡Bonito
genio tenía él para acobardarse porque el techo esté más alto que e
suelo!... Arrastró el sillón hasta acercarlo al armario; puso sobre e
sillón una silla, sobre la silla una banqueta, y ya trepaba él por aquella
frágil torre, cuando esta se vino al suelo con estruendo, y rodó el chico
y se abrió la cabeza contra una de las patas de la mesa.
El laberinto que se armó en la casa no es para descrito. Salió don
Benigno, acudió Sola, puso el grito en el cielo Crucita, ladraron todos
los perros, maldijo la criada todas las pelotas habidas y por haber, lloró
Rafael, gimieron sus hermanos, y el herido fue alzado del suelo sin
conocimiento. Pronto volvió en sí, y la descalabradura no parecía
grave, gracias a la mucha sangre que salió de aquella cabezota. En
tanto que Sola batía aceite con vino, y la criada, partidaria de otro
sistema, mascaba romero para hacer un emplasto, doña Crucita, que
en todas estas ocasiones se remontaba siempre al origen de los
conflictos, repartía una zurribanda general entre los muchachos
mayores, azotándoles sin piedad uno tras otro. Los perros seguían
chillando, y hasta la cotorra tuvo algo que decir acerca de tan
memorable suceso.
Toda la tarde duró la agitación y nadie tuvo ganas de comer, porque
el muchacho padecía bastante con su herida. Vino el médico y dijo
que, sin ser grave, la herida era penosa y exigía mucho cuidado. No
hubo, pues, conferencia entre Cordero y Sola, porque la ocasión no
era propicia. Por la noche Juanito Jacobo se durmió sosegadamente
Sola, que en la misma pieza puso su cama, estaba alerta vigilando a
enfermito. Ya muy tarde se despertó este intranquilo, calenturiento
pidiendo de beber y quejándose de dolores en todo el cuerpo. Sola se
arrojó del lecho medio vestida, y echándose un mantón sobre los
hombros salió para llamar a la criada. Levantose esta, y entre las dos
prepararon medicinas, encendieron la lumbre, fueron y vinieron por los
helados pasillos. A la madrugada, cuando el chico se durmió, a
parecer sosegado y repuesto, Sola sintió un frío intensísimo con
bruscas alternativas de calor sofocante. Arrojose en su lecho y a
punto sintió una postración tan grande que su cuerpo parecía de
plomo. La respiración érale a cada instante más difícil, y no podía
resistir el agudo dolor de las sienes. La tos seca y profunda añadía
una molestia más a tantas molestias, y en su costado derecho le
habían seguramente clavado un gran clavo, pues no otra cosa parecía
la insufrible punzada que la atormentaba en aquella parte.
La criada, que al punto conoció lo grave de tales síntomas, quiso
llamar a don Benigno y a Crucita; pero Sola no consintió que se les
molestara por ella. Era la madrugada. Mientras llegaba el día, la
alcarreña preparó no sé cuántos sudoríficos y emolientes, sin
resultado satisfactorio. Al fin, cuando daban las siete, Crucita dejó las
ociosas plumas, y enterada de lo que pasaba, reprendió a la enferma
por haberse puesto mala voluntariamente; que no otra cosa significaba
el haber tomado aires colados, hallándose, como se hallaba desde
hace días, con un catarro más que regular. La avinagrada señora echó
por la boca mil prescripciones higiénicas para evitar los enfriamientos
y otros tantos anatemas contra las personas que no se cuidaban
Cuando Cordero se levantó, Crucita, que gozaba en anunciar los
sucesos poco gratos, fue a su encuentro y le dijo:
—Ya tenemos otro enfermo en campaña. Sola se ha puesto muy
mala.
—¿Qué tiene? —dijo el héroe con repentino dolor, como
presagiando una gran desgracia.
—Pues una pulmonía fulminante.
Si lo partiera un rayo, no se quedara don Benigno más tieso, más
mudo, más parado, más muerto que en aquel momento estaba. Creía
ver su dicha futura, sus risueños proyectos desplomándose como un
castillo de naipes al traidor soplo del Guadarrama.
—Veámosla —dijo recobrando la esperanza; y corrió a la alcoba.
Sola le miró con cariñosos y agradecidos ojos. Quiso hablarle, y la
violenta tos se lo impedía. Nada pudo decir don Benigno, porque
indudablemente el corazón se le había partido en dos pedazos, y uno
de estos se le había subido a la garganta. Al fin hizo un esfuerzo
quiso llenarle de optimismo, y echó una forzada sonrisa diciendo:
—Eso no será nada. Veamos el pulso.
¡Ay!, el pulso era tal que Cordero, en la exaltación de su miedo
creyó que dentro de las venas de Sola había un caballo que
relinchaba.
—Que venga don Pedro Castelló, el médico de Su Majestad —dijo
sin poder contener su alarma—. Que vengan todos los médicos de
Madrid... Veamos, apreciable Hormiga: ¿desde cuándo se sintió usted
mal?
—Desde ayer tarde —pudo contestar la joven.
—¡Y no había dicho nada!... ¡Qué crueldad consigo mismo y con los
demás!
—¡Ya se ve..., no dice nada!... —vociferó Crucita—. ¡Bien merecido
le está!... ¿Hase visto terquedad semejante? Esta es de las que se
morirán sin quejarse... ¿Por qué no se acostó ayer tarde, por qué?
¡Bendito de Dios, qué mujer! Si ella tuviese por costumbre, como es su
deber, consultarme, yo le habría aconsejado anoche que tomara un
buen tazón de flor de malva con unas gotas de aguardiente... Pero ella
se lo hace todo y ella se lo sabe todo... Silencio, Otelo... Vete fuera
Mortimer... No ladres, Blanquillo.
Y en tanto que su hermana imponía silencio al ejército perruno, e
atribulado don Benigno elevaba el pensamiento a Dios Todopoderoso
pidiéndole misericordia.
Sin pérdida de tiempo hizo venir al médico de la casa, y a todos los
médicos célebres, precedidos por don Pedro Castelló, que era la
primera de las celebridades.
XV

Mientras que esto pasaba en casa del vendedor de encajes, doña


Jenara y Pipaón andaban atortolados por el ningún éxito de sus
averiguaciones, y los días iban pasando y la sombra o fantasma que
ambos perseguían se les escapaba de las manos cuando creían
tenerla segura. El terrible democracio albergado en la Trinidad resultó
ser el más inocente y el más calavera de todos, hombre que jamás
haría nada de provecho fuera de las hazañas en el glorioso campo de
arte; gran poeta que pronto había de señalarse cantando dolores y
melancolías desgarradoras. No sabiendo cómo lo recibiría la
Superintendencia, acogiose a los frailes trinitarios por indicación de
Vega, que en aquella casa cumplió seis años antes su condena
cuando el desastre numantino. Influencias de su familia y amigos le
consiguieron pronto el indulto, y decidido a ser en lo sucesivo todo lo
juicioso que su índole de poeta permitiera, solicitó una plaza en la
Guardia de la Real Persona, que le fue concedida más adelante.
Bretón, desesperado por las horribles trabas del teatro, marchó a
Sevilla con Grimaldi, autor de la Pata de cabra. Vega, que luchaba con
la pobreza y era muy perezoso para escribir, quería hacerse cómico y
aun llegó a ajustarse en la compañía de Grimaldi. Considerando esto
los amigos como una deshonra, pusieron el grito en el cielo; pero
como los lamentos no podían sacar al poeta de sus apuros, fue
preciso echar un guante para rescatarle, por haber cobrado con
anticipación parte del sueldo de galán joven. Grimaldi era un
empresario hábil que sabía elegir la gente, y en su memorable
excursión por Cádiz y Sevilla, dio a conocer como actriz de grandísima
precocidad a una niña llamada Matilde, que a los doce años hacía la
protagonista de La huérfana de Bruselas con extraordinario primor.
En Madrid, después de la marcha de Grimaldi, el teatro se
alimentaba de traducciones. Algunas de estas fueron hechas por un
muchacho carpintero, de modestia suma y apellido impronunciable
Era hijo de un alemán, y hacía sillas y dramas. Fue el primero que
acometió en gran escala la restauración del teatro nacional, para saca
al gran Lope del polvoriento rincón en que Moratín y los clásicos le
habían puesto, juntamente con los demás inmortales del siglo de oro
El infeliz ebanista, que no podía ver representadas sus obras
originales, traducía a Voltaire y a Alfieri, refundía a Rojas y al buen
Moreto. Pero su mala estrella no le permitió abrirse camino ni hace
resonar su nombre en la república literaria. Pocos años después, la
víspera del estreno de su gran obra original, que le llevó de un golpe a
las alturas de la fama, el lenguaraz satírico de la época, e
malhumorado y bilioso escritor a quien ya conocemos, decía: «Pues s
el autor es sillero, la obra debe de tener mucha paja». El enrevesado
nombre del ebanista nacido de alemán y criado en un taller, fue, desde
que se conocieron Los amantes de Teruel, uno de los más gloriosos
que España tuvo y tiene en el siglo que corre.
Y el satírico seguía satirizando en la época a que nos referimos
(1831); mas con poca fortuna todavía, y sin anunciar con sus escritos
lo que más tarde fue. Se había casado a los veinte años, y su vida no
era un modelo de arreglo ni de paz doméstica. Recibió protección de
don Manuel Fernández Varela, a quien se debe llamar El Magnífico po
serlo en todas sus acciones. Su corazón generoso, su amor a la
esplendidez, a las artes, a las letras, a todo lo noble y antivulgar, su
trato cortesano, las cuantiosas rentas de que dispuso, hacían de él un
verdadero prócer, un Mecenas, un magnate, superior por mi
conceptos a los estirados e ignorantes señorones de su época, a los
rutinarios y suspicaces ministros. Era la figura del señor Varela
arrogante y simpática, su habla afabilísima y galante, sus modales
muy finos. Vestía con magnificencia, y adornaba el severo vestido
sacerdotal con pieles y rasos tan artísticamente, que parecía una
figura de otras edades. En su mesa se comía mejor que en ninguna
otra, de lo que fueron testimonio dos célebres gastrónomos a quienes
convidó y obsequió mucho. El uno se llamaba Aguado, marqués de las
Marismas, y el otro Rossini, no ya marqués, sino príncipe y emperado
de la Música.
El señor Varela protegió a mucha y diversa gente, distinguiendo
especialmente a sus paisanos los gallegos; fundó colegios, desecó
lagunas, erigió la estatua de Cervantes que está en la plazuela de las
Cortes, ayudó a Larra, a Espronceda y dio a conocer a Pastor Díaz.
Cuando vino Rossini en marzo de aquel año, le encargó una misa
Rossini no quería componer misas... «Pues un Stabat Mater», le dijo
Varela. El maestro compuso en aquellos días el primer número de su
gran obra religiosa que parece dramática. El resto lo envió desde e
extranjero. Cuentan que Varela le pagó bien.
Algunos números del célebre Stabat se estrenaron aquella Semana
Santa en San Felipe el Real, dirigidos por el mismo Rossini, y hubo
tantas apreturas en la iglesia, que muchos recibieron magulladuras y
contusiones, y se asfixiaron dos o tres personas en medio del tumulto
Rossini fue obsequiado, como es de suponer, atendida su gran fama
Tenía próximamente cuarenta años, buena figura, y su hermosa cara
un poco napoleónica, revelaba, más que el estro músico y el aire de la
familia de Orfeo, su afición al epigrama y a los buenos platos.
Habiendo recibido en un mismo día dos invitaciones a comer, una
del señor Varela y otra de un grande de España, prefirió la del primero
Preguntada la causa de esta preferencia, respondió:
—Porque en ninguna parte se come mejor que en casa de los
curas.
En efecto: la mesa de este generoso y espléndido sacerdote era la
mejor de Madrid. A sus salones de la plazuela de Barajas concurría
gente muy escogida, no faltando en ellos damas elegantes y
hermosas, porque, a decir verdad, el señor Varela no estaba por e
ascetismo en esta materia.
Pero allí la opulencia del señor y su misma gravedad de eclesiástico
no permitían la confianza y esparcimientos de otras tertulias. La de
Cambronero, por el contrario, era de las más agradables y divertidas
dentro de los límites de la decencia más refinada.
Era el señor don Manuel María Cambronero varón dignísimo, de
altas prendas y crédito inmenso como abogado. Durante muchos años
no tuvo rival en el foro de Madrid, y todos los grandes negocios de la
aristocracia estaban a su cargo. Fue en su época lo que
posteriormente Pérez Hernández y más tarde Cortina. Su señora era
castellana vieja, algo chapada a la antigua, y sus hijos siguieron
diversos destinos y carreras. Uno de ellos, don José, casó por aquellos
años con Doloritas Armijo, guapísima muchacha, cuyo nombre parece
que no viene al caso en esta relación, y, sin embargo, está aquí muy
en su lugar.
El primer pasante de Cambronero era un joven llamado Juan
Bautista Alonso, a quien el insigne letrado tomó gran cariño, legándole
al morir sus negocios y su rica biblioteca. Alonso, que más tarde fue
también abogado eminente, político y filósofo de nota, tuvo en su
mocedad aficiones de poeta, y, por tanto, amistad con todos los poetas
y literatos jóvenes de la época. Él fue, pues, quien introdujo en las
agradabilísimas y honestas tertulias de Cambronero a Vega
Espronceda, Felipe Pardo, Juanito Pezuela, y, por último, a
misántropo, al que ya se llamaba con poca fortuna Duende satírico, y
más tarde se había de llamar Pobrecito hablador, Bachiller Pérez de
Murguía, Andrés Niporesas, y, finalmente, Fígaro.
El entrometido Pipaón iba también a casa de Cambronero. Jenara
sin que se supiese la causa, había disminuido considerablemente sus
tertulias; recibía poquísima gente, y solo daba convites en muy
contados días. En cambio, frecuentaba la tertulia de Cambronero
donde hallaba casi todo el contingente de la suya, y además otras
personas que no había tratado hasta entonces; tales como don Ánge
Iznardi, don José Rives, don Juan Bautista Erro, el conde de Negri y
otros varios.
También se veía por allí al joven Olózaga, pasante, como Alonso
en el bufete de Cambronero, si bien menos asiduo en el trabajo
Desde los principios del año andaba Salustiano tan distraído, que no
parecía el mismo. Iba a las reuniones como por compromiso o po
temor de que al echarse de menos su persona, se le creyese
empeñado en conspiraciones políticas. Su mismo padre, don
Celestino, se quejaba de sus frecuentes ausencias de la casa. Ta
conducta no podía atribuirse sino a dos motivos: política o amores. La
familia y los conocidos, inclinándose siempre a lo menos peligroso
presumían que Salustiano andaba enamorado. Su buena figura, su
elocuencia, sus distinguidos modales, la misma exaltación de sus
ideas políticas y otras prendas de mucha estima, dándole desde su
tierna juventud gran favor entre las damas, justificaban aquella idea.
De repente, Jenara dejó de asistir también con puntualidad a las
tertulias. El público, que todo lo quiere explicar según su especia
modo de ver, comentó aquellas ausencias con cierta malignidad, y
hasta hubo quien hablara de fuga al extranjero en busca de apartadas
y placenteras soledades, propicias al amor. Se daban pormenores, se
referían entrevistas, se repetían frases, y, sin embargo, todo esto y lo
demás que se dijo y que no es para contado, era un castillo aéreo
levantado por las delicadas manos de la chismografía. Pero acontece
que tales obras, con ser de aire, son mucho más fáciles de levanta
que de destruir, y aquella iba tomando consistencia de día en día y
alzándose más, y engalanándose con torreones de epigramas y
chapiteles de calumnias.
XVI

Mediaba el mes de marzo cuando estas hablillas llegaron a su más


alto grado. Jenara no recibía a nadie; pero no estaba enferma, porque
a menudo se la veía en la calle o paseando en coche, y visitando a
personajes de alto copete.
Un día se encontraron ella y Pipaón en la antesala de la Comisión
Militar. Jenara salía, Pipaón entraba. Eran las cinco de la tarde, hora
excelente para el paseo en aquella estación.
—Iba a su casa de usted —le dijo don Juan—, para prevenirla de
peligro que corre...
—¡Yo! —exclamó la dama con gesto de orgullo—. ¿También yo
corro peligro?
—También.
—¿Y por qué?
—Salgamos de esta caverna, señora, que si en todas partes oyen
las paredes, aquí oyen las ropas que vestimos, hasta la sombra que
hacemos sobre el suelo. Vámonos.
—¿Qué hay? —dijo la señora extraordinariamente alarmada—
Quiero ver a Maroto.
—No recibe ahora... Salgamos y hablaremos. Principiaré diciendo a
usted que hemos errado en todos nuestros cálculos. Buscábamos a
nuestro amigo en casa de Cordero, en el convento de la Trinidad, en la
cárcel de Corte, en el parador de Zaragoza, en el sótano de la botica
de la calle de Hortaleza, en la habitación del jefe del guardamangier de
palacio, y ahora resulta que no estaba en ninguno de estos parajes
sino...
—¿En dónde, en dónde?
—Salgamos de esta casa, señora —añadió Pipaón poniendo el pie
en el último peldaño.

You might also like