This sample demonstrates a circuit for adding 2 qubits
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:
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"