Skip to main content
IBM Quantum Platform

InjectNoiseNode

class samplomatic.samplex.nodes.InjectNoiseNode(register_name: str, sign_register_name: str, noise_ref: str, num_subsystems: int, modifier_ref: str = '')

GitHub

Bases: SamplingNode

A node that produces samples for injecting noise.

The node uses a qiskit.quantum_info.PauliLindbladMap as the distribution to draw samples from. This map can be modified at sample time:

Parameters

  • register_name – The name of the register to store the samples.
  • sign_register_name – The name of the register to store the signs.
  • noise_ref – Unique identifier of the Pauli Lindblad map to draw samples from.
  • num_subsystems – The number of subsystems this node generates gates for.
  • modifier_ref – Unique identifier for modifiers applied to the Pauli Lindblad map before sampling.

Attributes Summary

Column 1
Column 2
outgoing_register_typeThe virtual gate type of outgoing registers.

Methods Summary

Column 1
Column 2
get_style()Return the style of this node when plotted.
instantiates()Return a manifest of new virtual registers that this node instantiates.
sample(registers, rng, inputs, ...)Sample this node.

Attributes Documentation

outgoing_register_type

Methods Documentation

get_style

get_style()

GitHub

Return the style of this node when plotted.

instantiates

instantiates() → dict[str, tuple[int, VirtualType]]

GitHub

Return a manifest of new virtual registers that this node instantiates.

Note
  • To change the type or size of a register, both instantiate and remove it.
  • Do not specify reads_from() or writes_to() for an instantiated register, these powers are implicit.

sample

sample(registers, rng, inputs, num_randomizations)

GitHub

Sample this node.

Parameters

  • registers – Where to sample into.
  • rng – A randomness generator.
  • inputs – Inputs of the sampling program.
  • num_randomizations – How many randomizations to draw.
Was this page helpful?
Report a bug, typo, or request content on GitHub.