Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [matrix-representation]

For questions about matrix representations of quantum gates.

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

Constructing a block unitary from non-unitary matrices

Background: I have a function $f(s_i, s_f, x)$ where $s_i \in \{0,1,2,3\}; \quad x,s_f \in \{0,1\}$ which is defined as: $$ f(s_i, s_f, x) = \begin{cases} 1, & \text{if } (s_i, s_f, x) \in\{(0,0,0)...
Enigma's user avatar
  • 11
1 vote
0 answers
41 views

Find $U$, such that $(G+U | -G-2U)$is Clifford

Given a square matrix: $ \begin{equation} G=\frac{\sqrt{2}}{4}\left(\begin{array}{llll} 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 1 ...
schmector's user avatar
1 vote
0 answers
24 views

Is there value in developing a 'physical/relativstic' QIT (discussion)?

My motivation for asking this question is that I've recently been captivated by representation theory and I am incredibly interested in studying the symmetries behind different the operators in QIT. ...
HugeGroupGuy's user avatar
1 vote
0 answers
24 views

qml.StronglyEntanglingLayers custom CNOT placement

The qml.StronglyEntanglingLayers function works great for what I need. However, I'd like to modify so that for each layer, only the first qubit is the control and the rest are targets of the control ...
TuktukTaxi's user avatar
8 votes
3 answers
296 views

In Schur-Weyl's duality, why is the commutant of $\pi_k(S_k)$ spanned by $U(d)^{\otimes k}$ matrices?

I'm reading this tutorial paper about quantum state certification. However, I'm confused about the concept of Schur-Weyl duality, explicitly Theorem 35 of the paper. Let $S_k$ denotes the symmetric ...
Sherlock's user avatar
  • 695
0 votes
1 answer
66 views

Left-canonical matrix product state

A pure quantum state $$\tag{1}|\Psi\rangle=\sum_{j_1,\ldots,j_N=1}^{d}\psi_{j_1j_2\ldots j_N} |j_1, \dots, j_N\rangle\,,$$ can be represented exactly in the MPS form \begin{equation}\tag{2} |\Psi\...
jayjay's user avatar
  • 111
1 vote
1 answer
119 views

What is the formula for the matrix representation of a general controlled gate?

Suppose I have $n$-qubit circuit. I have a single-qubit gate (e.g. a Pauli gate) at qubit $a$ and it is controlled by the qubit $b$. What is the matrix representation for this controlled gate? The ...
user1747134's user avatar
1 vote
0 answers
51 views

Clarification on Matrix Representation of a Quantum Gate

I came across a matrix representation in my quantum computing studies and I'm seeking clarification on its interpretation. The matrix I encountered is: $$\left[\begin{matrix} 1 - i & 0 & 0 &...
user29259's user avatar
1 vote
1 answer
312 views

Expectation values using qiskit

Expectation values can be calculated using $\bf{Matrix}$ $\bf{mechanics}:$ $A$ has eigenvalues $\lambda_j$ and eigenstates $\Phi_j$. Then the expectation value of $A$ with respect to a state $\Psi=\...
Wolfgang Geist's user avatar
2 votes
1 answer
69 views

How to compute the gate matrix for an operation on qubits not next to each other

I have a quantum circuit with 4 input qubits, A, B, C, and D. A is at the top, D is at the bottom. If I wanted to do a CNOT between B and C and leave A and D alone, I know the gate matrix for this ...
Pro Q's user avatar
  • 993
1 vote
1 answer
69 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
43 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
54 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
72 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
  • 619
2 votes
2 answers
95 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
45 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
64 views

Why is the matrix obtained from the coefficients of orthogonal states unitary?

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
77 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
  • 763
5 votes
1 answer
75 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
247 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
148 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
107 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
235 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
38 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
70 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
  • 93
1 vote
1 answer
66 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
27 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
51 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
  • 577
1 vote
3 answers
729 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
  • 577
0 votes
1 answer
174 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
  • 577
5 votes
3 answers
133 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,326
1 vote
2 answers
2k 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
244 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
31 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
170 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
  • 491
2 votes
3 answers
491 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
1k 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
  • 636
1 vote
0 answers
41 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
63 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
75 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
71 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
206 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
  • 462
2 votes
1 answer
238 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
2 votes
2 answers
4k 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
  • 548
0 votes
1 answer
76 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
495 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
81 views

Commutative operators

I have got a 2-qubit circuit with the following instructions: ...
Марина Лисниченко's user avatar
0 votes
1 answer
65 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
673 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
271 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,503