8 votes
Accepted

What unitary commutes with all local Pauli operators?

TL;DR: The only $U$ that commutes with all $\sigma_{X,i}$ and all $\sigma_{Z,i}$ is a scalar multiple of identity. This follows from the Schur's lemma, but can also be shown using elementary linear ...
Adam Zalcman's user avatar
  • 21.7k
7 votes
Accepted

How to get resultant statevector after applying parameterized gates in qiskit?

Is there a way I can get the resultant statevector in temrs of my parameter $\theta$s? I don't think Qiskit itself has this functionality. May be this is because symbolic expressions become nasty ...
Egretta.Thula's user avatar
6 votes

How does one perform amplitude encoding using only unitary gates?

In amplitude encoding, we encode data into the amplitudes of a quantum state. So, dataset is represented as a normalized classical $2^n$-dimensional vector, which can be thought of as a quantum state ...
Egretta.Thula's user avatar
6 votes
Accepted

Universal Gate Set, Magic States, and costliness of the T gate

The T state $Z^{1/4}|+\rangle$ has four core advantages over most other states: You can physically inject T states at pretty high fidelity. It has a reasonably cheap distillation circuit, as far as ...
Craig Gidney's user avatar
  • 35.3k
6 votes
Accepted

Hadamard transform on state

This is a little fiddly to get right the first time. Let's start by rewriting eq (3) as $$ \sum_{b\in\{0,1\}}\alpha_b|b\rangle\otimes X^{x_{b,y}}|0\rangle. $$ Now, it probably helps to think of this $...
DaftWullie's user avatar
  • 57.1k
5 votes

Controlled Z gate entanglement

Showing that the matrix of a gate cannot be written as the tensor product is a tedious approach. It's easier to come up with a product state that the gate entangles. For this, it's helpful to have a ...
Adam Zalcman's user avatar
  • 21.7k
5 votes
Accepted

When is the square root of a Clifford gate a Clifford gate?

TL;DR A simple sufficient condition is: if the order $r$ of a given Clifford $U$ and the root's degree $n$ are relatively prime, then $U$ has an$^1$ $n$th root. Let $r$ be the order of $U$, i.e. the ...
Adam Zalcman's user avatar
  • 21.7k
5 votes
Accepted

When does CNOT entangle?

A necessary condition is that the control state is not an eigenstate of Z, and the target state is not an eigenstate of X. A sufficient condition to have a fully entangled state is that the control ...
Yaron Jarach's user avatar
5 votes
Accepted

Definition of quantum junta is not basis independent: isn't this a problem?

The definition that you give of a quantum junta is in relation to a tensor product structure. Such structures (and things like entanglement) only make sense if you have some sort of definitive ...
DaftWullie's user avatar
  • 57.1k
5 votes
Accepted

What is the expectation value of $|\langle \psi|U|\psi \rangle|$ over Haar random states $|\psi\rangle$?

This partial answer calculates the integral for $d=2$. In this case, every traceless unitary $U$ is equivalent to the Pauli $Z$ up to similarity and global phase, so, by rotational invariance of the ...
Adam Zalcman's user avatar
  • 21.7k
5 votes
Accepted

Existence of Hamiltonians such that the time evolution unitary becomes identity

I don't believe that this is always possible. For instance, what if my set of $\{H_i\}$s comprise a single term that I can construct to be arbitrarily awkward? The key feature will be gaps between ...
DaftWullie's user avatar
  • 57.1k
5 votes

New mode of Quantum and - or gate

What you've described is essentially the MAJ gate, used for carry propagation in the cuccaro adder. This is a circuit implementing the operation you described: And this is the MAJ gate defined in ...
Craig Gidney's user avatar
  • 35.3k
5 votes
Accepted

Qiskit reverse_bits is not equivalent to swapping qubits

The issue is that the qubit values are being mixed together throughout the circuit, so swapping at the end is not enough. However, if you also swap at the beginning of the circuit, the qubit values ...
Nick Mertes's user avatar
5 votes
Accepted

Is it possible to modify the QFT circuit to use only 1-qubit gates?

This is called qubit recycling (when combined with introducing the qubits-to-QFT one by one). All you have to do is take the normal circuit, measure each qubit immediately after it gets Hadamard'ed, ...
Craig Gidney's user avatar
  • 35.3k
4 votes
Accepted

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

In Qiskit, you can do it by simply passing your unitary matrix to the QuantumCircuit.unitary method, specifying the qubits indices your operator is acting on. In ...
SimoneGasperini's user avatar
4 votes
Accepted

