Skip to content

Commit

Permalink
Merge pull request #23 from QuEraComputing/add-data-dir-create
Browse files Browse the repository at this point in the history
adding snippet to create `data` directory.
  • Loading branch information
johnzl-777 authored Oct 5, 2023
2 parents ab3bbf3 + 85fc150 commit 9c545a2
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/docs/examples/example-1-floquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
import numpy as np
import matplotlib.pyplot as plt

if not os.path.isdir("data"):
os.mkdir("data")

# %% [markdown]
# ## Define the program.
# For the floquet protocol we keep We do the same Rabi drive but allow the detuning to
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/examples/example-1-rabi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
import matplotlib.pyplot as plt
import numpy as np

if not os.path.isdir("data"):
os.mkdir("data")

# %% [markdown]
# ## Define the program.
# Below we define program with one atom, with constant detuning but variable Rabi
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/examples/example-1-ramsey.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import numpy as np
import matplotlib.pyplot as plt

if not os.path.isdir("data"):
os.mkdir("data")

# %% [markdown]
# ## Define the program.
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/examples/example-2-multi-qubit-blockaded.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@

import os

if not os.path.isdir("data"):
os.mkdir("data")

# %% [markdown]
# ## Defining the Geometry
# We will start by defining the geometry of the atoms. The idea here is to cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@

import os

if not os.path.isdir("data"):
os.mkdir("data")

# %% [markdown]
# ## Program Definition
# We will start by defining a program. We set up a chain of two atoms
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/examples/example-2-two-qubit-adiabatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

import os

if not os.path.isdir("data"):
os.mkdir("data")

# %% [markdown]
# ## Defining the Program
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/examples/example-3-2d-ordered-state.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@

import os

if not os.path.isdir("data"):
os.mkdir("data")

# This tells Bokeh to display output in the notebook
# versus opening a browser window
output_notebook()
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/examples/example-3-time-sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
import os
import matplotlib.pyplot as plt

if not os.path.isdir("data"):
os.mkdir("data")

# %% [markdown]
# ## Program Definition We define a program where our geometry is a chain of 11 atoms
# with a distance of 6.1 micrometers between atoms.
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/examples/example-4-quantum-scar-dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
import numpy as np
import os

if not os.path.isdir("data"):
os.mkdir("data")

n_atoms = 11
atom_spacing = 6.1
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/examples/example-5-MIS-UDG.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
import os
import matplotlib.pyplot as plt

if not os.path.isdir("data"):
os.mkdir("data")

# setting the seed
rng = np.random.default_rng(1234)

Expand Down

0 comments on commit 9c545a2

Please sign in to comment.