UniformLocalC1

class samplomatic.distributions.UniformLocalC1(num_subsystems: int, gate_name: str)[source]

Bases: Distribution

The uniform distribution over C1⊗C1 elements that stay local and C1 under conjugation.

For each pair of consecutive subsystems, independently draws a pair (c0, c1) uniformly from the set of C1⊗C1 elements that remain factorized as C1⊗C1 after conjugation by the specified two-qubit gate.

Parameters:
  • num_subsystems – The number of subsystems this distribution samples. Must be even.

  • gate_name – A two-qubit gate name whose conjugation table appears in LOCAL_C1_PROPAGATE_LOOKUP_TABLES.

Attributes Summary

gate_name

The name of the two-qubit gate.

register_type

The virtual gate type being sampled.

Methods Summary

sample(size, rng)

Sample the distribution.

Attributes Documentation

gate_name

The name of the two-qubit gate.

register_type

Methods Documentation

sample(size, rng)[source]

Sample the distribution.

Parameters:
  • size – The number elements to sample.

  • rng – A randomness generator.

Returns:

The samples.