Skip to content

Latest commit

 

History

History

add1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Quantum adder

This sample demonstrates a circuit for adding 2 qubits

Running the sample

To run this application, simply run mvn clean javafx:run

The expected outcome on the console looks like this:

Adding 0 + 0 = 0
Adding 0 + 1 = 1
Adding 1 + 0 = 1
Adding 1 + 1 = 0

The image that contains the quantum circuit for this is also shown:

Quantum adder

What it is doing

This sample contains a circuit that a developer can create and modify. The goal of this simple circuit is to build a quantum adder that adds 2 qubits.

You can learn more about this sample in Chapter 7 of Quantum Computing for Java Developers. It is discussed in 7.6.2: "Adding two qubits"