2022 Developer Survey is open! Take survey.

Questions tagged [textbook-and-exercises]

Applies to questions of primarily educational value - styled in the format similar to that found in textbook exercises. This tag should be applied to questions that are (1) stated in the form of an exercise and (2) at the level of basic quantum information textbooks.

Filter by
Sorted by
Tagged with
1 vote
2 answers
30 views

How is the ket of a quantum state calculated in this code?

For the following code qc = QuantumCircuit(2) qc.h(1) qc.cx(1,0) ket = Statevector(qc) ket.draw() the output will be the following: ...
user avatar
2 votes
1 answer
45 views

What is the difference between $|+\rangle$ and $|-\rangle$?

What is the difference between $|+\rangle$ and $|-\rangle$. I was reading about quantum states and found that $|+\rangle$ and $|-\rangle$ represent state in superposition of other states. I was just ...
user avatar
0 votes
1 answer
35 views

ket statevector of a 2-quibit system

Given the following code: ...
user avatar
2 votes
1 answer
40 views

How does the Pauli Y gate act in the $|+\rangle, |-\rangle$ basis?

The X gate in the $|+\rangle$, $|-\rangle$ basis becomes the Z gate and vice versa. What is the Pauli Y gate as a matrix transformation in the $|+\rangle$, $|-\rangle$ basis?
user avatar
0 votes
2 answers
48 views

How to sum equal terms in a superposition state?

Suppose after some computation we get a superposition like $\frac{1}{\sqrt{4}}(\left|00\right>+\left|00\right>+\left|10\right>+\left|11\right>)$. How do we merge the same term in this ...
user avatar
0 votes
0 answers
25 views

Why do [1 0 0 1] and [-1 0 0 -1] represent the same physical state? [duplicate]

Below screen shot is from qiskit textbook Because the differences between each of the amplitudes is the same. You could say these two vectors are different mathematically, but the same physically. ...
user avatar
0 votes
1 answer
44 views

Describe |00> and |10> in terms of |0> and |1>

I came across following lines: $|00\rangle$ : both quibts are in state of $|0\rangle$ since $|00\rangle = [1 0 0 0]$ in column vector and $|0\rangle = [1 0]$ in column vector, so if each single qubit ...
user avatar
0 votes
0 answers
20 views

Figuring out which experiment is being performed from the results of the experiment

Consider two different experiments involving qubits. In Experiment 1, a qubit is prepared in the mixed state $I/2$, where $I$ is the $2 × 2$ identity matrix. Alice then chooses an orthonormal basis $B$...
user avatar
1 vote
1 answer
45 views

Sending messages via CNOT gates

Consider a situation in which each of Alice, Bob and Charlie holds a qubit, where the three qubits are acted on by a 3-qubit gate $U$. Assume that the gate $U$ can be implemented by first performing a ...
user avatar
2 votes
1 answer
32 views

Show that any two product states of the same dimension are LU-equivalent

States $|Ψ \rangle$, $|Φ\rangle$ on $C_d⊗C_{d′}$ are said to be equivalent up to Local Unitarities (LU-equivalent) if there exist unitaries $U : C_d → C_d$ and $V : C_{d′} → C_{d′}$ such that: $|Ψ \...
user avatar
0 votes
2 answers
69 views

Prove whether the state $|0\rangle\otimes|0\rangle+|1\rangle\otimes|+\rangle$ is entangled

I'm trying to figure out whether or not the following state is entangling: $$|Ψ⟩ = 1/\sqrt2 (|0⟩ ⊗ |0⟩ + |1⟩ ⊗ |+⟩)$$ Expanding it out I get: $$1/\sqrt2 (|0⟩ ⊗ |0⟩ + 1/\sqrt 2(|1⟩ ⊗ |1⟩ + |1⟩ ⊗ |0⟩))$$...
user avatar
2 votes
1 answer
219 views

Prove that sets of gates $\{CNOT^a, H^b, T^c\}$ are not universal

I'm trying to show that none of these sets of gates are universal: ${CNOT^2, H, T}$ ${CNOT, H^2, T}$ ${CNOT, H, T^2}$ For the first one $CNOT^2$ seems to be the identity gate which means that ...
user avatar
2 votes
1 answer
54 views

Construct a two-qubit quantum gate with given action using the gates ${CNOT, H, T}$

