Skip to main content
IBM Quantum Platform
Informations sur la traduction

D'autres traductions de cette page seront bientôt disponibles.

CollectZ2ToOutputNode

class samplomatic.samplex.nodes.CollectZ2ToOutputNode(register_name: str, subsystem_idxs: Sequence[int], output_name: str, output_idxs: Sequence[str])

GitHub

Bases: CollectionNode

Reads from Z2Registers and writes to SamplexOutput.

Parameters

  • register_name – The name of the register to read from.
  • subsystem_idxs – The subsystems to read from.
  • output_name – The name of the output to write to.
  • output_idxs – The indices of the output to write to.

Methods Summary

Chronique « 1 »
Chronique « 2 »
collect(registers, outputs, rng)Collect.
get_style()Return the style of this node when plotted.
outputs_to()Return the set of names of outputs this node mutates.
reads_from()Return a manifest of which virtual register values this node needs to read from.
validate_and_update(register_descriptions)Validate provided register descriptions are compatible, update with changes.

Methods Documentation

collect

collect(registers, outputs, rng)

GitHub

Collect.

Parameters

  • registers – Registers to collect from.
  • outputs – Where to output.
  • rng – A randomness generator.

get_style

get_style()

GitHub

Return the style of this node when plotted.

outputs_to

outputs_to()

GitHub

Return the set of names of outputs this node mutates.

reads_from

reads_from()

GitHub

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

validate_and_update

validate_and_update(register_descriptions)

GitHub

Validate provided register descriptions are compatible, update with changes.

This method can be used by a samplex to determine when a node execution order has well-defined dependencies before sampling begins.

Parameters

register_descriptions – A map from existing register names to their size and type.

Cette page a-t-elle été utile ?
Signaler un bogue, une coquille ou proposer du contenu sur GitHub.