This code introduces a quantum oracle.
To run this application, simply run
mvn clean javafx:run
The result of this application is similar to the output below
cnt [0]: 542
cnt [1]: 0
cnt [2]: 0
cnt [3]: 458
Also, the following quantum circuit and probability chart are shown:
This sample shows that an initial state of 25% chance to measure 0 results in a similar state after applying 2 NOT gates.
You can learn more about this sample in Chapter 9 of Quantum Computing for Java Developers. It is discussed in 9.4: "Defining an Oracle".