This sample demonstrates what a reversible gate is
To run this application, simply run
mvn clean javafx:run
The result of this application is a user interface showing the circuit and the probabilities:
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.3: "Reversible quantum gates".