Questions tagged [matrix-representation]

For questions about matrix representations of quantum gates.

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

I have two Choi matrix I suspect be equivalent. Can I manipulate them?

I am performing a process tomography over a protocol I suspect to be equivalent to the $CS$ gate. To compare basic operators I usually compute the Choi matrix of the target gate -- which in this case ...
Daniele Cuomo's user avatar
2 votes
0 answers
29 views

CNOT circuit synthesis with Gauss elimination. Explanation and beyond?

This paper introduces to the synthesis of a (optimal) circuit of CNOTs only; starting from a parity map encoded into a matrix. It is based on Gaussian Elimination. This is an important result, which ...
Daniele Cuomo's user avatar
2 votes
1 answer
47 views

Easy way to look at matrix in computational and Hadamard bases?

Given a $2^n \times 2^n$ matrix $M$ of classical data (so, just a bunch of numbers), is there any way to query that matrix in both the computational basis (basically, $M$) and the Hadamard basis, i.e. ...
Physics Penguin's user avatar
1 vote
0 answers
52 views

Prove $\sum_{ij}(\mathcal{A_G})_{ij}(|\rho\rangle\!\rangle)_j|i\rangle\!\rangle={\cal A}_G|\rho\rangle\!\rangle$ in the Pauli-Liouville representation

Define the Pauli-Liouville representation of a (linear) map $\mathcal{G}$ as $\mathcal{A_G}$, which has components \begin{equation}\label{2} (\mathcal{A_G})_{ij}:=\mathrm{tr}[P_i\mathcal{G}(P_j)] \...
Karry's user avatar
  • 707
2 votes
2 answers
69 views

How to prove that these equations are correct for $CZ$ and $CX$?

How do I prove that the equation on the right is $CX$ and $CZ$ gate? I don't think that reaching the matrix of the CX or CZ is possible with the given equation. For (b) I keep getting $I \otimes I$ ...
seopr's user avatar
  • 21
2 votes
0 answers
41 views

Generic circuit for signature matrix

Consider a set $ A = \{a_0,a_2,\ldots,a_{k-1}\} \subset [N] := \{0,1,\ldots,N-1\}$. Consider the diagonal matrix \begin{equation} R := I - 2 \sum_{a\in A} |a\rangle\langle a|, \end{equation} which is ...
Cuhrazatee's user avatar
1 vote
1 answer
43 views

Unitarity of a matrix in the EPR experiment

I'm having troubles in understanding a statement in Box 2.7 at page 113 in the Nielsen & Chuang. Firstly, it assumed to be working with a two-qubits quantum system in state $|\psi\rangle = \frac{|...
orangonabbo's user avatar
1 vote
0 answers
74 views

Application of transformation $U_d$ that maps any qudit state to $|d-1\rangle$

When giving examples of universal gate sets in the paper Qudits and High-Dimensional Quantum Computing, the authors first define the transformation that maps any given qudit state to $|d-1\rangle$: $$ ...
banercat's user avatar
  • 757
5 votes
1 answer
62 views

Existence of Hamiltonians such that the time evolution unitary becomes identity

