21 votes
Accepted

Can arbitrary matrices be decomposed using the Pauli basis?

For any matrix $A$ we can write $$ A =\sum_{i,j,k,l}h_{ijkl}\cdot \frac{1}{4}\sigma_i\otimes\sigma_j\otimes\sigma_k\otimes\sigma_l, $$ where $$ h_{ijkl} = \frac{1}{4}\text{Tr}\big((\sigma_i\otimes\...
Danylo Y's user avatar
  • 6,947
17 votes

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

$$ CNOT = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ \end{bmatrix} $$But what does this matrix ...
Perry Sakkaris's user avatar
14 votes

Can arbitrary matrices be decomposed using the Pauli basis?

$\newcommand{\bs}[1]{{\boldsymbol #1}} \newcommand{\tildebssigma}{\tilde{\bs\sigma}} \newcommand{\bssigma}{{\bs\sigma}}$Yes, products of Pauli matrices form a basis for the set of Hermitian matrices (...
glS's user avatar
  • 24.1k
14 votes
Accepted

How can I decompose a matrix in terms of Pauli matrices?

I call this the "Paulinomial decomposition" as you are writing the matrix $H$ as a polynomial of Pauli matrices: $H=a_{XX}X_1X_2 + a_{XY}X_1Y_2 +a_{XZ}X_1Z_2 + a_{XI}X_1 + a_{YY}Y_1Y_2 + \...
user1271772's user avatar
  • 13.6k
14 votes
Accepted

Why isn't $Ry(\pi/2)$ gate equivalent to Hadamard gate?

While Hadamard gate is defined as $$ H= \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, $$ $y$-rotation by $\pi/2$ leads to gate $$ Ry(\pi/2)= \frac{1}{\sqrt{2}} \begin{...
Martin Vesely's user avatar
13 votes
Accepted

Is the Pauli group for $n$-qubits a basis for $\mathbb{C}^{2^n\times 2^n}$?

Yes, the set of tensor products of all possible $n$ Pauli operators (including $I$) form an orthogonal basis for the vector space of $2^n \times 2^n$ complex matrices. To see this first we notice ...
biryani's user avatar
  • 946
12 votes
Accepted

How are arbitrary $2\times 2$ matrices decomposed in the Pauli basis?

The Pauli matrices form an orthogonal basis of $\mathcal{M}_2$, this vector space can be endowed with a scalar product called the Hilbert-Schmidt inner product $$ \langle A,B\rangle=\mathrm{Tr}(A^\...
user2723984's user avatar
  • 1,066
12 votes
Accepted

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

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 ...
Josu Etxezarreta Martinez's user avatar
11 votes
Accepted

How to compute the average value $\langle X_1 Z_2\rangle$ for a two-qubit system?

I suggest two different ways of trying to solve this, which will give you experience of different bits of the formulation of Quantum Information Theory. I'll give examples that are closely related to ...
DaftWullie's user avatar
11 votes
Accepted

How is the ground state of a Hamiltonian defined?

A couple of points: The ground state is by definition the eigenvector associated with the minimum valued eigenvalue. Lets consider the Pauli Z matrix as you have. First, \begin{align*} Z = \begin{...
Arthur-1's user avatar
  • 525
11 votes
Accepted

Qiskit CNOT-gate matrix mixup?

Qiskit uses "little endian" bit ordering. That means, if A and B are $2 \times 2$ unitary matrices then $B \otimes A$ (note the order) is equivalent to applying $A$ to first qubit and $B$ to ...
Egretta.Thula's user avatar
9 votes
Accepted

Obtaining gate $e^{-i\Delta t Z}$ from elementary gates

One way order to perform Z rotations by arbitrary angles is to approximate them with a sequence of Hadamard and T gates. If you need the approximation to have maximum error $\epsilon$, there are known ...
Craig Gidney's user avatar
  • 35.1k
9 votes
Accepted

How do I prove that the Hadamard satisfies $H\equiv e^{i\pi H/2}$?

First of all, note that the statement, as written, is wrong (or rather, it is correct only as long as the "$\equiv$" symbol is taken to mean "equal up to a phase"). An easy way to see it is by ...
glS's user avatar
  • 24.1k
9 votes
Accepted

Can we write Pauli-Y gate without even complex part?

As noted by @KAJ226 in another answer, the global phase factor $i$ is unobservable and can be ignored, unless we are considering a controlled gate in which case the phase factor $i$ becomes a relative ...
Adam Zalcman's user avatar
  • 21.7k
9 votes

What is (formally) a transversal operator?

Based on informal conversations: there is no actually agreed upon definition of a transversal operator. People use it to mean different things. Typically it refers to either the operation being fast ...
Craig Gidney's user avatar
  • 35.1k
8 votes
Accepted

What is the difference between the action of $Z$ and $\exp(-i Z t)$ on a state?

Effectively, the Z operation (represented by the Pauli $Z$ matrix) applies a rotation about the $Z$-axis. As you note, rotations can also be written in the form $e^{...
Chris Granade's user avatar
8 votes
Accepted

What does the notation $\sigma_j^z$ mean for Pauli matrices?

What $\sigma^z_i$ means is that you've got a Pauli-$Z$ applied to qubit $i$, and nothing else on the other qubits (i.e. the identity). So, you could expand it as $$ I^{\otimes(i-1)}\otimes\sigma^z\...
DaftWullie's user avatar
8 votes
Accepted

How do I create an inverse identity gate?

As a general rule, you wouldn't bother constructing this: it is just a global phase that has no observable consequence. If you really insist on doing this, introduce an ancilla qubit in the $|1\rangle$...
DaftWullie's user avatar
8 votes

What are the relations between the permutation group and the Clifford group?

I guess you're talking about unitaries which preserve computational basis states, i.e. which act as $U|x\rangle = |f(x)\rangle$ where $f:\,\mathbb F_2^n \rightarrow \mathbb F_2^n$ is a reversible ...
Markus Heinrich's user avatar
7 votes

Can there be multiple energy eigenstates corresponding to the same eigenvalue of a Hamiltonian (Pauli-X)?

The quantum states that differ by a global phase (i.e., by a complex number multiple which has absolute value of 1) are considered the same quantum state, since they can not be distinguished using any ...
Mariia Mykhailova's user avatar
7 votes
Accepted

Definition of the Pauli group and the Clifford group

Note that the second definition actually doesn't make more sense in the context of the stabiliser formalism, as neither of $\pm i Y$ have a +1 eigenspace. That means that you can only describe states ...
Niel de Beaudrap's user avatar
7 votes

How to create the state $\vert 0 \rangle+i \vert 1 \rangle$ using elementary gates?

Starting with the state $|\psi_0 \rangle = |0\rangle$, and we want to get to the state $|\psi_f \rangle = \dfrac{|0\rangle + i|1\rangle}{\sqrt{2}}$ then we must realize that we need to create some ...
KAJ226's user avatar
  • 13.8k
7 votes

Can we write Pauli-Y gate without even complex part?

$\begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} = i \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} $ There is no reason to factor out the $i$, it just make thing more cumbersome. I think ...
KAJ226's user avatar
  • 13.8k
7 votes
Accepted

How to prove the fundamental equation in the theory of angular momentum $\sum_{l=x,y,z}\langle J_l^2\rangle\le\frac{N(N+2)}{4}$?

We can transform the left hand side as follows $$ \begin{align} \sum_{l=x,y,z}\langle J_l^2\rangle &= \sum_{l=x,y,z}\langle\psi|J_l^2|\psi\rangle \\ &= \langle\psi|\left(\sum_{l=x,y,z}J_l^2\...
Adam Zalcman's user avatar
  • 21.7k
7 votes
Accepted

Prove the fidelity can be written in terms of Pauli expectation values as ${\rm tr}(\rho\sigma)=\sum_k \chi_\rho(k)\chi_\sigma(\rho)$

Background If $v_1, v_2, \dots, v_n$ is an orthonormal basis in the inner product space $V$, then any vector $u\in V$ can be expressed as a linear combination $$ u = \alpha_1 v_1 + \alpha_2 v_2 + \...
Adam Zalcman's user avatar
  • 21.7k
7 votes
Accepted

Does the controlled Pauli Z gate cause entanglement?

Yes, CZ gate can entangle its inputs. For example $$ CZ|+\rangle|+\rangle = \frac{|0\rangle|+\rangle+|1\rangle|-\rangle}{\sqrt2} $$ which is entangled because the reduced density matrix of either ...
Adam Zalcman's user avatar
  • 21.7k
7 votes
Accepted

Does conjugation by a Clifford send each non-identity Pauli to every other non-identity Pauli with equal frequency?

Conjugating a non-identity Pauli operator $P$ by Clifford operators yields all non-identity Pauli operators, including $P$, with equal frequency. Proof Let $G_n$ and $C_n$ denote the $n$-qubit Pauli ...
Adam Zalcman's user avatar
  • 21.7k
7 votes
Accepted

How to perform a controlled Pauli string rotation gate?

This is nearly a built-in decomposition in cirq. Here's what happens when you decompose a Pauli product: ...
Craig Gidney's user avatar
  • 35.1k
7 votes

What is (formally) a transversal operator?

As pointed by Craig Gidney's answer, there might exist different definitions. Another important definition consists in saying that a logical gate $G_L$ is being implemented transversally if each ...
Marco Fellous-Asiani's user avatar
7 votes
Accepted

Calculate $\sqrt[4]{X}$ for the Pauli $X$ gate

There are a couple of ways that you might do this calculation directly. I'd start by finding the spectral decomposition of $X$: $$ X=|+\rangle\langle +|-|-\rangle\langle -|=e^{i0}|+\rangle\langle +|+e^...
DaftWullie's user avatar

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