braket.ahs.local_detuning module

class braket.ahs.local_detuning.LocalDetuning(magnitude: Field)[source]

Bases: Hamiltonian

Creates a Hamiltonian term \(H_{shift}\) representing the local detuning that changes the energy of the Rydberg level in an AnalogHamiltonianSimulation, defined by the formula

\[H_{shift} (t) := -\Delta(t) \sum_k h_k | r_k \rangle \langle r_k |\]

where

\(\Delta(t)\) is the magnitude of the frequency shift in rad/s,

\(h_k\) is the site coefficient of atom \(k\), a dimensionless real number between 0 and 1,

\(|r_k \rangle\) is the Rydberg state of atom \(k\).

with the sum \(\sum_k\) taken over all target atoms.

Parameters:

magnitude (Field) – containing the global magnitude time series \(\Delta(t)\), where time is measured in seconds (s) and values are measured in rad/s, and the local pattern \(h_k\) of dimensionless real numbers between 0 and 1.

property terms: list[Hamiltonian]

The list of terms in this Hamiltonian.

Type:

list[Hamiltonian]

property magnitude: Field

containing the global magnitude time series \(\Delta(t)\), where time is measured in seconds (s) and values measured in rad/s) and the local pattern \(h_k\) of dimensionless real numbers between 0 and 1.

Type:

Field

static from_lists(times: list[float], values: list[float], pattern: list[float]) LocalDetuning[source]

Get the shifting field from a set of time points, values and pattern

Parameters:
  • times (list[float]) – The time points of the shifting field

  • values (list[float]) – The values of the shifting field

  • pattern (list[float]) – The pattern of the shifting field

Raises:

ValueError – If the length of times and values differs.

Returns:

LocalDetuning – The shifting field obtained

stitch(other: LocalDetuning, boundary: StitchBoundaryCondition = StitchBoundaryCondition.MEAN) LocalDetuning[source]

Stitches two shifting fields based on TimeSeries.stitch method. The time points of the second LocalDetuning are shifted such that the first time point of the second LocalDetuning coincides with the last time point of the first LocalDetuning. The boundary point value is handled according to StitchBoundaryCondition argument value.

Parameters:
  • other (LocalDetuning) – The second local detuning to be stitched with.

  • boundary (StitchBoundaryCondition) –

    {“mean”, “left”, “right”}. Boundary point handler.

    Possible options are

    • ”mean” - take the average of the boundary value points of the first and the second time series.

    • ”left” - use the last value from the left time series as the boundary point.

    • ”right” - use the first value from the right time series as the boundary point.

Raises:

ValueError – The LocalDetuning patterns differ.

Returns:

LocalDetuning – The stitched LocalDetuning object.

Example (StitchBoundaryCondition.MEAN):

time_series_1 = TimeSeries.from_lists(times=[0, 0.1], values=[1, 2])
time_series_2 = TimeSeries.from_lists(times=[0.2, 0.4], values=[4, 5])

stitch_ts = time_series_1.stitch(time_series_2, boundary=StitchBoundaryCondition.MEAN)

Result:
    stitch_ts.times() = [0, 0.1, 0.3]
    stitch_ts.values() = [1, 3, 5]

Example (StitchBoundaryCondition.LEFT):

stitch_ts = time_series_1.stitch(time_series_2, boundary=StitchBoundaryCondition.LEFT)

Result:
    stitch_ts.times() = [0, 0.1, 0.3]
    stitch_ts.values() = [1, 2, 5]

Example (StitchBoundaryCondition.RIGHT):

stitch_ts = time_series_1.stitch(time_series_2, boundary=StitchBoundaryCondition.RIGHT)

Result:
    stitch_ts.times() = [0, 0.1, 0.3]
    stitch_ts.values() = [1, 4, 5]
discretize(properties: DiscretizationProperties) LocalDetuning[source]

Creates a discretized version of the LocalDetuning.

Parameters:

properties (DiscretizationProperties) – Capabilities of a device that represent the resolution with which the device can implement the parameters.

Returns:

LocalDetuning – A new discretized LocalDetuning.