Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 828 Bytes

File metadata and controls

28 lines (19 loc) · 828 Bytes

RandomBit with debug

This sample shows how to visualise intermediate probabilities using StrangeFX

Running the sample

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

The expected outcome on the console looks like this:

Qubit[0]: 1
Qubit[1]: 1
Qubit[2]: 0
Qubit[3]: 1

Apart from this, the quantum circuit is shown and it now includes the probability vector after each step. randombit

What it is doing

This sample shows how using StrangeFX allows you to understand the intermediate states of a quantum circuit.

You can learn more about this sample in Chapter 7 of Quantum Computing for Java Developers. It is discussed in 7.5.2: "Debugging Strange code"