Skip to content

bloqade.qbraid.lowering.Lowering

← Module overview

classLoweringsource

bloqade.qbraid.lowering.Lowering

class Lowering

Attributes

NameTypeDefaultDescription
qubit_listList[ir.SSAValue]field(init=False, default_factory=list)
qubit_id_mapDict[int, ir.SSAValue]field(init=False, default_factory=dict)
bit_id_mapDict[int, ir.SSAValue]field(init=False, default_factory=dict)
block_listList[ir.Statement]field(init=False, default_factory=list)

methodlowersource

bloqade.qbraid.lowering.Lowering.lower

Signature
def lower(sym_name: str, noise_model: schema.NoiseModel, return_qreg: bool = False) -> ir.Method

Lower the noise model to a method.

Parameters

NameTypeDefaultDescription
sym_namestrrequired
noise_modelschema.NoiseModelrequired
return_qregboolFalseUse the quantum register as the return value.

Returns

ir.MethodMethod: The generated kirin method.

source

methodprocess_noise_modelsource

bloqade.qbraid.lowering.Lowering.process_noise_model

Signature
def process_noise_model(noise_model: schema.NoiseModel, return_qreg: bool)

Parameters

NameTypeDescription
noise_modelschema.NoiseModel
return_qregbool
source

methodprocess_gate_eventsource

bloqade.qbraid.lowering.Lowering.process_gate_event

def process_gate_event(node: schema.GateEvent)

Parameters

NameTypeDescription
nodeschema.GateEvent
source

methodprocess_cz_pauli_errorsource

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

NameTypeDescription
participantsTuple[Tuple[int] | Tuple[int, int], ...]
nodeschema.CZError[schema.PauliErrorModel]
source

methodlower_cz_gatessource

bloqade.qbraid.lowering.Lowering.lower_cz_gates

def lower_cz_gates(node: schema.CZ)

Parameters

NameTypeDescription
nodeschema.CZ
source

methodlower_w_gatessource

bloqade.qbraid.lowering.Lowering.lower_w_gates

def lower_w_gates(participants: Sequence[int], theta: float, phi: float)

Parameters

NameTypeDescription
participantsSequence[int]
thetafloat
phifloat
source

methodlower_rz_gatessource

bloqade.qbraid.lowering.Lowering.lower_rz_gates

def lower_rz_gates(participants: Tuple[int, ...], phi: float)

Parameters

NameTypeDescription
participantsTuple[int, ...]
phifloat
source

methodlower_pauli_errorssource

bloqade.qbraid.lowering.Lowering.lower_pauli_errors

def lower_pauli_errors(operator_error: schema.PauliErrorModel)

Parameters

NameTypeDescription
operator_errorschema.PauliErrorModel
source

methodlower_measurementsource

bloqade.qbraid.lowering.Lowering.lower_measurement

def lower_measurement(operation: schema.Measurement)

Parameters

NameTypeDescription
operationschema.Measurement
source

methodlower_atom_losssource

bloqade.qbraid.lowering.Lowering.lower_atom_loss

def lower_atom_loss(survival_probs: Tuple[float, ...])

Parameters

NameTypeDescription
survival_probsTuple[float, ...]
source

methodlower_numbersource

bloqade.qbraid.lowering.Lowering.lower_number

def lower_number(value: float | int) -> ir.SSAValue

Parameters

NameTypeDescription
valuefloat | int

Returns

ir.SSAValue

source

methodlower_full_turnssource

bloqade.qbraid.lowering.Lowering.lower_full_turns

def lower_full_turns(value: float) -> ir.SSAValue

Parameters

NameTypeDescription
valuefloat

Returns

ir.SSAValue

source