U2ParametricMultiplicationNode

class samplomatic.samplex.nodes.U2ParametricMultiplicationNode(operand: Literal['rz', 'rx'], register_name: str, param_idxs: list[int])[source]

Bases: EvaluationNode

Abstract parent node for nodes doing multiplication on a U2Register.

The node stores a parametric representation of a one-qubit gate or gates from the original circuit to perform multiplication on a registry.

Limited to the gates rz or rx, and all gates within the node are of the same type.

Parameters:
  • operand – The gate type, given as a string.

  • register_name – The name of the register the operation is applied to.

  • param_idxs – List of ParamIndex for the parameter expressions specifying the gate arguments. List order must match the order subsystems in the registry.

Raises:

Attributes Summary

outgoing_register_type

The virtual gate type of outgoing registers.

parameter_idxs

Which evaluated parameter expressions this node needs access to at sampling time.

Methods Summary

get_style()

Return the style of this node when plotted.

writes_to()

Return a manifest of which virtual register values this node needs to write to.

Attributes Documentation

outgoing_register_type
parameter_idxs

Which evaluated parameter expressions this node needs access to at sampling time.

Methods Documentation

get_style()[source]

Return the style of this node when plotted.

writes_to() dict[str, tuple[set[int], type[VirtualType]]][source]

Return a manifest of which virtual register values this node needs to write to.