25 votes

Circuit construction for Hamiltonian simulation

An approach for Hamiltonian simulation: Any Hermitian (Hamiltonian) matrix $H$ can be decomposed by the sum of Pauli products with real coefficients (see this thread). An example of 3 qubit ...
Davit Khachatryan's user avatar
18 votes

What are examples of Hamiltonian simulation problems that are BQP-complete?

There are plenty of different variants, particularly with regards to the conditions on the Hamiltonian. It's a bit of a game, for example, to try and find the simplest possible class of Hamiltonians ...
DaftWullie's user avatar
  • 55.7k
13 votes
Accepted

How can I decompose a matrix in terms of Pauli matrices?

I call this the "Paulinomial decomposition" as you are writing the matrix $H$ as a polynomial of Pauli matrices: $H=a_{XX}X_1X_2 + a_{XY}X_1Y_2 +a_{XZ}X_1Z_2 + a_{XI}X_1 + a_{YY}Y_1Y_2 + \...
user1271772's user avatar
  • 13.5k
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
  • 55.7k
11 votes
Accepted

Ground state energy estimation - VQE vs. Ising vs. Trotter–Suzuki

In each of the examples you mentioned, the task breaks very roughly down into two steps: finding a Hamiltonian that describes the problem in terms of qubits, and finding the ground state energy of ...
Chris Granade's user avatar
11 votes
Accepted

Proof that any unitary can be written as $U=e^{-iH}$ with $H$ Hamiltonian with bounded norm

Since $U$ is a normal matrix, the spectral theorem applies, i.e. we can write $$ U=\sum_n\lambda_n|\lambda_n\rangle\langle\lambda_n|, $$ where $\lambda_n$ are the eigenvalues, and $|\lambda_n\rangle$ ...
DaftWullie's user avatar
  • 55.7k
9 votes
Accepted

Advantage of simulating sparse Hamiltonians

