Skip to content

Commit

Permalink
updating notebooks to use explicit keyword for lattice_spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
weinbe58 committed Nov 28, 2023
1 parent 3c6f3f8 commit 439d724
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/examples/example-2-multi-qubit-blockaded.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@

geometries = {
1: Chain(1),
2: Chain(2, distance),
2: Chain(2, lattice_spacing=distance),
3: start.add_position(
[(-inv_sqrt_2_rounded, 0.0), (inv_sqrt_2_rounded, 0.0), (0, distance)]
),
4: Square(2, distance),
4: Square(2, lattice_spacing=distance),
7: start.add_position(
[
(0, 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
# define a `batch` of programs for different `run_time` values.
# %%

initial_geometry = Chain(2, "distance")
initial_geometry = Chain(2, lattice_spacing="distance")
program_waveforms = initial_geometry.rydberg.rabi.amplitude.uniform.piecewise_linear(
durations=["ramp_time", "run_time", "ramp_time"],
values=[0.0, "rabi_ampl", "rabi_ampl", 0.0],
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/example-3-2d-ordered-state.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
# %%
# Have atoms separated by 5.9 micrometers
L = 3
lattice_const = 5.9
lattice_spacing = 5.9

rabi_amplitude_values = [0.0, 15.8, 15.8, 0.0]
rabi_detuning_values = [-16.33, -16.33, "delta_end", "delta_end"]
durations = [0.8, "sweep_time", 0.8]

prog = (
Square(L, lattice_const)
Square(L, lattice_spacing=lattice_spacing)
.rydberg.rabi.amplitude.uniform.piecewise_linear(durations, rabi_amplitude_values)
.detuning.uniform.piecewise_linear(durations, rabi_detuning_values)
)
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/example-3-time-sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

# Define relevant parameters for the lattice geometry and pulse schedule
n_atoms = 11
lattice_const = 6.1
lattice_spacing = 6.1
min_time_step = 0.05

# Define Rabi amplitude and detuning values.
Expand All @@ -76,7 +76,7 @@
durations = [0.8, "sweep_time", 0.8]

time_sweep_z2_prog = (
Chain(n_atoms, lattice_const)
Chain(n_atoms, lattice_spacing=lattice_spacing)
.rydberg.rabi.amplitude.uniform.piecewise_linear(durations, rabi_amplitude_values)
.detuning.uniform.piecewise_linear(durations, rabi_detuning_values)
)
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/example-4-quantum-scar-dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
os.mkdir("data")

n_atoms = 11
atom_spacing = 6.1
lattice_spacing = 6.1
run_time = var("run_time")

quantum_scar_program = (
Chain(n_atoms, lattice_spacing=atom_spacing)
Chain(n_atoms, lattice_spacing=lattice_spacing)
# define detuning waveform
.rydberg.detuning.uniform.piecewise_linear(
[0.3, 1.6, 0.3], [-18.8, -18.8, 16.3, 16.3]
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/example-5-MIS-UDG.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
durations = [0.3, 1.6, 0.3]

mis_udg_program = (
Square(15, 5.0)
Square(15, lattice_spacing=5.0)
.apply_defect_density(0.3, rng=rng)
.rydberg.rabi.amplitude.uniform.piecewise_linear(durations, [0.0, 15.0, 15.0, 0.0])
.detuning.uniform.piecewise_linear(
Expand Down

0 comments on commit 439d724

Please sign in to comment.