We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [pyquil]

A Python library for quantum programming using Quil. http://docs.rigetti.com

Filter by
Sorted by
Tagged with
2
votes
1answer
84 views

Newbie Project: Calculate a Mersenne Prime with Quantum Computing

I am new to the quantum world and wondering the bounds of which the technology is at the current state of the art: specifically in computing prime numbers. I would like to, if possible, create a ...
5
votes
1answer
219 views

How to create the oracle matrix in Grover's algorithm?

I'm trying to implement Grover's algorithm in pyQuil, but I'm having trouble creating the oracle matrix given the function $f$, where $f(x)=1$ if $x=w$ and $f(x)=0$ otherwise. In most of the ...
5
votes
2answers
342 views

Measuring the Hamiltonian in the VQE

I am trying to implement VQE in pyQuil and am dumbfounded by how to measure the expectation value of a general Hamiltonian on $\mathbb{C}^{2^n}$ i.e. determine $\langle\psi , H \psi\rangle$ on a ...
10
votes
2answers
213 views

Hamiltonian simulation with complex coefficients

As part of a variational algorithm, I would like to construct a quantum circuit (ideally with pyQuil) that simulates a Hamiltonian of the form: $H = 0.3 \cdot Z_3Z_4 + 0.12\cdot Z_1Z_3 + [...] + - ...