The insight that suggests that sparse matrices are useful goes along the lines of: for any $H$, we can decompose it in terms of a set of $H_i$ whose individual components all commute (making ...
DaftWullie's user avatar
  • 55.7k
9 votes
Accepted

Obtaining gate $e^{-i\Delta t Z}$ from elementary gates

One way order to perform Z rotations by arbitrary angles is to approximate them with a sequence of Hadamard and T gates. If you need the approximation to have maximum error $\epsilon$, there are known ...
Craig Gidney's user avatar
  • 33.4k
9 votes

How do I construct a Density Matrix corresponding to a Hamiltonian?

Your question remains very unclear as to what it actually is that you want to calculate. There is no direct correspondence between a system Hamiltonian and the quantum state of the system. No matter ...
DaftWullie's user avatar
  • 55.7k
9 votes
Accepted

Intuition behind the construction of an ansatz circuit

Interesting question! An ansatz circuit is a parameterized circuit, say $V(\theta)$ where $\theta$ are a set of parameters, used to prepare a trial state for your problem: $$ |\Psi(\theta)\rangle = V(\...
Cryoris's user avatar
  • 2,863
9 votes

Why are diagonal Hamiltonians considered classical?

Classical Hamiltonians By the spectral theorem, for every Hamiltonian there exists a basis in which it is diagonal. Thus, it is not correct to say that diagonal Hamiltonians are classical since this ...
Adam Zalcman's user avatar
  • 20.8k
8 votes

Circuit construction for Hamiltonian simulation

Controlled version of $e^{iHt}$: Often in the algorithms (e.g. in HHL or PEA), we want to construct not the circuit for Hamiltonian simulation $e^{iHt}$, but the controlled version of it. For this, we ...
Davit Khachatryan's user avatar
8 votes
Accepted

How to implement a matrix exponential in a quantum circuit?

Reformulating your question: How to perform Hamiltonian Simulation for a generic square matrix $A$? Quick answer: it is not possible. The goal of Hamiltonian Simulation (HS) is to find a quantum ...
Adrien Suau's user avatar
  • 4,787
8 votes

How are elementary quantum gates realised?

Generally speaking, a realization of a quantum gate involves coherent manipulation of a two-level system (but this is nothing new to you, maybe). For example, you can use two long-lived electronic ...
GroundhogState's user avatar
8 votes
Accepted

If a Hamiltonian is quadratic in the ladder operator, why is its time evolution linear in the ladder operator?

Hint: Instead of using the BCH formula in the form usually presented, for example at the top of this Wikipedia page, use this consequence of Hadamard's Lemma: $$\tag{1} e^{iHt}\hat{a}e^{-iHt} = \hat{a}...
user1271772's user avatar
  • 13.5k
8 votes
Accepted

Why was Feynman hesitant about simulating fermions with a quantum computer?

My guess is that this has to do with worrying about correctly capturing the antisymmetric properties of fermions (that when you swap two fermions, the wave function acquires a $-1$ phase). There is ...
dabacon's user avatar
  • 675
7 votes
Accepted

Quantum algorithm for linear systems of equations (HHL09): Step 2 - What is $|\Psi_0\rangle$?

1. Definitions Names and symbols used in this answer follow the ones defined in Quantum linear systems algorithms: a primer (Dervovic, Herbster, Mountney, Severini, Usher & Wossnig, 2018). A ...
Adrien Suau's user avatar
  • 4,787
7 votes
Accepted

Number of Qubits Required for Simulation of Caffeine and Penicillin Molecules

I'm not sure if the 286 qubit estimate has ever been fully explained, but we can backwards reason about how to get to the figure. First off, accuracy of quantum chemistry simulations via ...
C. Kang's user avatar
  • 1,684
7 votes
Accepted

Where does precisely the difficulty in exponentiating a Hamiltonian $H$ in the quantum simulation problem lay?

TL;DR: Hamiltonian simulation does not just mean "exponentiating $H$". It means finding a quantum circuit $U$ that approximates the matrix exponentiation $e^{-iHt}$. More importantly, the size of the ...
Sanchayan Dutta's user avatar
7 votes

Quantum circuit to implement matrix exponential

There is actually a nice way to do this in Qiskit, since it has decompositions for single-qubit unitaries built in. The QuantumCircuit.squ method takes a unitary ...
Cryoris's user avatar
  • 2,863
7 votes
Accepted

Quantum Circuit for $e^{iAt}$ Hamiltonian Simulation in HHL algorithm

As requested through the comment by the OP. Given a Hermitian matrix $H$, we can always write it as linear combination of Pauli strings. That is, $$ H = \sum_i \alpha_i P_i \hspace{1 cm} P_i \in \{I,...
KAJ226's user avatar
  • 13.7k
7 votes
Accepted

Why is the time ordering omitted in the trotterised version of the time-dependent evolution operator?

Ok, here's my attempt: take a time-dependent Hamiltonian $H(t)$ and consider its evolution in the time interval $[0,t]$. Discretize this interval in $k$ steps of length $\Delta \tau \equiv t/k$ $$ \...
Gianni Mossi's user avatar
7 votes

Are these two circuits equivalent in performing controlled time-evolution?

You can also check their equivalence using Operator, a class from the Qiskit's quantum_info module as follows. ...
HwajungKang's user avatar
6 votes
Accepted

Clarification of a procedure to compute the product of the exponential of two matrices

Your reasoning is correct if your two Hamiltonians commute. But, as you say, it doesn't work if they don't commute. In that case, the trick is to find something that approximates the the thing you ...
DaftWullie's user avatar
  • 55.7k
6 votes
Accepted

Practical implementation of Hamiltonian Evolution

I don't know why/how the authors of that paper do what they do. However, here's how I'd go about it for this special case (and it is a very special case): You can write the Hamiltonian as a Pauli ...
DaftWullie's user avatar
  • 55.7k
6 votes
Accepted

Simulating a 3-local Hamiltonian Term

Yes, in this special case the circuit will simplify as you suggest. The advantage of the circuit that was given is that it generalises more easily, and works for any $H$ which has $\pm 1$ eigenvalues. ...
DaftWullie's user avatar
  • 55.7k
6 votes
Accepted

GridQubit in Cirq vs LineQubit

When using a simulator, it doesn't really matter what kind of qubit you refer to. You can even mix-and-match the types. The type of qubit only becomes relevant when you intend to run on a device, ...
Craig Gidney's user avatar
  • 33.4k
6 votes

If a Hamiltonian is quadratic in the ladder operator, why is its time evolution linear in the ladder operator?

Use the differential form of the time evolution, $$dO/dt=i[H, O]\ .$$
Norbert Schuch's user avatar
6 votes

How to construct the two qubit gate generated by the Hamiltonian $H= X\otimes X + Y \otimes Y + Z \otimes Z $?

TL;DR: The two-qubit gate corresponding to the Hamiltonian is the SWAP gate. For an operator $A$ that squares to identity $A^2=I$, we have $e^{i\theta A} = I\cos\theta +iA\sin\theta$. In our case the ...
Adam Zalcman's user avatar
  • 20.8k
6 votes
Accepted

VQE - How to get from expectation value to eigenvalue?

First, note that we can only measure in the computational basis in quantum computing (at least at the moment). But this is not a problem since \begin{align} \langle \psi | H | \psi \rangle = \langle \...
KAJ226's user avatar
  • 13.7k

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