Skip to content

bloqade.analog.compiler.passes.hardware.define.generate_ahs_code

← Module overview

functiongenerate_ahs_codesource

bloqade.analog.compiler.passes.hardware.define.generate_ahs_code

Signature
def generate_ahs_code(capabilities: Optional[QuEraCapabilities], level_couplings: Dict, circuit: analog_circuit.AnalogCircuit) -> AHSComponents
  1. generate ahs code

Generates the AHS code for the given circuit. This includes generating the lattice data, global detuning, global amplitude, global phase, local detuning and lattice site coefficients (if applicable).

Parameters

NameTypeDescription
capabilitiesOptional[QuEraCapabilities]Capabilities of the hardware.
level_couplingsDictDictionary containing the given channels for the sequence.
circuitanalog_circuit.AnalogCircuitAnalogCircuit to generate AHS code for.

Returns

AHSComponentsahs_components: A collection of the AHS components generated for the given circuit. Can be used to generate the QuEra and Braket IR.

Raises

TypeDescription
ValueErrorIf the capabilities are not provided but the circuit has a ParallelRegister. This is because the ParallelRegister requires the capabilities to generate the lattice data.
source