Skip to main content
8 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: ...
Craig Gidney's user avatar
  • 38.8k
6 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 ...
forky40's user avatar
  • 7,183
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 ...
ryanhill1's user avatar
  • 2,503
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 ...
Adam Zalcman's 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 ...
Cuhrazatee's 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 ...
Solarflare0's user avatar
1 vote

How to write an XY model Hamilonian which is in the summation form in Qiskit (1.1.0)

In Qiskit, observables as usually defined as instances of SparsePauliOp class. Its newly added static method from_sparse_list() ...
Egretta.Thula's user avatar
1 vote

How to perform a controlled Pauli string rotation gate?

This decomposition is now built into pytket. As pointed out by the accepted answer, you can make a controlled Pauli string rotation (aka a controlled Pauli gadget) by only controlling on the central $...
Callum's user avatar
  • 1,065
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 ...
forky40's user avatar
  • 7,183
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 ...
Solarflare0's 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 ...
Solarflare0's 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, ...
Amin's user avatar
  • 57

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