Skip to main content
IBM Quantum Platform
Informações sobre tradução

Traduções adicionais para esta página em outros idiomas estarão disponíveis em breve.

TwirlSamplingNode

class samplomatic.samplex.nodes.TwirlSamplingNode(lhs_register_name: str, rhs_register_name: str, distribution: Distribution)

GitHub

Bases: SamplingNode

A node that produces samples for twirling.

Parameters

  • lhs_register_name – The name of the register to store the samples.
  • rhs_register_name – The name of the register to store the inverses of the samples.
  • distribution – The distribution to draw samples from.

Attributes Summary

Coluna “ 1 ”
Coluna “ 2 ”
outgoing_register_typeThe virtual gate type of outgoing registers.

Methods Summary

Coluna “ 1 ”
Coluna “ 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.
Esta página foi útil?
Relate um bug, erro de digitação ou solicite conteúdo no GitHub.