From 5997397489ea6799e52f735ccef06eeea7391d34 Mon Sep 17 00:00:00 2001 From: Scirelgar <81189385+Scirelgar@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:10:16 -0400 Subject: [PATCH 1/5] Updated doc regarding Julia installer and Jupyter --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 989aa27..8103447 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Since this plugin interfaces between Python and Julia, it requires both language ### Julia -If you don't have Julia installed, you can download it from the [official website](https://julialang.org/downloads/). +If you don't have Julia installed, you can download it from the [official website](https://julialang.org/downloads/). It is highly recommended to install using the installer file, as it will automatically add Julia to environment variables. ### PennyLane and Snowflurry @@ -60,12 +60,12 @@ using Pkg Pkg.add("PyCall") ``` -### Running files and tests +### Running files -For now, the plugin is only tested on python scripts and doesn't work in a Juptyer notebook. To run a file, you can use the following command: +The plugin can be used both in python scripts and Jupyter notebooks. To run a script, you can use the following command: ```sh -python-jl -m tests.test_pyjulia-snowflurry -v +python base_circuit.py ``` ## Usage @@ -86,6 +86,6 @@ dev_def = qml.device("snowflurry.qubit", wires=1, shots=50, host="example.anyons This plugin is still very early in its development and aims to provide a basic interface between PennyLane and Snowflurry, which are both also under active development. As such, it is expected that there will be issues and limitations. -It is necessary to use the `python-jl` command to execute files, as it essentially launches Python from within Julia. This is necessary for the use of Julia packages such as Snowflurry. +### Future plans -For the sake of simplicity, a workaround it being researched to allow the use of the plugin in a Jupyter notebook and to allow debugging in an IDE. +- Add a test suite to ensure the plugin works as expected. From ba11e03a09e2ef27934883a7df0b9c774c2db413 Mon Sep 17 00:00:00 2001 From: Scirelgar <81189385+Scirelgar@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:16:33 -0400 Subject: [PATCH 2/5] Refactor pennylane_converter.py: Remove unsupported operations --- pennylane_snowflurry/pennylane_converter.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pennylane_snowflurry/pennylane_converter.py b/pennylane_snowflurry/pennylane_converter.py index 1fff677..b31d1fa 100644 --- a/pennylane_snowflurry/pennylane_converter.py +++ b/pennylane_snowflurry/pennylane_converter.py @@ -46,19 +46,10 @@ "CRZ": "controlled(rotation_z({2},{0}),[{1}])", "PhaseShift": "phase_shift({1},{0})", # 0 is the angle, 1 is the wire "ControlledPhaseShift": "controlled(phase_shift({2},{0}),[{1}])", # 0 is the angle, 1 is the control qubit, 2 is the target qubit - "QubitStateVector": NotImplementedError, - "StatePrep": NotImplementedError, "Toffoli": "toffoli({0},{1},{2})", - "QubitUnitary": NotImplementedError, - "U1": NotImplementedError, - "U2": NotImplementedError, "U3": "universal({3},{0},{1},{2})", - "IsingZZ": NotImplementedError, - "IsingYY": NotImplementedError, - "IsingXX": NotImplementedError, "T": "pi_8({0})", "Rot": "rotation({3},{0},{1})", # theta, phi but no omega so we skip {2}, {3} is the wire - "QubitUnitary": NotImplementedError, # might correspond to apply_gate!(state::Ket, gate::Gate) from snowflurry } From 4597678f17af17ad00ca7db99cddb7702d5c7bcb Mon Sep 17 00:00:00 2001 From: Scirelgar <81189385+Scirelgar@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:29:52 -0400 Subject: [PATCH 3/5] added comment aabout U3 operation --- pennylane_snowflurry/pennylane_converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_snowflurry/pennylane_converter.py b/pennylane_snowflurry/pennylane_converter.py index b31d1fa..1976416 100644 --- a/pennylane_snowflurry/pennylane_converter.py +++ b/pennylane_snowflurry/pennylane_converter.py @@ -47,7 +47,7 @@ "PhaseShift": "phase_shift({1},{0})", # 0 is the angle, 1 is the wire "ControlledPhaseShift": "controlled(phase_shift({2},{0}),[{1}])", # 0 is the angle, 1 is the control qubit, 2 is the target qubit "Toffoli": "toffoli({0},{1},{2})", - "U3": "universal({3},{0},{1},{2})", + "U3": "universal({3},{0},{1},{2})", # 3 is the wire, 0,1,2 are theta, phi, delta respectively "T": "pi_8({0})", "Rot": "rotation({3},{0},{1})", # theta, phi but no omega so we skip {2}, {3} is the wire } From adca5f60db691b394f591b650058c00fe54b3c07 Mon Sep 17 00:00:00 2001 From: Scirelgar <81189385+Scirelgar@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:26:07 -0400 Subject: [PATCH 4/5] bumping version for release --- pennylane_snowflurry/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_snowflurry/_version.py b/pennylane_snowflurry/_version.py index 24a90b7..7583786 100644 --- a/pennylane_snowflurry/_version.py +++ b/pennylane_snowflurry/_version.py @@ -17,4 +17,4 @@ """ -__version__ = "0.2.0" +__version__ = "0.2.1" From 55b6439b7833d7cb1315116375dbb259457cd5c9 Mon Sep 17 00:00:00 2001 From: Scirelgar <81189385+Scirelgar@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:22:36 -0400 Subject: [PATCH 5/5] Clarifying how to add Julia to path from installation process --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8103447..c845b40 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ Since this plugin interfaces between Python and Julia, it requires both language ### Julia -If you don't have Julia installed, you can download it from the [official website](https://julialang.org/downloads/). It is highly recommended to install using the installer file, as it will automatically add Julia to environment variables. +If you don't have Julia installed, you can download it from the [official website](https://julialang.org/downloads/). It is highly recommended to install using the installer file, as it will ask to add Julia to the system's environment variables. + +**To ensure this correct configuration, during the installation process, the checkbox `Add Julia to PATH` must be checked.** ### PennyLane and Snowflurry