{"id":23402609,"url":"https://github.com/martincastroalvarez/quantum-algorithms-java","last_synced_at":"2025-04-08T22:23:18.902Z","repository":{"id":58805177,"uuid":"532555330","full_name":"MartinCastroAlvarez/quantum-algorithms-java","owner":"MartinCastroAlvarez","description":"Quantum Algorithms with Java","archived":false,"fork":false,"pushed_at":"2022-09-09T10:41:41.000Z","size":3190,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T17:31:14.590Z","etag":null,"topics":["deutsch-jozsa","java","quantum-computing","shor-algorithm"],"latest_commit_sha":null,"homepage":"https://martincastroalvarez.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MartinCastroAlvarez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-04T13:54:37.000Z","updated_at":"2023-03-13T05:06:00.000Z","dependencies_parsed_at":"2023-01-18T02:00:56.569Z","dependency_job_id":null,"html_url":"https://github.com/MartinCastroAlvarez/quantum-algorithms-java","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinCastroAlvarez%2Fquantum-algorithms-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinCastroAlvarez%2Fquantum-algorithms-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinCastroAlvarez%2Fquantum-algorithms-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinCastroAlvarez%2Fquantum-algorithms-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MartinCastroAlvarez","download_url":"https://codeload.github.com/MartinCastroAlvarez/quantum-algorithms-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247935912,"owners_count":21020914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deutsch-jozsa","java","quantum-computing","shor-algorithm"],"created_at":"2024-12-22T12:29:37.883Z","updated_at":"2025-04-08T22:23:18.883Z","avatar_url":"https://github.com/MartinCastroAlvarez.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quantum Computing\nQuantum Algorithms with Java and Strange\n\n![wall](./wallpaper.jpg)\n\n## References\n\n- [Strange](https://github.com/redfx-quantum/strange)\n- [StrangeFX](https://github.com/redfx-quantum/strangefx)\n- [Quantum Computing samples in Java](https://github.com/johanvos/quantumjava)\n- [How to Install Maven on Linux (Ubuntu)](https://www.digitalocean.com/community/tutorials/install-maven-linux-ubuntu)\n- [Quantum Logic Gate](https://en.wikipedia.org/wiki/Quantum_logic_gate)\n- [Quantum Key Distribution and BB84 Protocol](https://en.wikipedia.org/wiki/BB84)\n- [Deutsch–Jozsa algorithm](https://en.wikipedia.org/wiki/Grover%27s_algorithm)\n- [Grover's algorithm](https://en.wikipedia.org/wiki/Shor%27s_algorithm)\n- [Shor's Algorithm](https://en.wikipedia.org/wiki/Deutsch%E2%80%93Jozsa_algorithm)\n\n## Instructions\n\n### Installing JDK on Linux\n\nDownloading the JDK Binaries\n\n```bash\nwget https://download.java.net/java/GA/jdk13.0.1/cec27d702aa74d5a8630c65ae61e4305/9/GPL/openjdk-13.0.1_linux-x64_bin.tar.gz\ntar -xvf openjdk-13.0.1_linux-x64_bin.tar.gz\nsudo mv jdk-13.0.1 /opt/\n```\n\nSetting `JAVA_HOME` and Path Environment Variables\n\n```bash\nJAVA_HOME='/opt/jdk-13.0.1'\nPATH=\"$JAVA_HOME/bin:$PATH\"\nexport PATH\n```\n\nVerifing the Java Installation\n\n```bash\njava -version\n```\n\n### Installing Maven on Linux\n\nDownloading the Maven Binaries\n\n```bash\nwget https://mirrors.estointernet.in/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz\ntar -xvf apache-maven-3.6.3-bin.tar.gz\nsudo mv apache-maven-3.6.3 /opt/\n```\n\nSetting `M2_HOME` and Path Variables\n\n```bash\nM2_HOME='/opt/apache-maven-3.6.3'\nPATH=\"$M2_HOME/bin:$PATH\"\nexport PATH\n```\n\nVerifing the Maven installation\n\n```bash\nmvn -version\n```\n\n## Quantum Algorithms\n\n### Quantum Superposition\n\nPutting a Qubit into superposition using a `Hadarmard` gate.\n\n![wall](./images/hadamard.png)\n\n```bash\nmvn clean javafx:run --quiet --file superposition.xml\n```\n```bash\nQubit | Probability: 0.4999999701976776, Mesured: 0\n```\n\n![wall](./images/superposition.png)\n\n### Quantum Entanglement\n\nEntangling 2 Qubits using a `CNOT` gate.\n\n![wall](./images/cnot.png)\n\n```bash\nmvn clean javafx:run --quiet --file entanglement.xml\n```\n```bash\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\n```\n\n![wall](./images/entanglement.png)\n\n### Bell State\n\nEntangling 2 Qubits in superposition to create a Bell state using a `Hadamard` gate and a `CNOT` gate.\n\n```bash\nmvn clean javafx:run --quiet --file bell.xml\n```\n\nThis results on both Qubits being either 0 or 1 50% of the time.\n\n```bash\nQubit | Probability: 0.4999999701976776, Mesured: 0\nQubit | Probability: 0.4999999701976776, Mesured: 0\n```\n```bash\nQubit | Probability: 0.4999999701976776, Mesured: 1\nQubit | Probability: 0.4999999701976776, Mesured: l\n```\n\n![wall](./images/bell.png)\n\nAdding an additional `X` gate to the second Qubit.\n\n![wall](./images/xgate.png)\n\n```bash\nmvn clean javafx:run --quiet --file bell2.xml\n```\n\nIt causes the Qubits to be measures as either 0 and 1 or 1 and 0 50% of the time.\n\n```bash\nQubit | Probability: 0.4999999701976776, Mesured: 0\nQubit | Probability: 0.4999999701976776, Mesured: 1\n```\n```bash\nQubit | Probability: 0.4999999701976776, Mesured: 1\nQubit | Probability: 0.4999999701976776, Mesured: 0\n```\n\n![wall](./images/bell2.png)\n\n### Quantum Teleportation\n\nTeleporting a Qubit from Alice to Bob by combining `Hadamard` and `CNOT` gates as well as a `CZ` gate.\n\n![wall](./images/cz.png)\n\n```bash\nmvn clean javafx:run --quiet --file teleport.xml\n```\n\nThe last Qubit is guaranteed to always be 0. That means the 0 was teleported from Alice to Bob.\n\n```bash\nQubit | Probability: 0.4999999403953552, Mesured: 0\nQubit | Probability: 0.4999999403953552, Mesured: 1\nQubit | Probability: 0.0, Mesured: 0\n```\n\n![wall](./images/teleport.png)\n\nNow, initializing the first Qubit to 1.\n\n```bash\nmvn clean javafx:run --quiet --file teleport1.xml\n```\n\nNow, the value 1 has been teleported from Alice to Bob.\n\n```bash\nQubit | Probability: 0.4999999403953552, Mesured: 1\nQubit | Probability: 0.4999999403953552, Mesured: 0\nQubit | Probability: 0.9999998807907104, Mesured: 1\n```\n\n![wall](./images/teleport1.png)\n\nNow, initializing the first Qubit to 53%.\n\n```bash\nmvn clean javafx:run --quiet --file teleport53.xml\n```\n\nNow, the value 0.53 has been teleported from Alice to Bob after applying the formula `1 - 0.53 * 0.53 = 0.719`.\n\n```bash\nQubit | Probability: 0.4999999403953552, Mesured: 1\nQubit | Probability: 0.4999999403953552, Mesured: 0\nQubit | Probability: 0.7190999388694763, Mesured: 0\n```\n\n![wall](./images/teleport53.png)\n\n### Quantum Network\n\nCreating a network of Qubits by concatenating multiple Quantum Teleporters.\n\n```bash\nmvn clean javafx:run --quiet --file network.xml\n```\n\nThe message `0.21` is teleported from Alice to Bob across a larger distance after applying the formula `1 - 0.21 * 0.21 = 0.9558`\n\n```bash\nQubit | Probability: 0.4999998528510332, Mesured: 1\nQubit | Probability: 0.4999998528510332, Mesured: 1\nQubit | Probability: 0.4999998528510332, Mesured: 1\nQubit | Probability: 0.4999998528510332, Mesured: 1\nQubit | Probability: 0.4999998528510332, Mesured: 1\nQubit | Probability: 0.4999998528510332, Mesured: 1\nQubit | Probability: 0.4999998528510332, Mesured: 1\nQubit | Probability: 0.4999998528510332, Mesured: 1\nQubit | Probability: 0.4999998528510332, Mesured: 0\nQubit | Probability: 0.4999998528510332, Mesured: 0\nQubit | Probability: 0.955899715423584, Mesured: 1\n```\n\n![wall](./images/network.png)\n\n### Quantum Inverter\n\nInverting the state of 2 Qubits by applying 3 consecutive `CNOT` gates.\n\n```bash\nmvn clean javafx:run --quiet --file inverter.xml\n```\n\nThe message `0.2` and `0.5` have been inverted after applying the formulas: `1 - 0.2 * 0.2 = 0.96` and `1 - 0.5 * 0.5 = 0.75`.\n\n```bash\nQubit | Probability: 0.9599999040365219, Mesured: 1\nQubit | Probability: 0.7499999087303877, Mesured: 1\n```\n\n![wall](./images/inverter.png)\n\nThe inverter can be used to teleport a Qubit while only applying the `CNOT` and `CZ` gates to contiguous gates so that they can be easily calculated mathematically.\n\n![wall](./images/sgate.png)\n\n```bash\nmvn clean javafx:run --quiet --file swap.xml\n```\n\nThe message `0.41` is teleported from Alice to Bob after swapping the state of the first 2 Qubits.\n\n```bash\nQubit | Probability: 0.5, Mesured: 0\nQubit | Probability: 0.5, Mesured: 0\nQubit | Probability: 0.8319000005722046, Mesured: 1\n```\n\n![wall](./images/swap.png)\n\n### Quantum Adder\n\nSumming the value of 2 Qubits using a `Toffoli` gate. The first Qubit is kept to guarantee the Quantum Reversibility Principle. The last Qubit is the carry bit.\n\n![wall](./images/toffoli.png)\n\n```bash\nmvn clean javafx:run --quiet --file adder00.xml\n```\n\nTwo `|0\u003e` Qubits sum `|00\u003e`.\n\n```bash\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\n```\n\n![wall](./images/adder00.png)\n\nAdding two `|1\u003e` Qubits:\n\n```bash\nmvn clean javafx:run --quiet --file adder11.xml\n```\n\nTwo `|1\u003e` Qubits sum `|10\u003e`.\n\n```bash\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 1.0, Mesured: 1\nQubit | Probability: 1.0, Mesured: 1\n```\n\n![wall](./images/adder11.png)\n\nAdding `|1\u003e` + `|0\u003e` + `|0\u003e`:\n\n```bash\nmvn clean javafx:run --quiet --file adder100.xml\n```\n\nThe sum of `|1\u003e` + `|0\u003e` + `|0\u003e` results in `|01\u003e` (The last 2 Qubits):\n\n```bash\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 1.0, Mesured: 1\n```\n\n![wall](./images/adder100.png)\n\nAdding `|1\u003e` + `|0\u003e` + `|1\u003e`:\n\n```bash\nmvn clean javafx:run --quiet --file adder101.xml\n```\n\nThe sum of `|1\u003e` + `|0\u003e` + `|1\u003e` results in `|10\u003e` (the last 2 Qubits):\n\n```bash\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 1.0, Mesured: 1\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 1.0, Mesured: 1\n```\n\n![wall](./images/adder101.png)\n\nAdding `|1\u003e` + `|1\u003e` + `|1\u003e`:\n\n```bash\nmvn clean javafx:run --quiet --file adder111.xml\n```\n\nThe sum of `|1\u003e` + `|1\u003e` + `|1\u003e` results in `|11\u003e` (The last 2 Qubits):\n\n```bash\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 1.0, Mesured: 1\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 1.0, Mesured: 1\nQubit | Probability: 1.0, Mesured: 1\n```\n\n![wall](./images/adder111.png)\n\n### BB84 Algorithm\n\nSending a message over the network, taking advantage of the `Hadamard` gate resulting in the original Qubit if applied twice.\n\n```bash\nmvn clean javafx:run --quiet --file bb84.xml\n```\n\nThe `|1001\u003e` Qubits sent by Alice are received as `|1001\u003e` by Bob.\n\n```bash\nQubit | Probability: 0.9999997615814209, Mesured: 1\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.9999997615814209, Mesured: 1\n```\n\n![wall](./images/bb84.png)\n\nEve is listening on the network and randomly applies `Hadamard` gates to try to get the message. After that, retransmits the Qubit to Bob who applies the same `Hadamard` configuration that Alice randomly applied.\n\n```bash\nmvn clean javafx:run --quiet --file eavesdropping.xml\n```\n\nThe `|1001\u003e` Qubits sent by Alice are not properly received by Eve, who can not forward a message to Bob without him noticing that the message has been tampered.\n\n```bash\nQubit | Probability: 0.9999997615814209, Mesured: 1\nQubit | Probability: 0.49999988079071045, Mesured: 1\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999988079071045, Mesured: 1\n```\n\n![wall](./images/eavesdropping.png)\n\n### Deutsch Josza Algorithm\n\nRunning the Deutsch Algorithm with a random Oracle that is unknown at run time:\n\n```bash\nmvn clean javafx:run --quiet --file deutschjozsa.xml\n```\n\nIf the Oracle is a constant function, the measured value of the first Qubit is guaranteed to be 0.\nIf the Oracle is a balanced function, the measured value of the first Qubit is guaranteed to be 1.\n\n```bash\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 1\n----------------------------------------------------\nQubit | Function: 1 Type: balanced\nQubit | Probability: 0.9999998211860657, Mesured: 1\nQubit | Probability: 0.49999991059303284, Mesured: 0\n----------------------------------------------------\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 1\n----------------------------------------------------\nQubit | Function: 1 Type: balanced\nQubit | Probability: 0.9999998211860657, Mesured: 1\nQubit | Probability: 0.49999991059303284, Mesured: 0\n----------------------------------------------------\nQubit | Function: 1 Type: balanced\nQubit | Probability: 0.9999998211860657, Mesured: 1\nQubit | Probability: 0.49999991059303284, Mesured: 1\n----------------------------------------------------\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 0\n----------------------------------------------------\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 1\n----------------------------------------------------\nQubit | Function: 1 Type: balanced\nQubit | Probability: 0.9999998211860657, Mesured: 1\nQubit | Probability: 0.49999991059303284, Mesured: 0\n----------------------------------------------------\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 1\n----------------------------------------------------\nQubit | Function: 1 Type: balanced\nQubit | Probability: 0.9999998211860657, Mesured: 1\nQubit | Probability: 0.49999991059303284, Mesured: 0\n```\n\n![wall](./images/jozsa.png)\n\nRunning the Deutsch Algorithm with 2 Qubits.\n\n```bash\nmvn clean javafx:run --quiet --file deutschjozsa2.xml\n```\n\nIf the Oracle is a constant function, the measured value of the first Qubit is guaranteed to be 0.\nIf the Oracle is a balanced function, the measured value of the first Qubit is guaranteed to be 1.\n\n```bash\nQubit | Function: 1 Type: balanced\nQubit | Probability: 0.9999998211860657, Mesured: 1\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 0\n----------------------------------------------------\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 0\n----------------------------------------------------\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 0\n```\n\n![wall](./images/jozsa2.png)\n\nRunning the Deutsch Algorithm with 3 Qubits.\n\n```bash\nmvn clean javafx:run --quiet --file deutschjozsa3.xml\n```\n\nIf the Oracle is a constant function, the measured value of the first Qubit is guaranteed to be 0.\nIf the Oracle is a balanced function, the measured value of the first Qubit is guaranteed to be 1.\n\n```bash\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 0\n----------------------------------------------------\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 1\n----------------------------------------------------\nQubit | Function: 1 Type: balanced\nQubit | Probability: 0.9999998211860657, Mesured: 1\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 0\n```\n\n![wall](./images/jozsa3.png)\n\nRunning the Deutsch-Jozsa Algorithm with N Qubits.\n\n```bash\nmvn clean javafx:run --quiet --file deutschjozsa10.xml\n```\n\nIf the Oracle is a constant function, the measured value of the first Qubit is guaranteed to be 0.\nIf the Oracle is a balanced function, the measured value of the first Qubit is guaranteed to be 1.\n\n```bash\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 0\n----------------------------------------------------\nQubit | Function: 0 Type: constant\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 0\n----------------------------------------------------\nQubit | Function: 1 Type: balanced\nQubit | Probability: 0.9999998211860657, Mesured: 1\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.0, Mesured: 0\nQubit | Probability: 0.49999991059303284, Mesured: 0\n```\n\n### Grover's Search Algorithm\n\nRunning the Deutsch Algorithm with a random Oracle that is unknown at run time:\n\n```bash\nmvn clean javafx:run --quiet --file grover.xml\n```\n\nThe algorithm iterates multiple times applying the `Oracle` and the `Diffusor`. In each iteration, the probability of measuring the expected solution increases.\n\nIn this case, there are 3 Qubits which can encode 8 values. In other words, 3 Qubits can be used to search for a match among 8 records.\n\n```bash\nQubits | Qubits: 3 Encoded: 8 Solution: 2 Runs: 2.221441469079183\n----------------------------------------------------\nCorrect Solution Probability after step 1: 0.7812497615814209\nCorrect Solution Probability after step 2: 0.9453120827674866\n----------------------------------------------------\nProbability distribution at step: 1\np: 0.031249988824129105\np: 0.031249988824129105\np: 0.7812497615814209\np: 0.031249988824129105\np: 0.031249988824129105\np: 0.031249994412064552\np: 0.031249988824129105\np: 0.031249983236193657\n----------------------------------------------------\nProbability distribution at step: 2\np: 0.007812506519258022\np: 0.007812506519258022\np: 0.9453120827674866\np: 0.007812506519258022\np: 0.007812500931322575\np: 0.007812506519258022\np: 0.007812500931322575\np: 0.007812498603016138\n```\n\n![wall](./images/grover.png)\n\nRunning the Deutsch Algorithm with a random Oracle that is unknown at run time:\n\n```bash\nmvn clean javafx:run --quiet --file grovern.xml\n```\n\nThis time, the Grover's Search algorithm is able to search for a match among 256 records. As a conclusion, the computation increases exponentially with the amount of entangled Qubits.\n\n```bash\nQubits | Qubits: 8 Encoded: 256.0 Solution: 2 Runs: 12.566370614359172\n----------------------------------------------------\nCorrect Solution Probability after step 1: 0.03479098901152611\nCorrect Solution Probability after step 2: 0.09463772177696228\nCorrect Solution Probability after step 3: 0.17972062528133392\nCorrect Solution Probability after step 4: 0.2847433090209961\nCorrect Solution Probability after step 5: 0.40317079424858093\nCorrect Solution Probability after step 6: 0.527620255947113\nCorrect Solution Probability after step 7: 0.6503432393074036\n[...]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartincastroalvarez%2Fquantum-algorithms-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartincastroalvarez%2Fquantum-algorithms-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartincastroalvarez%2Fquantum-algorithms-java/lists"}