ffsim.qiskit.ffsim_vec_to_qiskit_vec¶
- ffsim.qiskit.ffsim_vec_to_qiskit_vec(vec, norb, nelec)[source]¶
Convert an ffsim state vector to a Qiskit state vector.
- Parameters:
vec (
ndarray) – A state vector in ffsim/PySCF format. It should be a one-dimensional vector of lengthcomb(norb, n_alpha) * comb(norb, n_beta)in the spinful case, andcomb(norb, nelec)in the spinless case.norb (
int) – The number of spatial orbitals.nelec (
int|tuple[int,int]) – Either a single integer representing the number of fermions for a spinless system, or a pair of integers storing the numbers of spin alpha and spin beta fermions.
- Return type: