bloqade.analog.compiler.passes.hardware.define.assign_circuit
← Module overview
function
source
functionassign_circuit¶source
bloqade.analog.compiler.passes.hardware.define.assign_circuit
Signature
def assign_circuit(circuit: analog_circuit.AnalogCircuit, assignments: Dict[str, ParamType]) -> Tuple[analog_circuit.AnalogCircuit, Dict]- Assign variables and validate assignment
This pass assigns variables to the circuit and validates that all variables have been assigned.
Parameters
| Name | Type | Description |
|---|---|---|
circuit | analog_circuit.AnalogCircuit | AnalogCircuit to assign variables to |
assignments | Dict[str, ParamType] | Dictionary containing the assignments for the variables in the circuit. |
Returns
Tuple[analog_circuit.AnalogCircuit, Dict]assigned_circuit: AnalogCircuit with variables assigned.
Raises
| Type | Description |
|---|---|
ValueError | If there are any variables that have not been assigned. |