bloqade.qbraid.lowering.Lowering
classLowering¶source
bloqade.qbraid.lowering.Lowering
class LoweringAttributes
| Name | Type | Default | Description |
|---|---|---|---|
qubit_list | List[ir.SSAValue] | field(init=False, default_factory=list) | |
qubit_id_map | Dict[int, ir.SSAValue] | field(init=False, default_factory=dict) | |
bit_id_map | Dict[int, ir.SSAValue] | field(init=False, default_factory=dict) | |
block_list | List[ir.Statement] | field(init=False, default_factory=list) |
methodlower¶source
bloqade.qbraid.lowering.Lowering.lower
Signature
def lower(sym_name: str, noise_model: schema.NoiseModel, return_qreg: bool = False) -> ir.MethodLower the noise model to a method.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
sym_name | str | required | |
noise_model | schema.NoiseModel | required | |
return_qreg | bool | False | Use the quantum register as the return value. |
Returns
ir.MethodMethod: The generated kirin method.
methodprocess_noise_model¶source
bloqade.qbraid.lowering.Lowering.process_noise_model
Signature
def process_noise_model(noise_model: schema.NoiseModel, return_qreg: bool)Parameters
| Name | Type | Description |
|---|---|---|
noise_model | schema.NoiseModel | |
return_qreg | bool |
methodprocess_gate_event¶source
bloqade.qbraid.lowering.Lowering.process_gate_event
def process_gate_event(node: schema.GateEvent)Parameters
| Name | Type | Description |
|---|---|---|
node | schema.GateEvent |
methodprocess_cz_pauli_error¶source
bloqade.qbraid.lowering.Lowering.process_cz_pauli_error
Signature
def process_cz_pauli_error(participants: Tuple[Tuple[int] | Tuple[int, int], ...], node: schema.CZError[schema.PauliErrorModel])Parameters
| Name | Type | Description |
|---|---|---|
participants | Tuple[Tuple[int] | Tuple[int, int], ...] | |
node | schema.CZError[schema.PauliErrorModel] |
methodlower_cz_gates¶source
bloqade.qbraid.lowering.Lowering.lower_cz_gates
methodlower_w_gates¶source
bloqade.qbraid.lowering.Lowering.lower_w_gates
def lower_w_gates(participants: Sequence[int], theta: float, phi: float)Parameters
| Name | Type | Description |
|---|---|---|
participants | Sequence[int] | |
theta | float | |
phi | float |
methodlower_rz_gates¶source
bloqade.qbraid.lowering.Lowering.lower_rz_gates
def lower_rz_gates(participants: Tuple[int, ...], phi: float)Parameters
| Name | Type | Description |
|---|---|---|
participants | Tuple[int, ...] | |
phi | float |
methodlower_pauli_errors¶source
bloqade.qbraid.lowering.Lowering.lower_pauli_errors
def lower_pauli_errors(operator_error: schema.PauliErrorModel)Parameters
| Name | Type | Description |
|---|---|---|
operator_error | schema.PauliErrorModel |
methodlower_measurement¶source
bloqade.qbraid.lowering.Lowering.lower_measurement
def lower_measurement(operation: schema.Measurement)Parameters
| Name | Type | Description |
|---|---|---|
operation | schema.Measurement |
methodlower_atom_loss¶source
bloqade.qbraid.lowering.Lowering.lower_atom_loss
def lower_atom_loss(survival_probs: Tuple[float, ...])Parameters
| Name | Type | Description |
|---|---|---|
survival_probs | Tuple[float, ...] |
methodlower_number¶source
bloqade.qbraid.lowering.Lowering.lower_number
def lower_number(value: float | int) -> ir.SSAValueParameters
| Name | Type | Description |
|---|---|---|
value | float | int |
Returns
ir.SSAValue
methodlower_full_turns¶source
bloqade.qbraid.lowering.Lowering.lower_full_turns
def lower_full_turns(value: float) -> ir.SSAValueParameters
| Name | Type | Description |
|---|---|---|
value | float |
Returns
ir.SSAValue