Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/sphinx/targets/python/pasqal.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@
omega_max = 1000000
delta_end = 1000000
delta_start = 0.0
omega = ScalarOperator(lambda t: omega_max if time_ramp < t < time_max else 0.0)
omega = ScalarOperator(lambda t: omega_max
if time_ramp < t.real < time_max else 0.0)
# Global phase at each step
phi = ScalarOperator.const(0.0)
# Global detuning at each step
delta = ScalarOperator(lambda t: delta_end
if time_ramp < t < time_max else delta_start)
if time_ramp < t.real < time_max else delta_start)

async_result = cudaq.evolve_async(RydbergHamiltonian(atom_sites=register,
amplitude=omega,
Expand Down
5 changes: 3 additions & 2 deletions docs/sphinx/targets/python/quera_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@
steps = [0.0, time_ramp, time_max - time_ramp, time_max]
schedule = Schedule(steps, ["t"])
# Rabi frequencies at each step
omega = ScalarOperator(lambda t: omega_max if time_ramp < t < time_max else 0.0)
omega = ScalarOperator(lambda t: omega_max
if time_ramp < t.real < time_max else 0.0)
# Global phase at each step
phi = ScalarOperator.const(0.0)
# Global detuning at each step
delta = ScalarOperator(lambda t: delta_end
if time_ramp < t < time_max else delta_start)
if time_ramp < t.real < time_max else delta_start)

async_result = cudaq.evolve_async(RydbergHamiltonian(atom_sites=register,
amplitude=omega,
Expand Down
6 changes: 3 additions & 3 deletions docs/sphinx/targets/python/quera_intro.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
def trapezoidal_signal(t):
slope = omega_const / time_ramp
y_intercept = slope * time_max
if 0 < t < time_ramp + time_plateau:
if 0 < t.real < time_ramp + time_plateau:
return slope * t
if time_ramp < t < time_max:
if time_ramp < t.real < time_max:
return omega_const
if time_ramp + time_plateau < t < time_max:
if time_ramp + time_plateau < t.real < time_max:
return (-slope * t) + y_intercept
return 0.0

Expand Down
Loading