ffsim.qiskit.qiskit_vec_to_ffsim_vec¶
- ffsim.qiskit.qiskit_vec_to_ffsim_vec(vec, norb, nelec)[source]¶
Convert a Qiskit state vector to an ffsim state vector.
- Parameters:
vec (
ndarray) – A state vector in Qiskit format. It should be a one-dimensional vector of length2 ** (2 * norb)in the spinful case, and2 ** norbin 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: