ffsim.simulate_qdrift_double_factorized

ffsim.simulate_qdrift_double_factorized(vec, hamiltonian, time, *, norb, nelec, n_steps=1, symmetric=False, probabilities='norm', one_rdm=None, n_samples=1, seed=None)[source]

Double-factorized Hamiltonian simulation via qDRIFT.

Parameters:
  • vec (ndarray) – The state vector to evolve.

  • hamiltonian (DoubleFactorizedHamiltonian) – The Hamiltonian.

  • time (float) – The evolution time.

  • nelec (tuple[int, int]) – The number of alpha and beta electrons.

  • n_steps (int) – The number of Trotter steps.

  • probabilities (str | ndarray) – The sampling method to use, or else an explicit array of probabilities. If specifying a string, the following options are supported: - “norm”: Sample each term with probability proportional to its spectral norm. - “uniform”: Sample each term with uniform probability. - “optimal”: Sample with probabilities optimized for a given initial state. The “optimal” method requires the one-body reduced density matrix of the initial state to be specified. It returns optimal probabilities whenever the initial state is completely characterized by this reduced density matrix, i.e., it is a Slater determinant.

  • one_rdm (ndarray | None) – The one-body reduced density matrix of the initial state.

  • n_samples (int) – The number of qDRIFT trajectories to sample.

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

Return type:

ndarray

Returns:

A Numpy array representing the final state of the simulation. The shape of the array depends on the n_samples argument. If n_samples=1 then it is just a state vector, a one-dimensional array. Otherwise, it is a two-dimensional array of shape (n_samples, dim) where dim is the dimension of the state vector.