Start
ProgramStart
ProgramStart(parent: Optional[Builder] = None)
Bases: Drive
, Builder
ProgramStart is the base class for a starting/entry node for building a program.
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/builder/base.py
10 11 12 13 14 |
|
apply
apply(sequence: SequenceExpr) -> SequenceBuilder
Apply a pre-built sequence to a program.
This allows you to build a program independent of any geometry
and then apply
the program to said geometry. Or, if you have a
program you would like to try on multiple geometries you can
trivially do so with this.
Example Usage:
>>> from numpy import pi
>>> seq = start.rydberg.rabi.amplitude.constant(2.0 * pi, 4.5)
# choose a geometry of interest to apply the program on
>>> from bloqade.analog.atom_arrangement import Chain, Kagome
>>> complete_program = Chain(10).apply(seq)
# you can .apply to as many geometries as you like
>>> another_complete_program = Kagome(3).apply(seq)
- From here you can now do:
...assign(assignments).bloqade
: select the bloqade local emulator backend...assign(assignments).braket
: select braket local emulator or QuEra hardware...assign(assignments).device(specifier_string)
: select backend by specifying a string
- Assign multiple values to a single variable for a parameter sweep:
...assign(assignments).batch_assign(assignments)
:
- Parallelize the program register, duplicating the geometry and waveform
sequence to take advantage of all available
space/qubits on the QPU:
...assign(assignments).parallelize(cluster_spacing)
- Defer value assignment of certain variables to runtime:
...assign(assignments).args([previously_defined_vars])
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/builder/start.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|