Can we always find a set of coefficients ${k_i}$ (where not every $k_i = 0$) for a given Hamiltonian $H = \sum k_i H_i$, such that the unitary operator becomes the identity operation: $e^{-iH} = e^{i\...
Hailey Han's user avatar
1 vote
0 answers
120 views

How to get parity check matrix from a circuit in stim

I am working on QECC and, differently from classical ECC where everything is generally described by the parity-check matrices, QECC generally involves the low-level description of the circuit instead, ...
yoyoc's user avatar
  • 11
1 vote
1 answer
104 views

What is the general unitary matrix for two- and three-qubit states?

As pointed out in the QisKit tutorial here, for one qubit there exists a general unitary (see the expression for it in the previous link). I wonder if there exists equally unambiguous expressions for ...
user3116936's user avatar
1 vote
1 answer
72 views

How to convert a basic matrix into a quantum circuit?

Classical gates are not invertible, but larger expressions made from those gates can be invertible. One example of an invertible function is the function $f(A,B,C) = X,Y,Z$: $X = A \ B \ | \ \neg B \ ...
G S's user avatar
  • 13
2 votes
1 answer
156 views

How to convert a simple matrix into circuit? [duplicate]

Suppose you have an invertible matrix. How do you convert it into a circuit? Matrices have dimensions $2^n \times 2^n$, so a circuit representation is desirable. For example, the matrix below is a ...
user25425's user avatar
0 votes
0 answers
35 views

Detect if a given binary number belongs to a certain subset with an unitary transformation

I want to create an operator $A$ which, given three binary numbers, $a_1$, $a_2,a_3$, will detect whether $a_1a_2a_3$ (as a binary number) is in certain set of numbers (for example, detect whether $...
Qwertuy's user avatar
  • 101
2 votes
1 answer
68 views

In general, what is feasible quantum computation?

I don't really understand what is feasible quantum computation, in my book (Lipton and Regan's Quantum Algorithms via Linear Algebra) they said that: A quantum computation $C$ on s qubits is feasible ...
Huy By's user avatar
  • 83
1 vote
1 answer
39 views

Calculate the product state/quantum register back into its tensor product

So let's asume I have a product state/quantum register as a result of a tensor product of two qubits. Lets take a "hard" product state matrix like: $$\frac{1}{\sqrt{2}} \begin{bmatrix} \...
Christian Bernhard's user avatar
1 vote
1 answer
20 views

How to mathematically represent the $CSWAP_{1 \rightarrow 0,2}$ gate?

The controlled-$SWAP$ gate represented in the circuit above can be written down by the following mathematical expression: $$ CSWAP_{0 \rightarrow 1,2} = |0\rangle\langle0| \otimes I_{4 \times 4} + |1\...
SimoneGasperini's user avatar
0 votes
1 answer
43 views

How to implement the -I matrix using Pauli gates

I'm trying to build a quantum walk circuit. I have the C0 matrix as follows import numpy as np C0 = np.array([[-1, 0], [0, -1]]) As we can see, it's the (-)...
Van Peer's user avatar
  • 547
1 vote
3 answers
364 views

How to build the quantum circuit corresponding to a given unitary matrix?

I have the following matrix for a circular quantum walk ...
Van Peer's user avatar
  • 547
0 votes
1 answer
130 views

How to find the matrix representation of a given many-qubit Hamiltonian?

I have the following Hamiltonian H = - Z1Z2 - Z2Z3 - Z1Z3 - 6(Z1 + Z2 + Z3) Here, Z1, Z2, Z3 represent the Pauli-Z operators acting on qubits 1, 2, and 3, ...
Van Peer's user avatar
  • 547
5 votes
3 answers
101 views

Is there a way to write a generic low dimensional Clifford matrix?

Suppose I want to write a general $2\times2$ special unitary matrix in a given basis, I can write it as such: $$\begin{pmatrix} \alpha & -\overline\beta\\ \beta & \overline \alpha\end{pmatrix}$...
Mauricio's user avatar
  • 2,192
1 vote
2 answers
902 views

RZZ from CNOT and RZ

The following should represent an RZZ gate (source: https://pennylane.ai/qml/demos/tutorial_qaoa_maxcut.html) How do the CNOT and an RZ compute mathematically to the RZZ? $$ R_Z(\theta) = \begin{...
Evan Camilleri's user avatar
1 vote
1 answer
225 views

Matrix representation of any conditioned gate

Is there an algorithm explaining how to represent any gate in the matrix form? Suppose, the circuit is the following: where operator $ U = e^{iA\pi/4} = \begin{bmatrix} 0.35-0.85i & -0.35-0.15i ...
Марина Лисниченко's user avatar
1 vote
0 answers
29 views

Best free online application for making notes containing quantum computing math notation? [closed]

This I hope, is not a trivial question. I am sure many like me struggle while making personal notes online and face difficulty in write linear algebra expressions & Dirac notations to explain ...
QuantumNeeraj's user avatar
2 votes
2 answers
148 views

How to translate a 4-qubit Grover's algorithm circuit into a state Matrix?

Grover's algorithm circuit may be implemented as follows: (from here) It is shown very elegantly by @MartinVesely (How to interpret a 4 qubit quantum circuit as a matrix?) how to translate a 4 qubit ...
James's user avatar
  • 455
1 vote
3 answers
324 views

Is it possible to get the "symbolic" matrix operator associated with a parameterized quantum circuit using Qiskit?

Qiskit provides the qiskit.quantum_info.Operator class to get the unitary matrix operator from the corresponding quantum circuit, as in the following example: ...
SimoneGasperini's user avatar
2 votes
3 answers
906 views

Toffoli Gate Matrices

Here are the different toffolis (or maybe one of them is toffoli and the others are very similar to toffoli gates) My question is: we know the matrix of the number 1 Toffoli: What are the matrices ...
quest's user avatar
  • 614
1 vote
0 answers
38 views

How are $\theta, \phi$ and $\lambda$ for the U3 gate derived in Abhijith et al. 2018?

I am looking to implement Quantum PCA from this paper (page 62). They have their code on Github. I have gone through the paper multiple times but failing to understand how they got numbers (for theta, ...
Nihir's user avatar
  • 135
1 vote
1 answer
50 views

Matrix representation for biproduct mixed states

Nielsen and Chuang [10e, p. 74] introduce the Kronecker product $A\otimes_K B$ as a matrix representation of the tensor product $A\otimes B$ of the operators $A$ and $B$ (for clarity I use a subscript ...
pip's user avatar
  • 113
0 votes
1 answer
52 views

Unitary transformations that make a 2-qubit system non-observable

Apology in advance if this question is not entirely sound, I am just beginning to grasp q-computation. My question is the following: Consider a 2-qubit system. Suppose your initial state is a ...
EGME's user avatar
  • 125
0 votes
0 answers
59 views

Method to use nonlinear operators within quantum circuits

I recently learned of a technique known as "block-encoding" which embeds any $M \times N$ matrix into a unitary matrix, given that the spectral norm is at most $1$. This type of result is ...
Loic Stoic's user avatar
2 votes
1 answer
165 views

Writing a Density matrix in terms of the magnitude of the Bloch Vector

Working with the density matrix and the Bloch sphere, I have been attempting to complete an exercise in Entangled Systems; New Directions in Quantum Physics. If anyone has the book it is Question 4.3 ...
PGibbon's user avatar
  • 452
2 votes
1 answer
192 views

What is the tensor product expression for the following quantum circuit? [duplicate]

Qiskit generates the following matrix for this 3-qubit CNOT circuit. Can anyone explain how do we get this mathematically ? This is the Quantum Circuit This is the Output of Unitary Simulator
Adityashu's user avatar
1 vote
2 answers
2k views

What are the Pauli-Y eigenvectors?

The question should be pretty simple, but it turns out that there's more to it with respect to what I initially expected. Starting from the definition of the gate $Y = \begin{bmatrix} 0 & -i \\ i &...
tigerjack's user avatar
  • 498
0 votes
1 answer
59 views

How to get the Dirac representation of a general quantum gate?

writing a matrix from bra-ket notations is easier. Going back is like finding prime factors. How to get the bra-ket form of all basic quantum gates in their matrix form in general?
Suren's user avatar
  • 1
3 votes
1 answer
280 views

Qiskit: Is there an efficient way to convert custom operator (matrix) to circuits/gates and vice versa?

I'm using qiskit and would like to convert easily between matrix operators and their corresponding circuits. I have 2 types of operators: Permutation matrices (binary entries only) which must be ...
consthatza's user avatar
0 votes
0 answers
76 views

Commutative operators

I have got a 2-qubit circuit with the following instructions: ...
Марина Лисниченко's user avatar
0 votes
1 answer
61 views

Are the SDG and TDG gates hermitian?

I know that phase shift gates like $S$ and $T$ are not hermitian operators. But are the $S^\dagger$ and $T^\dagger$ gates non-hermitian too?
areeba arbab's user avatar
2 votes
1 answer
480 views

How to implement subplots (several blochsphere plots) using qiskit?

Qiskit seems to use matplotlib for rendering bloch spheres under the hood. Therefore, it would be nice if we could also make use of matplotlib's subplot technique. I would like to implement subplots, ...
Eldar Sultanow's user avatar
2 votes
1 answer
204 views

How to convert between little/big-endian unitary forms in Braket?

As noted in this post, the Amazon Braket unitary calculation method as_unitary has been deprecated (#325) as it uses little-endian qubit order. The new, big-endian method is to_unitary. Here's a code ...
ryanhill1's user avatar
  • 2,423
4 votes
0 answers
66 views

How is this Variational Quantum Singular Value Decomposition paper efficient in any way?

Link to paper here. This algorithm seems neat but the unitary decomposition of the matrix M generally takes an exponential number of Pauli basis elements in the number of qubits $N$, therefore an ...
JoJo's user avatar
  • 99
1 vote
1 answer
195 views

math behind rotation gate

$R_Z(\theta) = e^{-i\frac{\theta}{2}Z}$ and $R_{ZX}(\theta) = e^{-i\frac{\theta}{2}XZ}$ My question is, why is the rotation gate defined in an exponential format? Where does the $\frac{1}{2}$ come ...
peachnuts's user avatar
  • 1,343
2 votes
1 answer
139 views

From Hamiltonian to the Pulse Sequence

I know my Hamiltonian: I know which unitary I want to have. Suppose that I want to have this matrix from Hamiltonian: How can I find the pulse sequence to have this matrix from the Hamiltonian? What ...
quest's user avatar
  • 614
1 vote
1 answer
93 views

Why Qiskit doesn't invert hard coded unitary matrix?

I was expecting Qiskit to do a upside down version of my unitary as it does for other unitary matrices of CNOT and Toffoli gates given in textbooks : if you convert a toffoli matrix from quantum ...
Shashi Kumar's user avatar
1 vote
1 answer
147 views

Manually calculating quantum circuit with custom gate

I am trying to calculate the state of this Quirk circuit by hand: where U is a custom gate with 2x2 matrix: From what I've read, I should be able to calculate the resultant amplitudes as: (U⊗I⊗I).(...
quantumlearning's user avatar
4 votes
3 answers
3k views

How to represent the Hadamard gate as a rotations on the Bloch sphere?

I am new to Quantum Computing, and I have decided to try and learn the quantum gates. I am trying to understand how to represent some basic gates as rotations on the Bloch Sphere. I was able to ...
William Ryman's user avatar
3 votes
1 answer
90 views

How does one derive quantum gates from a custom gate systematically?

I have been trying to solve a puzzle (not homework) in which I need to derive a quantum circuit from given a superposition, $|\psi\rangle$, where $$ |00\rangle: 20\%\\ |10\rangle: 40\%\\ |11\rangle: ...
NeRoboto's user avatar
  • 133
1 vote
0 answers
48 views

Question about performing VQE with an embedded Hamiltonian

Say I have a physical Hamiltonian $\mathcal{H}$ which is $D$-dimensional and I encode it into a larger matrix $M$ which is $\Delta$-dimensional. In the cases I care about $\Delta$ is strictly greater ...
Ken Robbins's user avatar
2 votes
0 answers
38 views

How to simulate these Floquet and Rotation operators for kicked top model?

In this and other papers relating to the kicked top model, it is mentioned that spin coherent states can be expressed as: $$\left|\theta,\phi\right>=R(\theta,\phi)\left|j,j\right>$$ for given ...
akkh's user avatar
  • 51
0 votes
1 answer
129 views

Matrix representation of multi-qubit operations when there's irrelevant qubit(s)

Suppose there are three qubits, q0, q1, and q2, if you perform a CX on q0 and q1, the entire matrix of the operation you performed on the whole quantum circuit will simply be the tensor product of CX ...
Yitian Wang's user avatar