Questions tagged [matrix-representation]

For questions about matrix representations of quantum gates.

Filter by
Sorted by
Tagged with
1
vote
1answer
59 views

How does the graphical notation used to denote doubly-controlled gates work?

$\qquad$ $\qquad$ What is the difference between solid and hollow? How to express the corresponding matrix of these figures? In addition, if they are not adjacent, what should be done in the middle of ...
-1
votes
2answers
77 views

Nielsen and Chuang: Demonstration of equation 2.12

First, I apologize if something is poorly written but English is not my first language. Reproduced from Nielsen & Chuang's Quantum Computation and Quantum Information (10th Anniversary Edition) in ...
1
vote
0answers
38 views

Step-by-step passages in calculation

I would like to better understand some passages in a paper (Appendix A): Properties of Tensor Product Bilinearity: $A\otimes(B+ C) = A \otimes B + A \otimes C $ Mixed-product property: $(A\otimes B)(...
1
vote
2answers
125 views

How to find the matrix representation of an operator from its action on a basis?

First, I apologize if something is poorly written but English is not my first language. I know that these exercises have been solved in this question. But I do not agree. Inner product and concrete ...
5
votes
2answers
96 views

Representation of rotation operators $e^{-i\theta(I-Z_1\otimes Z_2 \otimes Z_3)}$ about arbitrary axis for $3$ qubits

I was wondering in how to interpret and represent the operator $e^{-i\theta(I-Z_1\otimes Z_2 \otimes Z_3)}$ for a 3 qubit system in a circuit using qiskit. I was thinking I could just perform an ...
2
votes
3answers
169 views

How to spot the matrix representation of the quantum NOT operation

Applying the above construction to AND we get the map $(x1,x2,y) \rightarrow (x1,x2,y⊕(x1∧x2))$ for $x1,x2,y \in \{0,1\}$. The unitaryoperator which implements this is then simply the map $|x1〉|x2〉|y&...
2
votes
3answers
53 views

Show that a $CZ$ gate can be implemented using a $CNOT$ gate and Hadamard gates

Show that a $CZ$ gate can be implemented using a $CNOT$ gate and Hadamard gates and write down the corresponding circuit. Recall from Quantum Information Theory that $Z=HXH$. As $CNOT$ is a ...
1
vote
3answers
97 views

Deriving a controlled Kraus operator from an uncontrolled Kraus operator

I have a Kraus operator $M$. $M$ is composed of a list of matrices $M_k$ satisfying $$\sum_{k} M_k^\dagger M_k = I$$ I would like to control the application of $M$ using a control qubit. This ...
0
votes
1answer
59 views

Expressing a term of an $n$-qubit Hamiltonian in terms of Pauli operators

Consider a $2^n\times 2^n$ Hermitian matrix $M$ containing up to two non-zero elements, which are $1$ (so, either $M_{ii}=1$ for some $i$, or $M_{ij}=M_{ji} = 1$ for some $i$ and $j$). Each such ...
0
votes
1answer
73 views

Nielsen & Chuang Exercise 4.34 “Measuring an operator”

I need help with the exercise 4.34 from Nielsen & Chuang Book. I am supposed to get a matrix corresponding to the circuit. Thanks
2
votes
1answer
73 views

Generic matrix exponential in Q#

I am trying to find a way to implement a unitary transformation in Q# that implements e^(iA) where A is a square matrix. However, I only found ways to do this in Q# if A can be represented as a ...
0
votes
1answer
57 views

Find the decomposition of the following matrix into two level unitary matrices [duplicate]

Find the decomposition of the following matrix into two level unitary matrices: $$ \frac{1}{2} \begin{pmatrix} 1 & 1 & 1 & 1\\ 1 & i & -1 & -i\\ 1 & -1 & 1 & -1\\ ...
2
votes
1answer
70 views

Matrix definition of the Ising XX gate

On the English Wikipedia, $XX$ Ising gates are defined in matrix form as : $$ XX(\phi) = \begin{bmatrix}\cos(\phi)&0&0& -i \sin(\phi)\\ 0&\cos(\phi)&-i \sin(\phi) & 0 \\ 0 &...
1
vote
1answer
34 views

Show how the Bell state arises from the circuit with Hadamard and CNOT, using matrix notation

I understand that starting with , we can get to $\vert \Phi^+ \rangle$. First, we start with $\vert Q_1 \rangle \otimes \vert Q_2 \rangle = \vert 0 \rangle \otimes \vert 0 \rangle$ and then applying ...
1
vote
1answer
73 views

Trying to use matrices for Hadamard and Controlled Not gates

I have the following simple quantum circuit: This outputs are 00 and 11 for the two qubits. Using matrices, I have applied the H gate to the first qubit (ket 0): $\frac{1}{\sqrt{2}}\begin{pmatrix}1&...
2
votes
1answer
59 views

2 qubit gate operation on multi qubit systems

Considering a 3 qubit system, what does the matrix operation will look like if I apply CNOT on qubit 1 and qubit 2 and then apply CNOT on qubit 1 and qubit 3?
6
votes
2answers
138 views

How to represent an $n$-qubit circuit in matrix form?

If a given quantum circuit has $n$ qubit inputs and a certain number of gates, how can we represent the whole circuit in matrix form? Here's an example: I am sorry, I am confused on how to express ...
1
vote
1answer
99 views

What is the general matrix for the Swap gate?

In section 3.3.2 of this PDF, The general SWAP gate is defined as $ S (\alpha, \hat{y}) = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos(\alpha/2) & -\sin(\alpha/2) & ...
2
votes
1answer
204 views

Non-unitary matrix decomposition as a sum of unitary matrices

Several quantum algorithms that deals with linear algebra and matrices that are not necessarily unitary circumvent the problem of non-unitary matrices by requiring a decomposition of the non-unitary ...
1
vote
1answer
80 views

Syndrome extraction operator as matrix?

I am trying to understand how to achieve the syndrome extraction operator matrix in quantum repetition code (if it even exists). It is given that the syndrome is defined here (page 4) as: [perform]...
4
votes
3answers
232 views

Representing qubit swap using linear algebra

I want to write matrix representation of qubit swap algorithm, but I seem to be stuck. Here is the circuit I am trying to calculate using linear algebra: Initially $q_0 = |0\rangle$ or $\begin{...
4
votes
3answers
115 views

How do I write the matrix for a CZ gate operating on nonadjacent qubits?

I'm working on a teleport protocol and I need to open the matrix of each operator, however, there's a CZ gate between q0 and q2 at the end of it and I don't know how to write the matrix for it and ...
2
votes
1answer
68 views

How do I apply a controlled gate to specific qbits in the register?

Say, I have a specific scheme, where I need to specify inputs for controlled R logical gate, which here is $$ R(\theta)=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 &...
0
votes
1answer
49 views

Controlled phase shift gate

How does a controlled R gate look like (matrixwise)? And how to generate CCR, CCCR and so on?
5
votes
2answers
81 views

How to efficiently calculate the inverse of a Kronecker product?

This is a follow-up question to a previous question I had, where the correct answer was to use the Kronecker product. Given, for example, a vector representing two qbits $$\begin{bmatrix}0 \\ 1 \\ 0 \...
3
votes
2answers
76 views

What is the matrix representation for $n$-qubit gates?

Let's say I have more than one qbits $|0\rangle|1\rangle$ and I want to perform a $H$ on both of them. I know the matrix representation for the Hadamard on a single qbit is $$\frac{1}{\sqrt{2}}\begin{...
6
votes
2answers
870 views

Can arbitrary matrices be decomposed using the Pauli basis? [duplicate]

Is it possible to decompose a hermitian and unitrary matrix $A$ into the sum of the Pauli matrix Kronecker products? For example, I have a matrix 16x16 and want it to be decomposed into something ...
7
votes
2answers
397 views

Could the Hadamard gate have been constructed differently with similar characteristics?

Say we had a Hadamard-like gate with the -1 in the first entry instead of the last. Let's call it $H^1$. $$H = \begin{bmatrix}1&1\\1&-1\end{bmatrix}$$ $$H^1 = \begin{bmatrix}-1&1\\1&...
3
votes
1answer
57 views

Can I find the states of individual qubits in a quantum register using only linear algebra?

Say I have a quantum register consisting of two qubits like this $\left| -,0\right>$ which as a vector would be $\frac{1}{\sqrt{2}}(1, 0, -1, 0)$. If I only started with this vector, would it ...
2
votes
1answer
40 views

Why is $Z_1Z_2$ spanned by this set ? Surely it's too small?

In the context of stabilizer codes my lecturer writes that $Z_1Z_2$ is spanned by $\{|000\rangle,|001\rangle,|110\rangle\, |111 \rangle \}$. But I don't see how this spans the matrix as it's given by ...
2
votes
2answers
181 views

Trace preserving condition in Choi's thorem

Choi's theorem states that any completely positive map $\Phi(\cdot) : C^*_{n\times n} \rightarrow C^*_{m \times m}$ can be expressed as $\Phi(\rho) = \sum_{j=1}^r F_j^\dagger \rho F_j$, for some $n \...
5
votes
1answer
132 views

A basic question on circuits and matrix representation

I have several (rather basic) questions on matrix representation of circuits and I would be very grateful to anyone that could clear up my confusion, thank you in advance. 1) When reading circuit ...
1
vote
3answers
537 views

Controlled Z gate acting on 3 qubits in matrix form

For a controlled Z gate $CZ_{1,2,3}$ acting on 3 qubits, which of the following is correct? If it is the first one then what is the difference between that and a CZ gate acting on qubits 1 and 3? $$I ...
5
votes
1answer
93 views

Equivalent determinant condition for Peres-Horodecki criteria

The Peres-Horodecki criteria for a 2*2 state states that if the smallest eigenvalue of the partial transpose of the state is negative, it is entangled, else it is separable. According to this paper (...
2
votes
2answers
126 views

How do I write a tensor product of conditional gates in matrix form?

I am writing a program where I need to find the eigenstates of an operator that is a Kronecker product of conditional quantum gates. I am wondering how I would compute this product in matrix form as ...
4
votes
1answer
157 views

What applications does the quantum gate [(i,1),(1,i)] have?

I've been working through the great introduction to quantum computing on Quantum Country. One exercise there is to find a possible quantum gate matrix that is not the $X,I$ or $H$ matrix. I thought ...
1
vote
1answer
247 views

Matrix representation of multiple qubit gates (Hadamard transform on single wire)

I would like to know how the unitary matrix for this circuit looks like: I'm not sure but I would try something like this: First part: $\begin{pmatrix}1&0\\0&0\end{pmatrix}\otimes H_1=\...
3
votes
1answer
116 views

How to interpret the matrix representation of a quantum gate?

I am trying to understand how the quantum gates work, so I started with the simplest one, the Pauli X gate. I get that it turns $|0\rangle$ into $|1\rangle$ and $|1\rangle$ to $|0\rangle$. So my ...
3
votes
2answers
519 views

Square root of CNOT and spectral decomposition of the Hadamard gate

I'm trying to compute the spectral decomposition of the Hadamard gate but I'm making a mistake somewhere. Note: I believe (though I may be wrong so correct me if I am) that spectral decomposition is ...
1
vote
1answer
72 views

Error in showing $\operatorname{CPHASE}_{12}=\operatorname{CPHASE}_{21}$ in the matrix representation

I read that the relation $\operatorname{CPHASE}_{12}=\operatorname{CPHASE}_{21}$ in the matrix representation but when I tried to work it out I don't see how. $\operatorname{CPHASE}_{12}$ acts in the ...
2
votes
1answer
378 views

Quantum addition and modulo operation using gates

I have a matrix equation $X_{\text{new}}=AX_{\text{old}}$, where $A=\begin{bmatrix}1 & 1 & 1\\ 2 & 3 &2\\ 3&4&4 \end{bmatrix}\bmod 64$, and $X_{\text{old, new}}\in \{1,2,...64\}...
0
votes
0answers
34 views

How are multi-qubit gates extended into larger registers? [duplicate]

Implementing a single-qubit gate in a multi-qubit register is relatively easy. For example, this gate: This is equivalent to $I \otimes H \otimes I$. If the $H$ gate was on the first bit, it would be ...
4
votes
1answer
125 views

Differentiate between local and global unitaries

Just like we have the PPT, NPT criteria for checking if states can be written in tensor form or not, is there any criteria, given the matrix of a unitary acting on 2 qubits, to check if it is local or ...
6
votes
1answer
178 views

Is quantum computer equivalent to Turing machine with matrix multiplication oracle?

Since quantum computer with $n$ qubits is described by a $2^{n}\times2^{n}$ unitary matrix is it equivalent to an oracle that can do multiplication of large matrix and return $n$ numbers computed ...
2
votes
0answers
48 views

Nielsen & Chuang Exercise 2.2 - Matrix representations in different input and output basis [duplicate]

This is a question in the Nielsen and Chuang textbook (Exercise 2.2). Suppose $V$ is a vector space with basis $|0\rangle$ and $|1\rangle$ and $A$ is a linear operator from $V \to V$ such that $...
10
votes
3answers
3k views

How to construct matrix of regular and “flipped” 2-qubit CNOT?

When constructing the matrices for the two CNOT based on the target and control qubit, I can use reasoning: "If $q_0$==$|0\rangle$, everything simply passes through", resulting in an Identity matrix ...
5
votes
0answers
175 views

Efficient implementation of the Clifford group for $n$ qubits

I'm looking for an efficient implementation of the Clifford group $\mathcal{C}_n$ of $n$ qubits. The Clifford group $\mathcal{C}_n$ has stucture $(2_+^{1+2n} \circ C_8).Sp(2,n)$, where $2_+^{1+2n}$ ...
4
votes
0answers
147 views

Clock matrix vs matrix clock

In the process of research leading up to my previous question, I found out about matrix, vector & logical clocks. The citation in the aforementioned question mentions clock and shift matrices. ...
2
votes
1answer
384 views

Building a matrix corresponding to the teleportation circuit

I'm trying to build the matrix that corresponds to this quantum teleportation circuit, but it never works when I test it in the quirk simulator, I tried finding the matrix corresponding to every part ...
6
votes
1answer
274 views

How can we be sure that for every $A$, $A^\dagger A$ has a positive square root?

In the Polar Decomposition section in Nielsen and Chuang (page 78 in the 2002 edition), there is a claim that any matrix $A$ will have a decomposition $UJ$ where $J$ is positive and is equal to $\sqrt{...