# Tag Info

### 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, ...
• 59.8k

### 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. ...
• 59.8k
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 ...
• 2,503
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 ...
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/...

### Hamiltonian simulation with complex coefficients

This simple MATLAB/Octave code shows that $i0.12Z_1Y_2X_3$ is not Hermitian: ...
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 ...
• 1,764

### 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 ...
• 4,764

### 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 ...
• 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-...
• 14.6k
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 ...
• 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
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 ...
• 1,736
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: ...
• 1,736
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 ...
• 3,663

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