Skip to content

Commit

Permalink
Merge pull request #12 from calculquebec/release
Browse files Browse the repository at this point in the history
Patch 0.2.1
  • Loading branch information
Scirelgar authored Jun 17, 2024
2 parents 7416ec1 + 8b509ce commit c0491d8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
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

Expand Down Expand Up @@ -60,12 +62,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
Expand All @@ -86,6 +88,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.
2 changes: 1 addition & 1 deletion pennylane_snowflurry/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
"""


__version__ = "0.2.0"
__version__ = "0.2.1"
11 changes: 1 addition & 10 deletions pennylane_snowflurry/pennylane_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
"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
"QubitUnitary": NotImplementedError, # might correspond to apply_gate!(state::Ket, gate::Gate) from snowflurry
}


Expand Down

0 comments on commit c0491d8

Please sign in to comment.