14,829

How to Implement Deutsch’s Algorithm in Haskell

With this article I would like to continue the series of publications about the model of quantum computing. In the previous article I gave a brief introduction about reversibility of computing processes. Dear reader, today I invite you to take a look at one of the simplest quantum algorithms, which shows the increase of efficiency in comparison with classical computing model. I am talking about Deutsch’s algorithm. We are also going to use Haskell to illustrate the approach and the Deutsch’s algorithm itself.
5,555

A Few Words About Reversible Computing

Today I would like to raise a topic that has recently become all the more relevant and interesting. At least, judging by all the increasing number of publications in this direction, the interest in it is really growing. I am talking about quantum computing, or, to be more accurate, about a model of quantum computations. Without going into details of the model, let’s take a look at one of numerous questions related to it.
16,346

Cellular Automata Using Comonads

I have recently come across an article about implementing a one-dimensional cellular automaton using comonads. But this material is a bit outdated. Therefore, I’ve decided to write an article of my own and consider two-dimensional cellular automata by the example of The Game of Life: Universe Let’s take a look at Universe data type that is defined the following way: data Universe a = Universe [a] a [a] It’s a doubly infinite list focusing on some element that we can shift using the following functions:
20,215

Haskell. Testing a Multithread Application

I guess it’s no secret for anyone that multithread applications writing is connected with many problems you wouldn’t face when developing single-thread programs. One of the problems lies in an application testing. We can’t control the order in which operations are performed. Therefore, we also can’t control the result of the program execution. Even if we get an error, it won’t be easy to step in the same river twice.