This code demonstrates the Deutsch Jozsa algorithm
To run this application, simply run
mvn clean javafx:run
The result of this application is similar to the output below
f = 1, val = 1
f = 1, val = 1
f = 1, val = 1
f = 1, val = 1
f = 1, val = 1
f = 1, val = 1
f = 1, val = 1
f = 1, val = 1
f = 1, val = 1
f = 1, val = 1
Also, the following quantum circuit is rendered:
This sample shows how the Deutsch Jozsa algorithm works.
You can learn more about this sample in Chapter 9 of Quantum Computing for Java Developers. It is discussed in 9.7: "Deutsch Jozsa algorithm".