Predictive Maintenance at the Edge: An Embedded Anomaly Detection Pipeline Trained with Quantum Optimization
This article presents a predictive-maintenance pipeline that detects anomalies in bearings from vibration signals, adapted for deployment at the edge on low-cost microcontrollers, and that uses quantum optimization in two steps of its training. The pipeline consists of a step of vibration feature extraction and a step of classification with a one-class support vector machine (OCSVM). The features are selected by minimum redundancy and maximum relevance (mRMR) with the variational quantum eigensolver (VQE), under a limit on computing time. The OCSVM is adapted for inference at the edge without floating-point operations and is trained by a variational quantum algorithm with Pauli-correlation encoding (PCE). In small-scale tests on a simulator, with the Paderborn bearing dataset, the VQE found the optimal selection in 36% of the runs with Adam, and PCE chose better support vectors than chance, until a classical local search made the two equal. A classical baseline, the usual OCSVM trained by SMO with its weights rounded, matched them without any search.
Read more →
Superdense Coding Simulator
Superdense coding is a quantum communication protocol in which Alice sends two classical bits to Bob by transmitting a single qubit, taking advantage of a previously shared entangled pair. In this app, the user chooses the bits that Alice should send, and the app displays the quantum circuit of the communication between Alice and Bob, simulates it and presents the measurement results. It is also possible to simulate the intervention of an eavesdropper (Eve) intercepting the transmitted qubit.
Read more →
Quantum Computing in Logistics
One of the areas in which applied quantum computing seems promising is combinatorial optimization, which covers many real logistics problems. This article (originally written in Portuguese) presents logistics problems such as vehicle routing and facility location, and quantum optimization methods that can be applied to them: Grover Adaptive Search (GAS), Quantum Annealing (QA), the Quantum Approximate Optimization Algorithm (QAOA) and Bias Field Digitalized Counterdiabatic Quantum Optimization (BF-DCQO).
Read more →
Remembering handwritten digits with a Hopfield Network
Hopfield Networks are a type of recurrent neural network that function as associative memory systems, with the key ability to store stable patterns that can be retrieved from partial or noisy inputs. In this notebook, a Hopfield Network is trained to remember handwritten digits (MNIST dataset).
Read more →
SAMSA
SAMSA is an educational and non-commercial app that can be used to demonstrate the Traveling Salesman Problem (TSP) and its solution process using the Ant Colony Optimization (ACO) metaheuristic algorithm. In this app, the user can input or generate a set of entry points, configure the ACO parameters, and the app will handle finding and presenting the solution to the TSP instance. Once the solution is found, it is possible to visualize the path taken by the traveling salesman, as well as the evolution of the ACO states throughout the optimization epochs.
Read more →
Solving the Traveling Salesman Problem with Ant Colony Optimization
Ant Colony Optimization (ACO) is a metaheuristic algorithm that performs well in solving path optimization problems, such as the Traveling Salesman Problem (TSP), by simulating the behavior of ants searching for food. In this notebook, ACO is implemented and explored as a TSP solver.
Read more →
Solving the Traveling Salesman Problem with Simulated Annealing
This notebook addresses the Traveling Salesman Problem (TSP), which seeks the shortest possible route for a salesman to visit a set of cities and return to the starting point. It uses the Simulated Annealing algorithm, a probabilistic technique inspired by the annealing process in metallurgy, to explore potential solutions and efficiently find a near-optimal route.
Read more →
Smart image cropping with Seam Carving (tutorial)
Seam Carving is an image processing algorithm that resizes images by removing or inserting paths of pixels ('seams') with the least visual importance, preserving key content while reducing size. Ideal for smart cropping and aspect ratio adjustments.
Read more →
DLQ — A Programming Language Project for Quantum Computing
DLQ (Declarative Language for Quantum) is a small declarative programming language for quantum computers, developed as my undergraduate final project in Computer Engineering. This article (originally written in Portuguese) gives an overview of quantum computing, presents the conception, syntax and logic of DLQ with examples of boolean satisfiability and prime factorization solved with Grover's algorithm, describes the DLQpiler compiler (lexical analysis, parsing and quantum circuit synthesis) and discusses future improvements of the project.
Read more →
DLQ - Projeto de linguagem de programação de alto nível de abstração para computação quântica
In this end-of-course work, a declarative programming language was developed, with a high level of abstraction and easy to learn, for the programming of quantum computers. The language, baptized as DLQ (Declarative Language for Quantum), has as main elements: numerical variables; arithmetic, logical and relational operators; and finally, terminator statements. Throughout this paper, the quantum circuits corresponding to each of these elements, the grammar of the language, and the process of compiling the codes are explained in detail. Code examples in the language and final considerations about the work done are presented in the last chapters.
Read more →
A Siamese CNN + KNN-Based Classification Framework for Non-intrusive Load Monitoring
Through the development of smart grids, programs such as demand side response, have been presented as auxiliary services to the real-time operation of distributed networks. In order to provide consumers information on their energy consumption, so that a modulation in consumption is possible, non-intrusive load monitoring has been introduced as an solution to this pattern recognition problem. Non-intrusive load monitoring enables the modeling of electrical loads connected to the low-voltage system, considering only a single measurement point. Presented state-of-the-art solutions though, consider availability of data as well as representation of all possible classes of the environment. This is of course a most conservative hypothesis, since in real-life applications availability of such data is much difficult, as well as the dynamic behavior of models is implicitly evolving in time. In this work a framework that uses neural Siamese networks with k-nearest neighbor clustering is presented toward non-intrusive load monitoring. Online learning feature is implemented, which relaxes the hypothesis of data requirements as well addresses the evolving nature of load profile. k-nearest clustering allows nonlinear characteristic space modelling. Test results using synthetics and real-life data show that the solution, besides obtaining a good generalizability in the classification, also obtained results with an accuracy of 95.77%.
Read more →
The “Hello World” of Quantum Computing
A practical introduction to quantum programming with Python and the Qiskit SDK. In this article (originally written in Portuguese), a quantum circuit with a Hadamard gate and a Controlled-NOT gate is built with Qiskit to generate a Bell state, a state of two entangled qubits, and then simulated, with the interpretation of the measurement results.
Read more →
Quantum Algorithm based on Quantum Fourier Transform for Register-by-Constant Addition
Since Shor's proposition of the method for factoring products of prime numbers using quantum computing, there has been a quest to implement efficient quantum arithmetic algorithms. These algorithms are capable of applying arithmetic operations simultaneously on large sets of values using quantum parallelism. Draper proposed an addition algorithm based on the quantum Fourier transform whose operands are two quantum registers, which I refer to as register-by-register addition. However, for cases where there is the need to be added a constant value to a target register, Draper's algorithm is more complex than necessary in terms of number of operations and number of qubits used. In this paper, I present a more efficient addition algorithm than Draper's for cases where there needs to be added just a constant to a target register.
Read more →
Quantum Logic Gates
Quantum logic gates are the analog of digital logic gates in quantum computing, being responsible for modifying and entangling the states of qubits. This article (originally written in Portuguese) starts from classical logic gates and circuits, introduces the linear algebra concepts behind quantum gates (unitary matrices, self-adjoint operators, etc.) and presents the main quantum logic gates, such as the Pauli gates, the rotations Rx, Ry and Rz, the Hadamard gate and controlled gates.
Read more →
Qubits, the Bits of Quantum Computing
Qubits are to quantum computing what bits are to classical computing. This article (originally written in Portuguese) first discusses how information is represented classically, with bits, and then explains qubits and quantum information, covering qubit states, the Bloch sphere, phase, quantum registers and entangled qubits.
Read more →
Graphs and Algorithms
Graphs are present in much of computer science, being a perfectly computable abstraction for many relations of reality and of human imagination. This article (originally written in Portuguese) introduces the mathematical theory of graphs (digraphs, weighted graphs, subgraphs, cycles, etc.), the data structures used to represent them, and graph algorithms such as search algorithms and the Dijkstra shortest path algorithm.
Read more →
UNIX, the Father of Modern Operating Systems
First released in 1969, UNIX is known to this day as one of the most important operating systems in history. This article (originally written in Portuguese) tells the history of UNIX, from its MULTICS origins to its rewriting in the C language, and presents its main features, such as multi-user operation, simultaneous processing, modular design, portability, pipes and the "everything is a file" philosophy, and its influence on UNIX-like systems such as BSD, MINIX and Linux.
Read more →
Understanding Flip-Flop Circuits
Flip-flops are digital memory circuits, each one storing a single bit. This article (originally written in Portuguese) analyzes, part by part, the logic circuits of the four main types of flip-flops (SR, D, JK and T), starting from the SR latch, showing that their apparently complex circuits share a common and simple anatomy.
Read more →