Transform from InteractionOperator to QubitOperator for Bravyi-Kitaev fast algorithm.

The electronic Hamiltonian is represented in terms of creation and annihilation operators. These creation and annihilation operators could be used to define Majorana modes as follows: c_{2i} = a_i + a^{\dagger}i, c{2i+1} = (ai - a^{\dagger}{i})/(1j) These Majorana modes can be used to define edge operators Bi and A{ij}: Bi=c{2i}c{2i+1}, A{ij}=c{2i}c{2j} using these edge operators the fermionic algebra can be generated and hence all the terms in the electronic Hamiltonian can be expressed in terms of edge operators. The terms in electronic Hamiltonian can be divided into five types (arXiv 1208.5986). We can find the edge operator expression for each of those five types. For example, the excitation operator term in Hamiltonian when represented in terms of edge operators becomes: a_i^{\dagger}a_j+a_j^{\dagger}a_i = (-1j/2)(A_ijB_i+B_j*A_ij) For the sake of brevity the reader is encouraged to look up the expressions of other terms from the code below. The variables for edge operators are chosen according to the nomenclature defined above (B_i and A_ij). A detailed description of these operators and the terms of the electronic Hamiltonian are provided in (arXiv 1712.00446).

iop InteractionOperator
n_qubit int

Number of qubits

qubit_operator An instance of the QubitOperator class.