16

Specific Circuit The first gate is a Hadamard gate which is normally represented by $$\frac{1}{\sqrt{2}}\begin{bmatrix}1&1\\1&-1\end{bmatrix}$$ Now, since we're only applying it to the first qubit, we use a kronecker product on it (this confused me so much when I was starting out - I had no idea how to scale gates; as you can imagine, it's rather ...


7

The Hilbert space dimension of $n$ qudits is $d^n$, where $d$ is the dimension of the qudit ($d=2$ for qubit, $d=3$ for qutrit, etc). So three qubits have an $8$ dimensional space, two qutrits have a $9$ dimensional space, and one $d=6$ qudit has a six dimensional space. As such, we cannot regard them as equivalent. I guess you meant to compare situations ...


6

From IBM Q Documentation (the link is hard to find) here is the definition of the generic gate: $$ U(\theta, \phi, \lambda) = \begin{pmatrix} \cos\left(\frac{\theta}{2}\right) & -e^{i\lambda} \sin\left(\frac{\theta}{2}\right) \\ e^{i\phi} \sin\left(\frac{\theta}{2}\right) & e^{i(\lambda + \phi)} \cos\left(\frac{\theta}{2}\right) \end{pmatrix} $$ ...


6

This is actually a much easier problem. In the case of states, you're trying to use the PPT criterion, or others, to distinguish if $\rho$ can be written in the form $$ \rho=\sum_ip_i\sigma^A_i\otimes\sigma^B_i, $$ where $\sum_ip_i=1$ and the $\sigma^A_i$ and $\sigma^B_i$ are valid states on single sites. The difficulty actually comes from the freedom that ...


5

Since your desired operation is a non-injective function, you need a third qubit and a unitary acting on all three qubits. Using an operator on your two input qubits and tensoring this with ${\rm I}_2$ on the third qubit is not going to work as you might as well forget about the third qubit completely if that were the case. By the way, the two matrices you ...


5

All quantum operators must be unitary. Unitary means the conjugate-transpose of the operator is its inverse. In your case: $UU^{\dagger} = \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & ...


5

Immediately, we can see that $$ A = |1\rangle\langle0| + |0\rangle\langle1|. $$ If the input and out bases are $\{|0\rangle, |1\rangle\}$, then $$ |0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \quad |1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix} \quad\textrm{and}\quad \langle0| = \begin{pmatrix} 1 & 0 \end{pmatrix}, \quad \langle1| = \begin{pmatrix}...


5

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 ...


5

A matrix is positive if and only if it is Hermitian (and thus unitarily diagonalizable) and all its eigenvalues are positive (that they are real follows automatically from it being Hermitian). If this is not the way you define a positive operator, then you need to specify how you do so that we can prove the equivalence. In other words, $A$ is positive, $A\...


5

The CNOT gate is a 2-qubit gate, and consequently, its operation cannot be expressed by the tensor product of two one-qubit gates as the example you gave with the Hadamard gates. An easy way to check that such matrix cannot be expressed as the tensor product of two other matrices is to take matrices $A =\begin{pmatrix}a & b \\ c & d\end{pmatrix}$ $...


5

That's not the right way to look at it. In quantum mechanics, time evolutions are considered to be unitary and any unitary evolution can be written as a sequence of unitary operators $U_1, U_2, U_3,\ldots$ acting on a quantum state $|\Psi\rangle$. Any single-qubit unitary operation is a $2\times 2$ matrix of the form: $$U=\begin{pmatrix}a&b\\-e^{i\phi}b^...


4

You can use Python with Qiskit. Say your string representation is written using OpenQASM syntax. qasm = """ OPENQASM 2.0; include "qelib1.inc"; qreg q[2]; h q[0]; t q[1]; cx q[0], q[1]; """ You can build a circuit out of this and simulate it on a unitary simulator: import qiskit as qk import numpy as np circuit = qk.load_qasm_string(qasm) result = qk....


4

Consider the linear maps $A: V\to W$ and $B: W\to X$. The composition $BA$ is a linear map from $V$ to $X$. Now, how can $\mathcal{M}(BA)$ be computed from $\mathcal{M}(B)$ and $\mathcal{M}(A)$? $\mathcal{M}(A)$ is the $n\times p$ matrix representation of the linear map $A$ w.r.t the basis $\{v_1,...,v_p\}$ and $\{w_1,...,w_n\}$. $\mathcal{M}(B)$ is the $m\...


4

This is called Sylvester's Criterion. There's plenty of information available once you have the name. The linked wikipedia article contains a proof. Strictly, Sylvester's Criterion requires that $W_2,W_3,W_4> 0$ for the state to be positive under the partial transpose. However, for a density matrix, $W_2$ is always positive semi-definite. This is because ...


3

If we write $$ U=\sum_{i,j}U_{ij}|i\rangle\langle j|\quad V=\sum_{kl}V_{kl}|k\rangle\langle l|, $$ and $$ |x\rangle=\sum_jx_j|j\rangle\quad |y\rangle=\sum_ly_l|l\rangle, $$ then we can evaluate both sides of the equation $$ (U\otimes V)(|x\rangle\otimes|y\rangle)=(U|x\rangle)\otimes(V|y\rangle) $$ using the definition of the tensor product as $$ U\otimes V=\...


