bloqade.analog.builder.field.Field
classField¶source
bloqade.analog.builder.field.Field
Bases: Builder
class Fieldpropertyuniform¶source
bloqade.analog.builder.field.Field.uniform
uniform: UniformAddress all atoms as part of defining the spatial modulation component of a drive.
Next steps to build your program include choosing the waveform that will be summed with the spatial modulation to create a drive.
The drive by itself, or the sum of subsequent drives (created by just chaining the construction of drives) will become the field (e.g. Detuning Field, Real-Valued Rabi Amplitude/Rabi Phase Field, etc.).
- You can now do:
...uniform.linear(start, stop, duration): to apply a linear waveform...uniform.constant(value, duration): to apply a constant waveform...uniform.poly([coefficients], duration): to apply a polynomial waveform...uniform.apply(wf:bloqade.ir.Waveform): to apply a pre-defined waveform...uniform.piecewise_linear([durations], [values]): to apply a piecewise linear waveform...uniform.piecewise_constant([durations], [values]): to apply a piecewise constant waveform...uniform.fn(f(t,...)): to apply a function as a waveform
methodlocation¶source
bloqade.analog.builder.field.Field.location
Signature
def location(labels: Union[List[int], int], scales: Union[List[ScalarType], ScalarType, None] = None) -> LocationAddress a single atom (or multiple) atoms.
Address a single atom (or multiple) as part of defining the spatial modulation component of a drive. You can specify the atoms to target as a list of labels and a list of scales. The scales are used to multiply the waveform that is applied to the atom. You can also specify a single label and scale to target a single atom.
Next steps to build your program include choosing the waveform that will be summed with the spatial modulation to create a drive.
The drive by itself, or the sum of subsequent drives (created by just chaining the construction of drives) will become the field. (e.g. Detuning Field, Real-Valued Rabi Amplitude/Rabi Phase Field, etc.)
Usage Example:
Section titled “Usage Example:”>>> prog = start.add_position([(0,0),(1,4),(2,8)]).rydberg.rabi# to target a single atom with a waveform>>> one_location_prog = prog.location(0)# to target a single atom with a scale>>> one_location_prog = prog.location(0, 0.5)# to target multiple atoms with same waveform>>> multi_location_prog = prog.location([0, 2])# to target multiple atoms with different scales>>> multi_location_prog = prog.location([0, 2], [0.5, "scale"])- You can now do:
...location(labels, scales).linear(start, stop, duration): to apply a linear waveform...location(labels, scales).constant(value, duration): to apply a constant waveform...location(labels, scales).poly([coefficients], duration): to apply a polynomial waveform...location(labels, scales).apply(wf:bloqade.ir.Waveform): to apply a pre-defined waveform...location(labels, scales).piecewise_linear([durations], [values]): to apply a piecewise linear waveform...location(labels, scales).piecewise_constant([durations], [values]): to apply a piecewise constant waveform...location(labels, scales).fn(f(t,..)): to apply a function as a waveform
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
labels | Union[List[int], int] | required | |
scales | Union[List[ScalarType], ScalarType, None] | None |
Returns
Location
methodscale¶source
bloqade.analog.builder.field.Field.scale
def scale(coeffs: Union[str, List[ScalarType]]) -> ScaleAddress all the atoms scaling each atom with an element of the list
or define a variable name for the scale list to be assigned later by
defining a name and using assign or batch_assign later.
Next steps to build your program include choosing the waveform that will be summed with the spatial modulation to create a drive.
The drive by itself, or the sum of subsequent drives (created by just chaining the construction of drives) will become the field (e.g. Detuning Field, Real-Valued Rabi Amplitude/Rabi Phase Field, etc.)
Usage Example:
Section titled “Usage Example:”>>> prog = start.add_position([(0,0),(1,4),(2,8)]).rydberg.rabi
# assign a literal list of values to scale each atom>>> one_location_prog = prog.scale([0.1, 0.2, 0.3])# assign a variable name to be assigned later>>> one_location_prog = prog.scale("a")# "a" can be assigned in the END of the program during variable assignment# using a list of values, indicating the scaling for each atom>>> single_assignment = ...assign(a = [0.1, 0.2, 0.3])# a list of lists, indicating a set of atoms should be targeted# for each task in a batch.>>> batch_assignment = ...batch_assign(a = [list_1, list_2, list_3,...])- You can now do:
...scale(coeffs).linear(start, stop, duration): to apply a linear waveform...scale(coeffs).constant(value, duration): to apply a constant waveform...scale(coeffs).poly([coefficients], duration): to apply a polynomial waveform...scale(coeffs).apply(wf:bloqade.ir.Waveform): to apply a pre-defined waveform...scale(coeffs).piecewise_linear(durations, values): to apply a piecewise linear waveform...scale(coeffs).piecewise_constant(durations, values): to apply a piecewise constant waveform...scale(coeffs).fn(f(t,..)): to apply a function as a waveform
Parameters
| Name | Type | Description |
|---|---|---|
coeffs | Union[str, List[ScalarType]] |
Returns
Scale