# Tag Info

18

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 Hamiltonian: $$H = 11 \sigma_z \otimes \sigma_z + 7 \sigma_z \otimes \sigma_x - 5\sigma_z \otimes \sigma_x \otimes \sigma_y$$ The final circuit for $e^{iHt}$ can be ...

15

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 for which simulation is still BQP-complete. The statement will roughly be along the lines of: let $|\psi\rangle$ be a (normalised) product state, $H$ be a ...

11

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, since $Z\otimes X\otimes Y$ is Hermitian itself, the coefficient would have to be 0. So, if you're talking about conventional Hamiltonians, you've probably made a ...

11

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$ are the eigenvectors. Moreover, since $UU^\dagger=I$, we know that $|\lambda_n|^2=1$, and thus we can write $\lambda_n=e^{-i\theta_n}$ for $\theta_n$ in the ...

10

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 + \cdots$ (for the 2-qubit case). To get the coefficients, you can use this formula: $a_{AB}=\frac{1}{4}\textrm{tr}\left((A_1\otimes B_2)H\right)$ For example, here ...

9

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 what the Hamiltonian, any quantum state is a valid state of the system. Where a Hamiltonian comes in useful is, if you know the state at some time (say, $t=0$),...

9

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 constructions that do this using roughly $3 \lg \frac{1}{\epsilon}$ T gates. See "Optimal ancilla-free Clifford+T approximation of z-rotations" by Ross et al. ...

9

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 that Hamiltonian. From that perspective, the Jordan–Wigner transform is a way to find a qubit Hamiltonian corresponding to a given fermionic Hamiltonian. Once you ...

8

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 circuit (i.e. a succession of gates) that acts like $U(t) = e^{-iAt}$ on a quantum state. Here $U(t)$ needs to be unitary (because of the properties of quantum ...

7

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 diagonalisation straightforward), $$H=\sum_{i=1}^mH_i.$$ If the matrix is sparse, then you shouldn't need too many distinct $H_i$. Then you can simulate the ...

7

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 Hamiltonian matrix $H$ isn't the key concern here. The gate complexity (or query complexity, in case the Hamiltonian is described as an oracle) of matrix ...

7

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 2x2 matrix $U$ and a qubit and computes the decomposition $$U = R_Z(\alpha) R_Y(\beta) R_Z(\gamma)$$ This is a common decomposition, you can find a proof here https://arxiv.org/pdf/quant-ph/...

7

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} + [iHt,\hat{a}] + \frac{1}{2!}[iHt,[iHt,\hat{a}] + \cdots$$ Now substitute $H$ into the right-hand side and evaluate the commutators between $\hat{a}$ and ...

7

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 would apply to all Hamiltonians. A Hamiltonian $H$ which is diagonal in a product basis $\mathcal{B}$ is sometimes described as classical, because the evolution ...

7

You can also check their equivalence using Operator, a class from the Qiskit's quantum_info module as follows. from qiskit import * from qiskit.quantum_info import Operator import numpy as np Build and convert each circuit to an operator.( used your name convention for the circuits ) The code below builds and converts the first circuit qrz to op1 qrz = ...

6

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 will use the result obtained from the previous answer. First of all, note that if we have $ABC$ circuit, where $A$, $B$ and $C$ are operators, then the ...

6

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. Here's a general form of the circuit for your reference: This essentially comes down to an issue of how you can reversibly compute a one-bit function $f:\{0,1\... 6 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 want. So, what you should really be thinking about is taking terms in the opposite order: $$e^{iH_1t/2}e^{iH_2t/2}e^{iH_1t/2}e^{iH_2t/2}\approx(e^{i(H_1+H_2)t/2})... 6 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 decomposition$$ A=15\mathbb{I}\otimes\mathbb{I}+9Z\otimes X+5X\otimes Z-3Y\otimes Y. $$Update: It should be +3Y\otimes Y. But I don't want to redraw all my ... 6 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 states in a trapped atom (neutral or ionized in vacuo) and use an applied electric field to implement single-qubit operations (see trapped ions or optical lattices,... 6 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 recall is done below. 1.1 Register names Register names are defined in Figure 5. of Quantum linear systems algorithms: a primer (Dervovic, Herbster, Mountney, ... 6 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,X,Y,Z\}^{\otimes n} $$note this linear combination can have up to 4^n terms. Thus, for a general Hamiltonian splitting it into linear combination of Pauli ... 5 Update on the subject: there are several implementations in the wild. I don't know if you still need them, but even if you don't it will hopefully be useful to other people. I chose to list the implementations by "provenance" rather than by the algorithm used because there are not that much implementations. This may change in the future. Qiskit-... 5 Note: I'm deliberately leaving a few gaps here. Hopefully I'm saying enough to let you piece te rest together! Let's say that you want to implement V on some state$$ \sum_{x\in\{0,1\}^n}\alpha_x|x\rangle $$You can fairly easily write down what that state produces. Think about the Hamiltonian Z^{\otimes n}. What eigenvalues does it have? \lambda=\pm 1... 5 Let's say you have a Hamiltonian of the form$$ H=\sigma_1\otimes\sigma_2\otimes\sigma_2\otimes\ldots\otimes\sigma_n $$There's a straightforward circuit construction that lets you implement its time evolution e^{-iHt}. The trick is basically to decompose the state that you're evolving into the components that are in the \pm 1 eigenspaces of H. Then, ... 5 You want to start by being careful with the sizes of the operators. \hat U acts on q qubits, and \hat H acts on n<q qubits. I believe that |G\rangle is a state of q-n qubits. So, what we really need to talk about is two distinct sets of qubits. Let me call them sets A and B. A contains n qubits, and B contains q-n qubits. I'll use ... 5 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, because devices have qubits at specific locations. For example, if you wanted to run on Bristlecone, you would limit yourself to GridQubit instances that actually ... 5 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 Trotterization is a function of the basis set (in both classical and quantum simulations). The basis set is kinda like a coordinatization the electron orbitals. There are a ... 5 Maybe this will help. Let's take a simple case:$$f(x_1, x_2) = -2x_1 x_2$$Then it is minimum when x_1 = x_2 = 1. Now let's take this Hamiltonian:$$H_f = -2Z \otimes Z$$The Hamiltonian is minimum when we have either |00\rangle or |11\rangle states. So this Hamiltonian doesn't correspond to the f(x_1, x_2). Instead this one looks better:$$H_f = -2 ... 5 I think the problem is in this assumption: $$e^{-i Z \otimes Z \otimes Z t} |110\rangle = e^{Z}|1\rangle e^{Z}|1\rangle e^{-iZt}|0\rangle$$ It shouldn't be right, because, at least,$e^{Z}\$ is not a unitary transformation (normalization is changed). Now let's try to find out the actual action of the operator. Note that in all calculations I have replaced ...

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