U2ParametricMultiplicationNode
class samplomatic.samplex.nodes.U2ParametricMultiplicationNode(operand: Literal['rz', 'rx'], register_name: str, param_idxs: list[int])
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
ParamIndexfor the parameter expressions specifying the gate arguments. List order must match the order subsystems in the registry.
Raises
- SamplexConstructionError – if param_idxs is empty.
- SamplexConstructionError – if operand is not
rzorrx.
Attributes Summary
Column 1 | Column 2 |
|---|---|
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
Column 1 | Column 2 |
|---|---|
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
writes_to
writes_to() → dict[str, tuple[set[int], type[VirtualType]]]
Return a manifest of which virtual register values this node needs to write to.