We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
implement a ver() method
As a user if I want to make sure my setup is up to date with the latest version, I want to be able to call dq.ver() to know which version I am running

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dynamiqs/__init__.py`
Content:
```
1 from .mesolve import mesolve
2 from .sesolve import sesolve
3 from .smesolve import smesolve
4 from .utils import *
5
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/dynamiqs/__init__.py b/dynamiqs/__init__.py
--- a/dynamiqs/__init__.py
+++ b/dynamiqs/__init__.py
@@ -1,4 +1,9 @@
+from importlib.metadata import version
+
 from .mesolve import mesolve
 from .sesolve import sesolve
 from .smesolve import smesolve
 from .utils import *
+
+# get version from pyproject.toml
+__version__ = version(__package__)

{"golden_diff": "diff --git a/dynamiqs/__init__.py b/dynamiqs/__init__.py\n--- a/dynamiqs/__init__.py\n+++ b/dynamiqs/__init__.py\n@@ -1,4 +1,9 @@\n+from importlib.metadata import version\n+\n from .mesolve import mesolve\n from .sesolve import sesolve\n from .smesolve import smesolve\n from .utils import *\n+\n+# get version from pyproject.toml\n+__version__ = version(__package__)\n", "issue": "implement a ver() method\nAs a user if I want to make sure my setup is up to date with the latest version, I want to be able to call dq.ver() to know which version I am running\n", "before_files": [{"content": "from .mesolve import mesolve\nfrom .sesolve import sesolve\nfrom .smesolve import smesolve\nfrom .utils import *\n", "path": "dynamiqs/__init__.py"}], "after_files": [{"content": "from importlib.metadata import version\n\nfrom .mesolve import mesolve\nfrom .sesolve import sesolve\nfrom .smesolve import smesolve\nfrom .utils import *\n\n# get version from pyproject.toml\n__version__ = version(__package__)\n", "path": "dynamiqs/__init__.py"}]}