3

I will give you a few elements for the demonstration on real vectors which you can extend to complex. Let {$e_i$} be the standard basis for the space where $U (n*n)$ is defined . Let {$e_j$} be the standard basis for the space where $V (m*m)$ is defined. First, it is a property that the basis {$e_i \otimes e_j$} is a basis for the n*m-matrices space. $ U \...


3

$$ | \psi_3 \rangle = a | 0 1 1 \rangle + b | 1 1 1 \rangle\\ $$ Because the 1 on B and C criterion is met. $$ | \psi_4 \rangle = a | 0 0 1 \rangle + b | 1 1 1 \rangle\\ $$ Because only the first term meets the criterion for the controls so it is the only part affected to flip the B index. $$ | \psi_5 \rangle = a | 0 0 0 \rangle + b | 1 1 1 \rangle\\ $$ ...


3

Your bit strings $x$ in the case when you specify $2$ bits are $00$, $01$, $10$, $11$. Now you want to output the result in another bit/qubit. Whether the outpit bit/qubit is initialized as $0$ or $1$ should not change your unitary operation. The only thing changing is the initial quantum state your system is onto where you apply the unitary operation ...


3

Note that the first two are proportional with a $e^{i \theta /2}$ factor. Even as you tensor with other gates and continue multiplying, this just comes out in front as an unobservable global phase. Distinguishing the last one you can tell by looking at the range of angles they allow. 0 to $2\pi$ etc. If the authors fail to include their conventions , you ...


3

Mostly I'm confused over whether the common convention is to use +i or -i along the anti-diagonal of the middle 2x2 block. The former. There are two $+i$'s along the anti-diagonal of the middle $2\times 2$ block of the iSWAP gate. See page 95 here[$\dagger$]. [$\dagger$]: Explorations in Computer Science (Quantum Gates) - Colin P. Williams


3

The main criteria that you need, in order to multiply by a matrix on a quantum computer (in the sense of permuting the states, not in the sense of adjusting the amplitudes) is for the matrix to have an inverse. You can find this inverse by performing Guassian elimination. Performing the Guassian elimination spits out exactly the operations you will need to ...


3

Firstly, there's a conceptual error in your calculation of the eigenvectors. $$\begin{bmatrix} x\\y \end{bmatrix}=\begin{bmatrix} \tfrac{1}{\sqrt{2}} &\tfrac{1}{\sqrt{2}} \\ \tfrac{1}{\sqrt{2}} & -\tfrac{1}{\sqrt{2}} \end{bmatrix}\begin{bmatrix} x\\y \end{bmatrix}$$ $$(\sqrt{2}-1)x=y \tag{1}$$ $$(\sqrt{2}+1)y=x \tag{2}$$ (1) and (2) are ...


3

Lets understand this first using Bra-Ket notation then we move on to answering : what does a matrix maps by just looking at it. Lets get some basics out of the way, the vectors $\vert 0 \rangle$ and $\vert 1 \rangle$ are represented by, \begin{equation} \vert 0 \rangle = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \ \ \ \ \ \& \ \ \ \vert 1 \rangle = \begin{...


3

Assuming the first qubit is the control, and then there are three target qubits, the $CZZZ$ gate would be: $$|0\rangle\langle0| \otimes I \otimes I \otimes I + |1\rangle\langle1| \otimes Z \otimes Z \otimes Z$$ Essentially, the first term projects out the $|0\rangle$ state of the control qubit and applies the identity to the targets in that case, and the ...


2

Whether you use $+i$ or $-i$ is entirely up to you. After all, your definition of $\pm i$ is merely a convention. On the other hand, I think I've only ever seen it with $+i$. On a more general footing, you can consider that iSWAP is the gate obtained by time-evolving with an XX interaction ($H=-\sigma_x\otimes\sigma_x - \sigma_y\otimes\sigma_y$), in ...


2

A $9\times 9$ matrix $H$ can act on a $9$ dimensional state vector, say something like: $$|\Psi\rangle = a_0|0\rangle + a_1|1\rangle + .... + a_8|8\rangle$$ Now, say you want to find the matrix which only acts on the subspace spanned by the basis $\{|0\rangle,|1\rangle\,|2\rangle,|3\rangle\}$, but has the same effect as the original $H$ matrix. Find, $H|...


2

On a vector space $V = \textrm{span}(\{|v_1⟩, \ldots, |v_n⟩\})$, the identity operator $\mathcal{I}$ maps each vector to itself, such that $$ \mathcal{I} = \sum_i |v_i⟩⟨v_i|. $$ If $\{|v_1⟩, \ldots, |v_n⟩\}$ is chosen as the basis for the matrix representation, then we set $$ |v_1⟩ = \begin{pmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}, \quad |v_2⟩ = \...


2

They are not equivalent. It can be seen by the fact that the system of $3$ qubits acts on a $8$ dimensional Hilbert space, the 2 qutrit system acts on a $9$ dimensional Hilbert space, and the 6 level qunit acts on a $6$ dimensional Hilbert space. Consequently, the nature of the states defined by each of the quantum systems is different. This dimension ...


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