Introduction to quantum computing with Q# – Part 16, Quantum search

In this post we will start exploring the topic of quantum search – the ability to locate a specific qubit state in an unsorted data set represented in a qubit register. We will look at the mathematics behind this problem, at the Q# code illustrating some basic examples and explain how the different building blocks fit together. This will help us lay ground for a more comprehensive discussion of the so-called Grover’s algorithm next time.

Continue Reading

Introduction to quantum computing with Q# – Part 15, Deutsch-Jozsa algorithm

Last time, we discussed a problem originally stated by David Deutsch, focusing on determining whether a function is constant or balanced. We found out that for that specific problem, quantum computing provides a much better query complexity than classical computing – as it can solve the task in a single blackbox function evaluation, while classical computing requires two function evaluations to provide the same answer.

Today, we shall look at the generalization of that simple problem.

Continue Reading

Introduction to quantum computing with Q# – Part 14, Deutsch’s problem

Over the course of this series, we have developed a solid foundational understanding of quantum computing, as we learned about the basic paradigms, mathematics and various computational concepts that characterize this unique disciple. We are now well equipped to start exploring some of the most important quantum algorithms – starting with today’s part 14, which will be devoted to a simple oracle problem formulated by David Deutsch.

Continue Reading

Introduction to quantum computing with Q# – Part 13, CHSH Game

Last time we had an in-depth look at the original Bell’s inequality, and we wrote some Q# code that allowed us to quickly empirically test the predictions of quantum mechanics in that area.

In today’s post, we will continue with a generalization of Bell’s inequalities, called Clauser-Horne-Shimony-Holt inequality (in short CHSH), and discuss a simple game based on that. In the process, we will arrive at a remarkable conclusions – we will learn that for a certain class of simple boolean logic problems, they can be solved more efficiently when adopting a quantum strategy compared to a classical “common sense” approach.

Continue Reading

Q# Advent Calendar 2020 – Creating Q# Compiler Rewrite Steps

On this day 120 years ago, December 14 1900, Max Planck presented to the German Physical Society his work on spectral density of black body radiation, and postulated that electromagnetic energy could only be emitted in quantized packets. This date is now widely considered to be the the birth of quantum theory. The work of Planck sparked an explosion of theoretical and empirical work, which resulted in arguably the most intense and transformational periods in the history of science. The discovery of photoelectric effect by Einstein, Bohr’s model of atomic structure, De Broglie’s wave-particly duality hypothesis, discovery of quantum mechanicss by Heisenberg and formulation of quantum electrodynamics by Dirac, all followed in the span of the next three decades.

It is quite amazing that I am able to celebrate this special date with a special blog post about quantum programming, that’s part of Q# Advent Calendar 2020. You can find my post on “Creating Q# Compiler Rewrite Steps” on the Q# Community Blog here.

Introduction to quantum computing with Q# – Part 11, EPR Quantum Key Distribution

In the last two posts we covered quantum key exchange using the B92 and BB84 protocols. Both of those depended with their security on the no-cloning theorem. Today we are going to dedicate a third post to the topic of quantum key distribution, and this time around we will explore a variant of key distribution relying on the phenomenon of entanglement and quantum correlations.

Continue Reading

Introduction to quantum computing with Q# – Part 10, B92 Quantum Key Distribution

In the last part of this series we started talking about the area of quantum cryptography, or more accurately, quantum key distribution. We dissected, in considerable amount of detail, the BB84 protocol, and discussed how it can lead to effectively unbreakable cryptography.

Today we shall continue with quantum key distribution by looking at a sibling to BB84, the B92 protocol.

Continue Reading

dotnet-script 1.0.0 released – with support for .NET 5.0 and C# 9

To celebrate the release of .NET 5.0, which happened yesterday, we are happy to announce the release of dotnet-script – with support for .NET 5.0 and C# 9.

In addition to that, we have decided that after such a long time since we started this project off, and a rather stable public API, it is high time to celebrate this .NET 5.0 release by additionally moving dotnet-script to version 1.0.0.

Continue Reading

Beautiful and compact Web APIs with C# 9, .NET 5.0 and ASP.NET Core

Almost fours year ago I blogged about building lightweight microservices with ASP.NET Core 1.2 (which actually never shipped in such version and later became ASP.NET Core 2.0). The idea there was to drop the notion of bloated MVC controllers, get rid of as much as we can of the usual verbosity of C# based applications, and use a set of simple extension methods and a few cutting edge features of ASP.NET Core to provide a node.js style experience for authoring Web APIs.

The article and the accompanying demo projects received quite a lot of attention, and I even got a chance to speak at some conference about these type of approaches to building focused, small microservices. With the .NET 5.0 in sight (.NET 5.0 RC2 is out at the time of writing this), and some remarkable features of C# 9, this “lightweight Web APIs” concept deserves a revisit, and this is what we will do in this blog post.

Continue Reading