Questions tagged [openfermion]

For questions related to OpenFermion python library for studying quantum algorithms related to fermionic systems such as those arising in quantum chemistry.

A description of OpenFermion from GitHub:

OpenFermion is an open source library for compiling and analyzing quantum algorithms to simulate fermionic systems, including quantum chemistry. Among other functionalities, this version features data structures and tools for obtaining and manipulating representations of fermionic and qubit Hamiltonians.

23 questions
7
votes
2 answers

How to perform a controlled Pauli string rotation gate?

I would like to know some circuit decomposition for an arbitrary controlled Pauli string rotation: \begin{equation} |0\rangle\langle 0| \otimes e^{i \theta (P_1\otimes...\otimes P_n)}+ |1\rangle\langle 1| \otimes I \end{equation} where $P_i$ are…
7
votes
1 answer

Finding the norm of a Hamiltonian

I am experimenting with https://journals.aps.org/prx/pdf/10.1103/PhysRevX.8.041015 and in equation 36 I find that they use the norm of the Hamiltonian. Is there a clean way to compute it, or an upper bound lower than $\lambda = \sum_j |w_j|$ for the…
Pablo
  • 603
  • 3
  • 11
5
votes
0 answers

OpenFermion to Qiskit

Is there a direct way to go from an object generated in OpenFermion to objects usable in Qiskit? I can't find anything about any plugin. It's not too hard to translate into pyQuil and then to Qiskit from there, but a direct way would be much easier.
4
votes
0 answers

Difference between Qiskit and Openfermion two body integrals

I am struggling with understanding the differences between OpenFermion and Qiskit libraries when it comes to Molecular Data, two body integrals. For example, I am working with the following [('H',[0,0,0]),('H',[0,0,1.595])] Basis: 6-31G. For Qiskit…
Eugen
  • 41
  • 1
4
votes
0 answers

Freeze electrons in OpenFermion

I am trying to generate a Hamiltonian for the H2O molecule using openfermion-pyscf. As far as I understand by default OpenFermion is generating one 1s spatial orbital for each of the H atoms and 1s, 2s, 2px, 2py, and 2pz spatial orbitals for the O…
suren
  • 41
  • 1
4
votes
1 answer

How to get eigenvectors of Hamiltonian in OpenFermion

In OpenFermion you can create a Hamiltonian in terms of creation and annihilation pretty easily: ham = ((FermionOperator('1^ 1', .5)) + (FermionOperator('2^ 2', .25))) And getting the eigenvalues of the Hamiltonian is pretty straightforward as…
trg
  • 75
  • 3
3
votes
0 answers

Error during Forest OpenFermion installation

I tried installing Forest OpenFermion by pip install forestopenfermion and I got the following long error message (cut): Building wheels for collected packages: scipy Building wheel for scipy (setup.py) ... error ERROR: Command errored out with…
Michelle
  • 31
  • 1
3
votes
0 answers

What is the common way to transform an arbitrary first-quantized Hamiltonian to corresponding qubit operators?

I know that we can easily transform Molecular Hamiltonians to qubit operators using qiskit nature (FermionicOp Mappers). But what about an arbitrary Hamiltonian? Suppose that I have a first-quantized Hamiltonian as…
Wisdom
  • 165
  • 5
3
votes
1 answer

noisy circuit by openfermion

I am working on designing quantum error mitigation algorithms for simulating chemical systems. Therefore, a necessary component is to add noisy to the ideal circuit when using a quantum simulator. But I notice there is no such features in the…
ironmanaudi
  • 799
  • 3
  • 10
3
votes
1 answer

implement variational quantum eigensolver with openfermion

Can someone provide me with an example about how to implement VQE with OpenFermion, for example, use the UCCSD ansatz to get the ground state energy of LiH. I have checked some code, but none of them is up to date (deprecated). Also, there is no…
ironmanaudi
  • 799
  • 3
  • 10
3
votes
0 answers

"Wn state" in Bravyi-Kitaev encoding

For a particular simulation, I need the initial (physical) state of the QC to represent the equal superposition of all single-occupancy fermionic second-quantized states. In Jordan-Wigner encoding, I can simply prepare the $W_n$…
mavzolej
  • 2,271
  • 9
  • 18
2
votes
0 answers

Reproducing Hydrogen Molecule Hamiltonian in OpenFermion

I am learning quantum chemistry at the moment and I'm trying to understand the Hamiltonian generated by the OpenFermion package. I'm now stuck at understanding how openfermion calculates the coefficients in second quantization Hamiltonians. Take the…
QF2QP
2
votes
1 answer

What does PhISwap gate mean in Cirq?

I am currently using the Cirq pakage and when drawing the circuit structure, I constantly encountered the PhISwap gate, like in here. What does this gate mean?
ironmanaudi
  • 799
  • 3
  • 10
2
votes
0 answers

What operators preserve antisymmetry?

I would like to understand better what kind of operators maintain antisymmetry as explained in Quantum simulation of chemistry with sublinear scaling in basis size: Evolution under the Hamiltonian will maintain antisymmetry provided that it exists…
Pablo
  • 603
  • 3
  • 11
2
votes
1 answer

Compute expectation value of an operator in openfermion

I am trying to compute the 2-electron reduced-density matrix (2-RDM) for a given quantum state with openfermion. The code is as follow two_rdm = np.zeros((n_qubits,) * 4, dtype=complex) psi = = openfermion.haar_random_vector(2 ** n_qubits,…
ironmanaudi
  • 799
  • 3
  • 10
1
2