2 “Hello World,” quantum computing style

 

This chapter covers

  • Introducing Strange, a quantum computing library in Java
  • Trying the high-level and low-level APIs in Strange
  • A basic visualization of a quantum circuit

This chapter introduces Strange, an open source quantum computing project including a quantum simulator and a library that exposes a Java API you can use in regular Java applications. Throughout the book, we discuss concepts of quantum computing (QC) and their relevance to Java developers, and we show how Java developers can benefit from these concepts.

Strange contains a pure Java implementation of the required quantum concepts. When discussing the concepts, we point you to the relevant code implementation of the concept in Strange. This is part of a low-level API.

Most Java developers will not have to deal with low-level quantum concepts. However, some may benefit from algorithms that take advantage of these concepts. For this group, Strange provide a set of high-level algorithms that can be used in regular Java applications. These algorithms are what we call the high-level Java API.

2.1 Introducing Strange

Figure 2.1 shows a high-level overview of the components of Strange. The Java Quantum API provides an implementation for a number of typical quantum algorithms. These are the high-level algorithms that you can use in regular Java applications. No knowledge of QC is required to use them.

Figure 2.1 High-level overview of the Strange architecture

2.2 Running a first demo with Strange

2.3 Inspecting the code for HelloStrange

2.3.1 The build procedures

2.3.2 The code

2.3.3 Java APIs vs. implementations

2.4 Obtaining and installing the Strange code

2.4.1 Downloading the code

2.4.2 A first look at the library

2.5 Next steps

Summary