SWAP test: clarification of measurement output

Please look at picture of the circuit. The state in the second last step, is the state after the second $H$ gate. Now, we only have to measure, and we are interested in the probability of the two ...
Abdullah Khalid's user avatar
4 votes
Accepted

What is $HTHTH\left| 0 \right>$?

... $$\frac{1}{2\sqrt{2}}[(1 - i + 2e^{i\pi/4})\left| 0 \right> + (1 + i)\left| 1 \right>]$$ ... However, the answer given at the back of the book (page 360) is (notice the $e^{i\pi/4}$ as ...
hft's user avatar
  • 868
4 votes
Accepted

Does every code have a strongly transversal Pauli group?

The [[4,1,2]] surface code, or any code with an even number of data qubits, either doesn't have a transversal X or doesn't have a transversal Z. Because logical X has to anticommute with logical Z, ...
Craig Gidney's user avatar
  • 35.3k
4 votes

Transformation of 0 state to superposition of 0 and + state with only using single qubit gates

I believe the following will work... How did I come up with this? I realised that the state you were after, $|0\rangle+|+\rangle$ is a +1 eigenstate of the Hadamard gate. There's a standard circuit ...
DaftWullie's user avatar
  • 57.1k
4 votes

How to express Hadamard gate as a generic trigonometric functions of theta?

In the first case, the gate operates by the mapping $H|1\rangle = \cos\theta|0\rangle - \sin\theta|1\rangle$. The second by $H|1\rangle = -\sin\theta|0\rangle + \cos\theta|1\rangle$. What is the ...
Abdullah Khalid's user avatar
4 votes

Can every unitary be approximated by gates from the Clifford Hierarchy?

This is too long for a comment but not an answer. First we must define some notion of closeness of unitaries. Other metrics should be fine, but operator norm seems like a good one. Now I think your ...
Jonas Anderson's user avatar
4 votes
Accepted

Can you twist a qubit?

TL;DR: The state space of an $n$-level quantum system is $\mathbb{CP}^{n-1}$. In particular, the state space of a qubit is $\mathbb{CP}^1$, not $S^3$. Time evolution of a closed quantum system is ...
Adam Zalcman's user avatar
  • 21.7k
4 votes

Equivalence of two unitary transformation with respect to local operations

Equivalent $U_1$ and $U_2$ should have the same spectrum. If eigenvalues of $U_1$ are all different, then there is essentially a unique unitary $V$ (up to a set of phases) which gives the equivalence $...
Danylo Y's user avatar
  • 6,989
4 votes
Accepted

Which Clifford groups are 2-designs?

The confusion stems from the existence of incompatible definitions of the "Clifford group" in dimensions which are not prime. With your definition, the Clifford group is indeed a unitary 2-...
Markus Heinrich's user avatar
4 votes
Accepted

Rotation angle of arbitrary two-qubit gates

I think what you want is the KAK decomposition. An available implementation is cirq.kak_decomposition. The KAK decomposition decomposes an arbitrary two-qubit ...
Craig Gidney's user avatar
  • 35.3k
4 votes

Is there an "in place" Toffoli gate?

This isn't possible, since the associated operation wouldn't be unitary if the scalar is $0$, as it would map both $|0\rangle$ and $|1\rangle$ to $|0\rangle$. The operation wouldn't be reversible and ...
Tristan Nemoz's user avatar
4 votes

Evolution of a state vector: Why is the action of $N$ equivalent to the action of $UNU^{†}$?

Maybe it's easier to see when it's presented like this: $UN\left|\psi\right> = UNU^\dagger U\left|\psi\right>$ means that $UNU^\dagger$ maps $U\cdot \left|\psi\right>$ to $U \cdot N\left|\psi\...
Vladimir Lysikov's user avatar
4 votes
Accepted

Evolution of a state vector: Why is the action of $N$ equivalent to the action of $UNU^{†}$?

I think it probably helps to understand what Gottesman is trying to do with the operator $N$ (later in the paper). He wants to start with some state $|\psi\rangle$, but instead of directly describing ...
DaftWullie's user avatar
  • 57.1k
3 votes

How can I implement an n-bit Toffoli gate?

EDIT: You can simply use mct gate: https://qiskit.org/documentation/stubs/qiskit.circuit.QuantumCircuit.mct.html As of Qiskit 'qiskit': '0.19.6', this process is ...
Diogo Gonçalves's user avatar
3 votes

What is $HTHTH\left| 0 \right>$?

I quickly computed in Mathematica. You are correct. The book is incorrect.
Abdullah Khalid's user avatar

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