Skip to content

Commit 48d6f7f

Browse files
committed
examples
1 parent 9b1ae92 commit 48d6f7f

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

docs/getting_started/examples.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Here are some examples to help you get started with `jaxquantum`.
77
Let's simulate the time dynamics of a quantum harmonic oscillator with single photon loss.
88

99
```python
10+
from jax import jit
11+
import jaxquantum as jqt
12+
import jax.numpy as jnp
13+
import matplotlib.pyplot as plt
14+
1015
N = 100
1116

1217
omega_a = 2.0*jnp.pi*5.0

tutorials/0-examples.ipynb

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@
1010
"%autoreload 2"
1111
]
1212
},
13-
{
14-
"cell_type": "code",
15-
"execution_count": 7,
16-
"metadata": {},
17-
"outputs": [],
18-
"source": [
19-
"from jax import jit\n",
20-
"import jaxquantum as jqt \n",
21-
"import jax.numpy as jnp\n",
22-
"import matplotlib.pyplot as plt"
23-
]
24-
},
2513
{
2614
"cell_type": "markdown",
2715
"metadata": {},
@@ -31,14 +19,14 @@
3119
},
3220
{
3321
"cell_type": "code",
34-
"execution_count": 14,
22+
"execution_count": 2,
3523
"metadata": {},
3624
"outputs": [
3725
{
3826
"name": "stderr",
3927
"output_type": "stream",
4028
"text": [
41-
"100% |\u001b[35m██████████\u001b[0m| [00:01<00:00, 93.89%/s] \n"
29+
"100% |\u001b[35m██████████\u001b[0m| [00:00<00:00, 106.67%/s]\n"
4230
]
4331
},
4432
{
@@ -53,6 +41,11 @@
5341
}
5442
],
5543
"source": [
44+
"from jax import jit\n",
45+
"import jaxquantum as jqt \n",
46+
"import jax.numpy as jnp\n",
47+
"import matplotlib.pyplot as plt\n",
48+
"\n",
5649
"N = 100\n",
5750
"\n",
5851
"omega_a = 2.0*jnp.pi*5.0\n",
@@ -102,7 +95,7 @@
10295
},
10396
{
10497
"cell_type": "code",
105-
"execution_count": null,
98+
"execution_count": 1,
10699
"metadata": {},
107100
"outputs": [],
108101
"source": [

0 commit comments

Comments
 (0)