Skip to main content
12 votes

Hamiltonian simulation with complex coefficients

A conventional Hamiltonian is Hermitian. Hence, if it contains a non-Hermitian term, it must either also contain its Hermitian conjuagte as another term, or have 0 weight. In this particular case, ...
DaftWullie's user avatar
  • 59.8k
8 votes

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

For most functions $f(x)$, there is nothing better than calculating all the values. After all, for most functions, there is no better way of defining the function than giving its truth table. ...
DaftWullie's user avatar
  • 59.8k
6 votes
Accepted

Bloch sphere visualization using Cirq, ProjectQ, PyQuil

The answer seems to be "no" for all three. From what I can find, Cirq and PyQuil default to QuTiP for Bloch sphere visualization, and ProjectQ does not have any examples to go off of, nor ...
ryanhill1's user avatar
  • 2,503
4 votes
Accepted

Where can I find a comprehensive list of gate decompositions used by transpilers?

You can use Qiskit's StandardEquivalenceLibrary to get a list of gate decompositions. StandardEquivalenceLibrary is an instance ...
Egretta.Thula's user avatar
4 votes
Accepted

Measuring the Hamiltonian in the VQE

Yes, you can decompose any Hamiltonian. For VQE purposes, any finite-dimensional Hamiltonian can be presented as a sum of terms which consist of tensor products of Pauli matrices (https://arxiv.org/...
Alexey Uvarov's user avatar
3 votes

Hamiltonian simulation with complex coefficients

This simple MATLAB/Octave code shows that $i0.12Z_1Y_2X_3$ is not Hermitian: ...
user1271772 No more free time's user avatar
3 votes
Accepted

Newbie Project: Calculate a Mersenne Prime with Quantum Computing

It's likely that this algorithm hasn't yet been implemented in QISKit / Q# / pyquil etc. It's also important to note that you would not be discovering new Mersenne primes with a quantum computer - the ...
C. Kang's user avatar
  • 1,764
2 votes

VQE for Beginners : Using Tutorial and Cirq

In the tutorial, the RY gate is used. What you are using is different. If you look at the corresponding documentation of that gate, you would see: Note in particular that this gate has a global ...
cnada's user avatar
  • 4,764
2 votes

Can simulations of a quantum algorithm on a classical computer out-perform a classical algorithm?

A simulation cannot outperform the environment in which it is being simulated so yes the answer would be no. If you're asking whether simulations of quantum algorithms show that they can outperform ...
calloga's user avatar
  • 21
1 vote

Can simulations of a quantum algorithm on a classical computer out-perform a classical algorithm?

If a quantum circuit consists of Clifford gates only, for example CNOT, H, X, Y, Z or S, then it can be simulated classically in polynomial time (this is Gottesman-Knill theorem). However, once non-...
Martin Vesely's user avatar
1 vote
Accepted

How to set different Backend Layouts in TKET and pyQuil (Quil compiler)?

If I understand your question correctly I think you should look into TKET's architecture module. https://cqcl.github.io/tket/pytket/api/architecture.html You can for example define a ...
Callum's user avatar
  • 1,075
1 vote

Which method does pyQuil use to compile a Program?

Pyquil uses QuilC to compile programs to native gates: https://github.com/quil-lang/quilc
Bram Evert's user avatar
1 vote
Accepted

How to create a qubit in an arbitrary state in PyQuil

As far as I know, you can only do this with the ReferenceDensitySimulator, which contains a set_initial_state method. This is unfortunate because density matrix ...
Victory Omole's user avatar
1 vote

Pyquil run_and_measure gives the same output across all the trials: is this expected?

And all of result[i]'s turn out to be the same. This is what I get from the program you posted: ...
Victory Omole's user avatar
1 vote

Measuring the Hamiltonian in the VQE

No. The computational basis is not necessarily the basis that diagonalizes the Hamiltonian. It also looks like you are confusing the X basis with the basis of the Hamiltonian. Advice: You should ...
AHusain's user avatar
  • 3,663

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