FRYGate.to_matrix

FRYGate.to_matrix(num_species=1, basis=None)

Return a Numpy.array for the gate unitary matrix. This function will compute \(exp(-i H)\) where \(H\) is the generator of the gate.

Parameters:
  • num_species (int) – Number of fermion species which defaults to 1.

  • basis (Optional[FermionicBasis]) – The basis in which to return the matrix. If None is given then the matrix will be returned in the full basis.

Raises:

QiskitColdAtomError – If the generator of the gate is not hermitian.

Returns:

The array of the gate unitary over the full fock basis, with states ordered like 00…0, 00…1, …, 11…0, 11…1

Return type:

np.array