Using the gates ${CNOT, H, T}$, construct a 2-qubit gate that acts as follows on the computational basis $ |0⟩⊗|0⟩ = |0⟩⊗|0⟩ $ $ |0⟩⊗|1⟩ = e^{pi*i/4}|0⟩⊗|1⟩ $ $ |1⟩⊗|0⟩ = e^{pi*i/4}|1⟩⊗|0⟩ $ $ |1⟩⊗|1⟩ ...
user avatar
2 votes
2 answers
84 views

Find a set of vectors on the Bloch sphere such that $\langle \psi_i | \psi_j \rangle = \frac{1}{\sqrt{n}}$

How can I find a set of multiple vectors on the block sphere which satisfies $$\langle \psi_i | \psi_j \rangle = \frac{1}{\sqrt{n}}$$ where $n$ is any natural number greater than $2$? I think I have ...
user avatar
  • 131
2 votes
1 answer
87 views

(Exercise-verification) Basic exercise on a 3 qubits circuit

I have an exercise but not the answer, can somebody tell me if this is correct? Here is the exercise and my answers: Consider the following unitary operation $$ U = (CNOT_{13} \otimes I_2)(CNOT_{12} ...
user avatar
  • 87
1 vote
1 answer
48 views

Are the eigenvalues of projectors always zero and/or one?

Nielsen and Chuang, page 87, defining projective measurements, refers to projectors with "eigenvalue m." However, exercise 2.16 on page 70 seems to imply that the eigenvalue is always one or ...
user avatar
-1 votes
0 answers
25 views

understanding docplex output in portfolio optimization using Qiskit

Can someone please explain the below equation? what are we doing in Obj? Source: https://qiskit.org/documentation/finance/tutorials/01_portfolio_optimization.html ...
user avatar
0 votes
1 answer
43 views

Is the norm of a inner product symmetric?

I was reading about the Inversion Test and during the derivation (in Machine Learning with Quantum Computers, Schuld and Petruccione) I find the follwing: Assume we have $|a\rangle = A|0\rangle$ and $|...
user avatar
  • 197
-3 votes
1 answer
43 views

Write in seperable form [closed]

Consider the two-qubit state $$𝜌 = 1/4 \{(|00⟩ + |11⟩) (⟨00| + ⟨11|) + (|01⟩ + |10⟩) (⟨01| + ⟨10|)\}.$$ Though looks like an entangled state, it is in fact a separable one. Write it down in the ...
user avatar
2 votes
1 answer
67 views

Show that $\|M|ψ⟩\|^2 =⟨ψ|M^† M|ψ⟩$

I'm a newcomer to Quantum Computing and I'm currently working through a tutorial shown here. At one point (second last section in Part II), there is an exercise that I'm really struggling with. I'm ...
user avatar
2 votes
0 answers
21 views

How to obtain an expression of the complexity of the period-finding algorithm with respect to the period length?

Intro. Nielsen and Chuang in Quantum computation and quantum information on section 5.4.1 state that the period-finding algorithm has a runtime of $U + O(L^2)$ operations where $L$ is the size of the ...
user avatar
4 votes
2 answers
163 views

The construction of every element of the Clifford group using H,S and CNOT circuits

I am trying to understand the following theorem: Every element $U\in C_n$ of the Clifford group can be constructed using $H, S, CNOT$ gates. In Nielsen and Chuang's book this is left as an exercise (...
user avatar
  • 365
0 votes
1 answer
64 views

What are the eigenstates of an operator?

Sorry if this is a silly question, I am new to quantum computing I was just reading this article that talked about the eigenstates of an operator. And I wonder, how can we find those eigenstates for a ...
user avatar
  • 1
1 vote
2 answers
65 views

Creating a Qiskit circuit based on output states

I am trying to create a Qiskit circuit that: starting in state |00⟩ generates a 1/2 * (|00⟩ - |01⟩ - |10⟩ + |11⟩) state starting in state |10⟩ generates a 1/2 * (|00⟩ + |01⟩ - |10⟩ -|11⟩) state ...
user avatar
  • 197
2 votes
1 answer
91 views

Creating a Qiskit Circuit sending $|00\rangle$ to $|1,-\rangle$ and $|11\rangle$ to $|0,-\rangle$

I am trying to create a circuit in Qiskit that performs the following transformations: starting in state |00⟩ generates a √(2)/2 * (-|10⟩+|11⟩) state starting in state |11⟩ generates a √(2)/2 * (|00⟩-|...
user avatar
  • 197
2 votes
0 answers
46 views

Creating maximally-entangled state in quantum circuits using Qiskit

I am trying to create a function in Qiskit that, given an integer n, returns a circuit of that size in which all qubits at the output are entangled together in a maximally-entangled state. Some ...
user avatar
  • 197
1 vote
1 answer
47 views

Theta value passed as input to quantum phase estimation: qiskit textbook

I'm trying to understand the Quantum Phase Estimation in the qiskit textbook https://qiskit.org/textbook/ch-algorithms/quantum-phase-estimation.html. I know QPE is used to estimate the $\theta$ given ...
user avatar
2 votes
2 answers
139 views

How to create a quantum circuit transforming $α|00⟩ + β|11⟩$ to $β|00⟩-α|01⟩+β|10⟩+α|11⟩$

Starting from an unknown state $α|00⟩ + β|11⟩$, where $\alpha,\beta$ are properly normalized, how can I create a circuit that transforms that state to a $\frac{1}{\sqrt{2}} (β|00⟩-α|01⟩+β|10⟩+α|11⟩)$ ...
user avatar
  • 197
0 votes
1 answer
60 views

How to create a quantum circuit checking whether two functions $f$ or $g$ are of the same type?

I want to create a quantum circuit that checks whether two functions f and g are of the same type, i.e., constant or balanced, or not. In other words, the output of the circuit should output 1 if both ...
user avatar
  • 143
1 vote
1 answer
62 views

Verify that $\langle \sigma^x\rangle^2+\langle\sigma^y\rangle^2+\langle\sigma^z\rangle^2=1$ for $|\psi\rangle=\cos\theta|0\rangle+\sin\theta|1\rangle$

I am trying to solve an exercise, but I can't seem to get it to work. I get given this rule, $$\langle \sigma_x \rangle^2 + \langle \sigma_y \rangle^2+\langle \sigma_z \rangle^2 =1 $$ and I am asked ...
user avatar
4 votes
3 answers
198 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 ...
user avatar
5 votes
1 answer
96 views

What are examples of the correspondence between channels and their Stinespring dilations?

In this post I read that "quantum measurements are special cases of quantum channels (CPTP maps). Stinespring's dilation states that any quantum channel is realized by partial tracing a unitary ...
user avatar
  • 165
1 vote
2 answers
88 views

Why should the norm of density matrix be 1

When checking for validity of density matrix in qiskit, it asserts that the norm of the density matrix is 1. why it is the case? see here
user avatar
  • 95
2 votes
1 answer
138 views

Solving modified version of Simon's Algorithm with multiple secret strings

I am stuck on the following question. Let $S$ be the $span${s1, s2, ... , sk} such that $S$ is a $k$-dimensional subspace of {0, 1}n. Let 𝑓:{0,1}𝑛→{0,1}𝑛 be a function so that $f(x) = f(y)$ if ...
user avatar
4 votes
1 answer
58 views

Understanding the 3rd step of Nielsen and Chuang's description of the quantum order-finding algorithm

In Nielsen and Chuang's description of Quantum order-finding algorithm, the 3rd step of the procedure says $$\frac1{\sqrt{2^t}}\sum_{j=0}^{2^t-1}|j\rangle|x^j\mod N\rangle \approx \frac1{\sqrt{r2^t}}\...
user avatar
3 votes
3 answers
61 views

How to show that a density matrix $\rho$ is extreme iff $\rho=|\psi\rangle\!\langle\psi|$?

A density matrix $ρ$ is called extreme if the only way to write $ρ$ as $ρ = p σ + (1 − p) τ$ , with $σ ∈ S_d$, $τ ∈ S_d$, and $p ∈ (0, 1)$ is to have $ρ = σ = τ$ . I want to show that a density matrix ...
user avatar
1 vote
1 answer
44 views

How to project on the $\phi^+$ basis when performing entanglement swapping?

I am working on entanglement swapping. Where there are three nodes, a source node, repeater node and a target node. Qubits 1 and 2 are entangled and are distributed between source node and repeater ...
user avatar
  • 105
-1 votes
1 answer
65 views

Is the $|00\rangle$ basis the same as the $|\phi^+\rangle$ basis?

I am working on a problem where I have 4 entangled qubits. I want to trace out 2nd and 3rd qubits by projecting them onto the $|00\rangle$ basis. Is the $|00\rangle$ basis the same as the $|\phi^+\...
user avatar
  • 105
1 vote
1 answer
49 views

Why can we drop bits in front of the decimal in QFT?

In Preskill's notes on quantum information, he includes a section on the quantum Fourier transform (QFT) for period finding. Starting from the classical Fast FT over bitstrings, we can express any ket ...
user avatar
3 votes
1 answer
158 views

We are asked to create python code using qiskit to create a quantum program that prepares the four Bell states

Then we are asked to show that the following circuit can correctly distinguish between the four Bell states by showing that unique measurements are created for each of the four Bell states. I have ...
user avatar
  • 31
1 vote
0 answers
62 views

Measuring Deutsch-Jozsa in the Fourier Basis

Let $f$ be a function from $N$ bits to one bit, where $f$ is either constant or balanced. Consider the Deutsch-Jozsa algorithm, where each of the $N$ output qubits is measured in the Fourier basis $\{|...
user avatar
-2 votes
1 answer
70 views

Probability outcome $0$? Post measurement state?

Does anyone know how to solve this exercise? Here is the question: Let $|\psi\rangle$ be an arbitrary pure $n$-qubit state, i.e. $$|\psi\rangle=\sum_{x_1,\ldots,x_n=0,1}\alpha_{x_1\cdots x_n}|x_1\...
user avatar
4 votes
1 answer
81 views

How do we achieve mathematically that the probability that Eve learns $x$ is $\cos^{2}\left ( \frac{\pi }{8} \right )$?

I'm trying to understand this problem. Alice I attempting to send a 2 classical bit message to Bob using 1 qubit such that there are 4 states $\varphi_{00}$ $\varphi_{01}$ $\varphi_{10}$ $\varphi_{11}$...
user avatar
2 votes
1 answer
124 views

How to calculate the square root of a density matrix?

We know that a quantum state can be represented by a matrix $\rho$, where $\rho$ is positive semi-definite and trace is $1$. So, what is the definition of $\sqrt{\rho}$ and how can I calculate it?
user avatar
1 vote
2 answers
139 views

What is the eigenvalue of an arbitrary state?

I found this questions here assumes that eigenvalue of $|0001\rangle$ is $-1$. Can someone please explain how does this work for this example? How does it work in general for any state?
user avatar
  • 455
0 votes
1 answer
48 views

In the solution of exercise 2.2(on this site) how can we see the new form of the operator A, in the beginning of the answer.?

this is the question I am referring to I am sorry to ask such a question, can someone explain how are we able to make the new form of the operator A. Thank you, any help would be great!
user avatar
2 votes
1 answer
70 views

Is there a way to prove that the number of gates in Exercise 4.22 of Nielsen and Chuang's book is the smallest possible number?

I've been going over Nielsen and Chuang's Quantum Computation and Quantum Information and I ran into Exercise 4.22, which says, Prove that a $C^{2}(U)$ gate (for any single qubit unitary $U$) can be ...
user avatar
1 vote
2 answers
85 views

How does a unitary transformation preserve a measurement?

Apologies if my question is worded poorly or unclear. I am still new to quantum mechanics and am having trouble understanding this concept. In my textbook, it says: Instead of measuring |ψ⟩ in a ...
user avatar
1 vote
1 answer
72 views

How to write the state $|ψ\rangle=|00\rangle+\sqrt{i}|01\rangle+(3+i)|11\rangle$ as a column vector?

Consider the two-qubit state $|ψ \rangle= 1|00\rangle +\sqrt i |01\rangle + (3+i)|11\rangle$. How can I write the state $|\psi\rangle$ as a column vector? I'm confused. And what if I want to measure ...
user avatar
  • 143
1 vote
1 answer
81 views

Measuring a state $\frac{1}{2}|0\rangle-\frac{\sqrt 3}{2}|1\rangle$ in the $X$ and $Z$-bases?

If a qubit is in the state $|\psi\rangle = \frac {1}{2}|0\rangle - \frac{\sqrt 3}{2} |1\rangle$, how do I measure it in the $Z$-basis, i.e. $\{|0\rangle,|1\rangle\}$, and the $X$ basis, i.e. $\{|+\...
user avatar
  • 143

1
2 3 4 5
10