2022 Developer Survey is open! Take survey.
5 votes

Finding the norm of a Hamiltonian

The spectral norm $\|H\|$ (sometimes denoted$^1$ $\|H\|_2$ or $\|H\|_\infty$) in this case is the largest eigenvalue of $H$. There's no meaningful bound for this number without having additional ...
user avatar
  • 4,537
4 votes
Accepted

How to perform a controlled Pauli string rotation gate?

This is nearly a built-in decomposition in cirq. Here's what happens when you decompose a Pauli product: ...
user avatar
  • 21.8k
3 votes
Accepted

What does PhISwap gate mean in Cirq?

In Cirq, the PhasedISwapPowGate (i.e. PhISwap) is a fractional ISWAP conjugated by Z rotations. With phase exponent $p$ and ...
user avatar
  • 1,626
3 votes
Accepted

noisy circuit by openfermion

Note that OpenFermion interoperates with cirq to provide many features that are not specific to quantum chemistry. You can add noise to your circuits like this ...
user avatar
2 votes
Accepted

implement variational quantum eigensolver with openfermion

I recommend using OpenFermion in conjunction with QCOR, a quantum programming language being developed at Oak Ridge National Laboratory. This tool offers python bindings and has abstractions for ...
user avatar
2 votes
Accepted

Hartree Fock state in Openfermion

The Hartree-Fock state in Openfermion has $1$'s in the left positions, and $0$'s in the right positions. In other words, the spin orbitals (i.e: the qubits) are ordered from least energy to most ...
user avatar
1 vote
Accepted

Evaluating $\texttt{FermionOperator}$ equality in Openfermion

This looks like a bug$^1$. Look at following lines of code from the v1.3.0 release branch for the implementation of SymbolicOperator.isclose (which implements ...
user avatar
  • 4,537
1 vote
Accepted

Compute expectation value of an operator in openfermion

From the openfermion documentation (see here), it says the operator must be a scipy.sparse matrix. So, replacing ...
user avatar
1 vote

Openfermion : `get_sparse_operator` issue

This is normal! If you look at the molecular Hamiltonian ozone_molecule.get_molecular_hamiltonian(), you will notice that it is a Hamiltonian that acts on 30 spin ...
user avatar
1 vote

How to get a molecular Hamiltonians in OpenFermion

Qiskit allows you to build the customized geometry of the molecule. You can also adjust the charge and multiplicity. For example, to build the Hydrogen molecule with a given equilibrium distance ED, ...
user avatar
  • 37

Only top scored, non community-wiki answers of a minimum length are eligible