We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [matrix-representation]

For questions about matrix representations of quantum gates.

Filter by
Sorted by
Tagged with
2
votes
2answers
41 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{...
3
votes
2answers
210 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
349 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
51 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
39 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
150 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
76 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
360 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
68 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
76 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
120 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
109 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
77 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
303 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
50 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
200 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
31 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
98 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
134 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
35 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 $...
5
votes
3answers
1k 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
116 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
99 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. ...
1
vote
1answer
269 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
169 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{...
1
vote
2answers
74 views

How to properly write the action of a quantum gate implementing an operator $U$ on the superposition of its eigenvectors?

Let's say, that we are in the possession of a quantum gate, that is implementing the action of such an operator $$ \hat{U}|u \rangle = e^{2 \pi i \phi}|u\rangle $$ Moreover, let's say, that this ...
0
votes
1answer
214 views

What's the matrix representation of this 3 qubit circuit?

How do I calculate the matrix representation of this part of a teleportation circuit? It must be a matrix of dimension 8.
1
vote
1answer
216 views

Matrix representation and CX gate [duplicate]

I am having hard time figuring out how the CX (controlled-NOT) gate is represented in the matrix representation. I understood that tensor product and the identity matrix are the keys, and I ...
4
votes
3answers
219 views

Simple proof that $(U \otimes V)(|x\rangle \otimes |y\rangle) = U|x\rangle \otimes V|y\rangle$?

This transformation comes up a lot during symbolic manipulation of quantum operations on state vectors. It's the reason why, for instance, $(X\otimes \mathbb{I}_2)|00\rangle = |10\rangle$ - it lets us ...
1
vote
1answer
84 views

Solving a circuit implementing a two-level unitary operation

The circuit below implements the following two-level unitary transformation: $\tilde{U}$ is a unitary matrix: $\tilde{U} = \left[\begin{matrix} a & c \\ b & d \end{matrix}\right]$ where $a, ...
4
votes
3answers
224 views

What is the matrix for the operator that implements a function to tell the parity of its argument?

$\newcommand{\qr}[1]{|#1\rangle}$ I gave myself the task of building an operator that implements the following function: $f(0) = 0$, $f(1) = 1$, $f(2) = 1$, $f(3) = 0$. I restricted myself to $x$ up ...
6
votes
3answers
89 views

$R_z$ gate representations

Why is the $R_z$ gate sometimes written as: $$ R_{z}\left(\theta\right)=\begin{pmatrix}1 & 0\\ 0 & e^{i\theta} \end{pmatrix}, $$ while other times it is written as: $$ R_{z}\left(\theta\...
4
votes
1answer
64 views

How to calculate tensor product for the magic square

The magic square game is a two-player pseudo-telepathy game that was presented by Padmanabhan Aravind, who built on work by Mermin. In the magic square we have ones in columns (odd number) and rows (...
5
votes
1answer
217 views

Can we process infinite matrices with a quantum computer?

Can we process infinite matrices with a quantum computer? If then, how can we do that?
6
votes
2answers
189 views

Is there a tool that can give you the unitary representing a quantum circuit from just a string?

Say I have a string representing the operations of a quantum circuit. I want to have the unitary operator representing it. Is there a tool for doing so in Python or else?
6
votes
1answer
605 views

Solving linear systems represented by NxN matrices with N not power of 2

As far as I have seen, when it comes to solving linear systems of equations it is assumed to have a matrix with a number of rows and columns equal to a power of two, but what if it is not the case? ...
10
votes
1answer
217 views

Advantage of simulating sparse Hamiltonians

In @DaftWullie's answer to this question he showed how to represent in terms of quantum gates the matrix used as example in this article. However, I believe it to be unlikely to have such well ...
7
votes
2answers
343 views

Matrix representation of continuous-variable gates

In the introduction to continuous-variable quantum computing by Strawberry Fields (Xanadu), it lists the primary CV gates (rotation, displacement, squeezing, beamsplitter, cubic phase) along with ...
6
votes
1answer
769 views

What are theta, phi and lambda in cu1(theta, ctl, tgt) and cu3(theta, phi, lam, ctl, tgt)? What are the rotation matrices being used?

I was reading the documentation for qiskit.QuantumCircuit and came across the functions cu1(theta, ctl, tgt) and ...
5
votes
2answers
1k views

What is the matrix of the iSwap gate?

Mostly I'm confused over whether the common convention is to use +$i$ or -$i$ along the anti-diagonal of the middle $2\times 2$ block.
4
votes
1answer
278 views

Projection operator on Time evolution Operator

From a 9×9 Hamiltonian lying 9D space, I choose a certain subspace of 4D for designing a two qubit gate. Now the original unitary time evolution operator also lies in 9D space and it's a 9×9 size ...
2
votes
1answer
179 views

Nielsen & Chuang Exercise 2.4 - “Matrix representation for identity” [closed]

Reproduced from Exercise 2.4 of Nielsen & Chuang's Quantum Computation and Quantum Information (10th Anniversary Edition): Show that the identity operator on a vector space $V$ has a matrix ...
3
votes
1answer
293 views

Nielsen & Chuang Exercise 2.3 - “Matrix representation for operator products” [closed]

Reproduced from Exercise 2.3 of Nielsen & Chuang's Quantum Computation and Quantum Information (10th Anniversary Edition): Suppose $A$ is a linear operator from vector space $V$ to vector space ...
3
votes
1answer
511 views

Nielsen & Chuang Exercise 2.2 - “Matrix representations: example” [closed]

Reproduced from Exercise 2.2 of Nielsen & Chuang's Quantum Computation and Quantum Information (10th Anniversary Edition): Suppose $V$ is a vector space with basis vectors $|0\rangle$ and $|1\...
3
votes
2answers
695 views

Difference between 3 qubits, 2 qutrits & 1 six level qunit

What is the difference between 3 qubits, 2 qutrits and a 6th level qunit? Are they equivalent? Why / why not? Can 6 classical bits be super-densely coded into each?
15
votes
1answer
2k views

How to interpret a quantum circuit as a matrix?

If a circuit takes more than one qubit as its input and has quantum gates which take different numbers of qubits as their input, how would we interpret this circuit as a matrix? Here is a toy example:...