ffsim.random.random_ucj_op_spinless

ffsim.random.random_ucj_op_spinless(norb, *, n_reps=1, interaction_pairs=None, with_final_orbital_rotation=False, diag_coulomb_mean=0.0, diag_coulomb_scale=6.283185307179586, diag_coulomb_normal=False, seed=None)[source]

Sample a random spinless unitary cluster Jastrow (UCJ) operator.

Parameters:
  • norb (int) – The number of orbitals.

  • n_reps (int) – The number of ansatz repetitions.

  • interaction_pairs (list[tuple[int, int]] | None) – Optional restrictions on allowed orbital interactions for the diagonal Coulomb operators. If specified, interaction_pairs should be a list of integer pairs representing the orbitals that are allowed to interact. These pairs can also be interpreted as indices of diagonal Coulomb matrix entries that are allowed to be nonzero. Each integer pair must be upper triangular, that is, of the form \((i, j)\) where \(i \leq j\).

  • with_final_orbital_rotation (bool) – Whether to include a final orbital rotation in the operator.

  • diag_coulomb_mean (float) – Mean of the entries of the diagonal Coulomb matrices. Defaults to 0.

  • diag_coulomb_scale (float) – Scale of the entries of the diagonal Coulomb matrices. Defaults to 2 * pi.

  • diag_coulomb_normal (bool) – Whether to draw the entries of the diagonal Coulomb matrices from a normal distribution, rather than a uniform distribution. If True, then the entries are drawn by calling rng.normal(loc=diag_coulomb_mean, scale=diag_coulomb_scale). If False, then the entries are drawn by calling diag_coulomb_mean + rng.uniform(-0.5 * diag_coulomb_scale, 0.5 * diag_coulomb_scale).

  • seed – A seed to initialize the pseudorandom number generator. Should be a valid input to np.random.default_rng.

Return type:

UCJOpSpinless

Returns:

The sampled UCJ operator.