bloqade.analog.compiler.passes.hardware.define.generate_ahs_code
← Module overview
function
source
functiongenerate_ahs_code¶source
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- 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
| Name | Type | Description |
|---|---|---|
capabilities | Optional[QuEraCapabilities] | Capabilities of the hardware. |
level_couplings | Dict | Dictionary containing the given channels for the sequence. |
circuit | analog_circuit.AnalogCircuit | AnalogCircuit 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
| Type | Description |
|---|---|
ValueError | If the capabilities are not provided but the circuit has a ParallelRegister. This is because the ParallelRegister requires the capabilities to generate the lattice data. |