New answers tagged

1

Given a quantum state $|\psi\rangle$, you can performa a basis change on this state using the $I$, the Identity operator, which of course can be expanded as $\sum_{i}|i\rangle\langle i|$, where $|i\rangle$ is simply a particular basis from a complete set of basis states. Applying $I$ to $|\psi\rangle$, we get $$I|\psi\rangle=\sum_{i}|i\rangle\langle i|\psi\...


2

What you're asking to do is at least as hard as the following problem: Given oracle access to $f$ such that either (a): $f(x)=0 \, \forall \, x$ or (b): $\exists z: f(x) = \delta_x^z$ for $x,z \in \{0, \dots k\}$. Specifically, in your problem statement set $m=1$ and relax the requirement from using $n$ qubits to instead just using a $k$ dimensional space. ...


3

The authors are certainly thinking about finite frames. In this case, your statement is correct, since the number of elements in every spanning set is at least the vector space dimension. As glS already pointed out, the frames could be infinite: for countable frames, the summation is then meant as convergence in the $L^2$-sense (i.e. w.r.t. Hilbert-Schmidt ...


5

Observe that, for any collection of matrices $A_i$, we have $$\sqrt{\sum_i |i\rangle\!\langle i|\otimes A_i} = \sum_i |i\rangle\!\langle i|\otimes \sqrt{A_i}, \\ {\rm Tr}\left(\sum_i |i\rangle\!\langle i|\otimes A_i\right) = \sum_i {\rm Tr}(A_i).$$ It immediately follows that $\|\sqrt\rho\sqrt\sigma\|_1\equiv {\rm Tr}|\sqrt\rho\sqrt\sigma|$ can be written as ...


3

I assume for $\rho$ and $\sigma$, you meant to write $\rho = \sum_i p(i) \vert i\rangle\langle i\vert \otimes \rho_i$ and $\sigma = \sum_i q(i)\vert i\rangle\langle i\vert\otimes\sigma_i$. From QIT by Mark Wilde, pg 250, $$\sqrt{F}(\rho,\sigma)=\sum_{i}\sqrt{p(i)q(i)}\sqrt{F}(\rho_{i},\sigma_{i})$$ for classical-quantum states like the one above.


2

Personally, I would do the calculation a little differently. Start by writing $$ \langle\psi|X^0_1Z_2X^0_1|\psi\rangle+ \langle\psi|X^1_1Z_2X^1_1|\psi\rangle= \langle\psi|X^0_1Z_2X^0_1+X^1_1Z_2X^1_1|\psi\rangle $$ Next, think about a term like $X^0_1Z_2X^0_1$, but expand out the tensor product. This is just $(X^0X^0)\otimes Z$. But since $X^0$ is a projector,...


2

@Kenneth comment is right. Note that: $$ XZ |\Phi^+\rangle = XZ\bigg(\dfrac{|00\rangle + |11\rangle}{\sqrt{2}} \bigg) = \dfrac{|10\rangle - |01\rangle}{\sqrt{2}} = - \bigg( \dfrac{|01\rangle - |10\rangle}{\sqrt{2}} \bigg) = -|\Psi^-\rangle $$ But there is no distinction between the state $-|\Psi^-\rangle $ and $|\Psi^-\rangle $ quantum mechanically. That is, ...


1

From this paper, suppose you have three bases $S_x$, $S_y$ and $S_z$. And suppose you define the states of the $S_x$ and $S_y$ bases on the $S_z$ basis as follows: $$ |+x\rangle = \frac{1}{\sqrt{2}}(|+z\rangle + |-z\rangle) \\ |-x\rangle = \frac{1}{\sqrt{2}}(|+z\rangle - |-z\rangle) \\ |+y\rangle = \frac{1}{\sqrt{2}}(|+z\rangle + i|-z\rangle) \\ |-y\rangle = ...


2

Looking at the list of the intrinsic gates available in Q#, and keeping in mind that we need a gate with the first column being $\begin{bmatrix} \alpha \\ \beta \end{bmatrix}$, you can notice that the gate with all real coefficients is the Ry gate. Now you need to find $\theta$ such that $\cos\frac{\theta}{2}=\alpha$ and $\sin\frac{\theta}{2}=\beta$. We can ...


1

First, note that the input (in vector form) will be $\begin{bmatrix} 1 \\ 0 \end{bmatrix}$. And you want the output to be $\begin{bmatrix} \alpha \\ \beta \end{bmatrix}$. Therefore, the matrix that represents the gate you want needs to have the vector you want as output on the first column. To see what the second column needs to be, let’s look at the general ...


2

Is it possible to construct such a black-box gate ?? No, the gate you're describing isn't possible. It's not unitary. You can't condition on amplitude thresholds, you can only condition on orthogonal states.


2

I think that asking for an exact solution is pointless, because quantum computers don't have infinite precision. You are limited, for example, by accuracy of pulses that control the gates. To implement the idea of the mentioned answer, you can refer to this paper which introduces a general method for constructing an efficient and highly accurate quantum ...


7

Let us consider the state you are creating. Since there is no mention to the training dataset in your code, I'm assuming that you somehow got this state from previous knowledge. We have: psi = [0, 0, 0.5, 0, 0, -0.5, 0, 0, 1/(np.sqrt(2)*a), 0, x1/(np.sqrt(2)*a), x2/(np.sqrt(2)*a), x1/(np.sqrt(2)*a), x2/(np.sqrt(2)*a), 0, 0] which gives us: $$|\psi\rangle = \...


3

Yes; in fact, $\rho$ is both separable and pure. We can start by writing any state $\rho$ in its eigenbasis $$\rho=\sum_i p_i|\psi_i\rangle\langle\psi_i|,$$ where $p_i$ are probabilities (i.e., positive and sum to unity) and $|\psi_i\rangle$ are pure states that may or may not be entangled. If $\rho$ is bipartite, each eigenstate $|\psi_i\rangle$ is ...


5

First note that, $$(|0\rangle + |1\rangle)(|00\rangle + |11\rangle) = |0\rangle |00\rangle + |0\rangle|11\rangle + |1\rangle |00\rangle + |1\rangle|11\rangle$$ then you can extend this to $|\psi_2\rangle$. That is: \begin{align} |\psi_2\rangle &= \frac{1}{2}\bigg[\alpha(|0\rangle+|1\rangle)(|00\rangle+|11\rangle)+\beta(|0\rangle-|1\rangle)(|10\rangle+|01\...


3

A quantum computer is computing device that makes use of quantum state instead of classical states. A quantum state, also known as a state vector, contains statistical information about the quantum system. It’s essentially a probability density. Quantum states can have interesting properties like superposition, entanglement, and interference effects. Now, a ...


0

Superposition applies to quantum computing with the basic example of the Hadamard (H) gate which creates a superposition on the target qubit. The H gate is essential in constructing quantum algorithms such as Shor's Algorithm and Grover's Algorithm (for example).


1

As the previous answer mentions, the right way to approach this depends on what kind of algorithm you are going to run on the amplitude encoded vectors. One possibility: If you're trying to classify these vectors using a linear classifier, chances are that there is some configuration of the classifier that is translation invariant. This means the problem ...


2

I'm not sure such a one-to-one function exists. However, it is quite easy to do if you allow yourself to use more than $\log_2(n)$ qubits. You can add a register which, up to a given precision, holds the value of the norm of a given vector. For instance, let us consider the vectors $\begin{pmatrix}1\\2\\3\\4\end{pmatrix}$ and $\begin{pmatrix}2\\4\\6\\8\end{...


3

I'm going to label my 3 parties by A, B, C (just to be awkward). If we consider a bipartition of A|BC, we know that a general state can be written in the form $$ U_A\otimes I_{BC}(\alpha|0\rangle_A|\psi_0\rangle_{BC}+\beta|1\rangle_A|\psi_1\rangle_{BC}) $$ where $|\psi_i\rangle$ are mutually orthogonal and may be entangled. This is just the Schmidt ...


4

Note that the two bases in the Schmidt decomposition do not necessarily coincide (for reasons related to the fact that the two unitary matrices in the singular value decomposition do not necessarily coincide). It is therefore clearer to write $$ |\psi \rangle = \lambda_0 |\phi_0^A \rangle |\phi_0^B \rangle + \lambda_1 |\phi_1^A \rangle |\phi_1^B \rangle $$ ...


3

The tensor product of a non-pure state with any other state gives a non-pure state. One way to see it is noticing that the von Neumann entropy is additive with respect to tensor products: $S(\rho\otimes\sigma)=S(\rho)+S(\sigma)$ for any $\rho,\sigma$. Therefore if there is any $\rho_i$ that is not pure, then $S(\rho_i)>0$ and thus $S(\bigotimes_j\rho_j)&...


4

A state is pure iff it is rank one and $$ \mathrm{rank}\left(\bigotimes_i \rho_i \right) = \prod_i \mathrm{rank}(\rho_i). $$ This can be proven by considering the spectral decompositions of the $\rho_i$. So in answer to your question, your state is pure iff all of the $\rho_i$ are pure.


2

You may be interested in this paper Effcient quantum algorithms for GHZ and W states, and implementation on the IBM quantum computer. The paper provides general method how to prepare $n$-qubit W state. Concerning your question on how place the state's qubits to different location, you can prepare W state on qubits from $q_{1}$ to $q_n$ and then use SWAP ...


2

Sanity check: the statement is indeed true when $\rho$ is a pure state. We can start by finding the singular values of the combination of purified systems, which I will write as $|\phi\rangle$ and $|\Psi\rangle$. Given the Hermitian matrix $M=|\phi\rangle\langle\phi|-|\Psi\rangle\langle\Psi|$, we can look for eigenvectors of the form $\alpha|\phi\rangle+\...


4

Recall that the W state may be defined as: $$\vert W\rangle=\frac{1}{\sqrt 3}(\vert 001\rangle+\vert 010\rangle+\vert 100\rangle.$$ Given three qubits, initially to prepare such a state local operations (wherein at least two of the three qubits are at the same location) will need to be performed. Depending on your background, see, for example, this question ...


1

When we make a measurement we project the state of the qubit to the z-basis (i.e 0 or 1) so in general it is not possible to measure a global phase. That said, Measuring such global phases is an important subroutine in many quantum algorithms such as Shor's algorithm. This can be done using the Quantum phase estimation algorithm. For details, check https://...


2

If I may, I wanna share an algorithmic generalization for the inspired @Danylo Y answer. This considers also The Algorithmic Method in this answer here related to the CNOT gate. In order to algorithmically build a 2-qubit SWAP gate to operate swap within n-qubits, one could define an array containing n ID gates, i.e. ID=((1,0),(0,1)) matrices, named here as ...


2

The proof from Jozsa, Richard (1994). Fidelity for the Mixed Quantum States. Journal of Modern Optics, 41(12), 2315–2323. doi:10.1080/09500349414552171 Let $M = \sqrt \rho \sigma \sqrt\rho$. It's a positive semidefinite 2x2 matrix, so its eigenvalues are $\lambda_1, \lambda_2 \geq 0$. Then we have $$F(\rho,\sigma) = (tr\sqrt M) ^2= (\sqrt\lambda_1 + \sqrt\...


3

Vidal proved that, pure-state quantum computation is efficiently simulable classically if the quantum computer’s state at every time step has amount of entanglement (measured by Schmidt rank) polynomially-bounded (theorem 1 in the linked paper) And if the amount of entanglement grows subexponentially, then it can be classically simulated with sub-exponential ...


4

The definition of separability does not require any restrictions on the purity of the state. However, if $\rho$ is pure then it is separable on some bipartition $AB$ iff it can be written as $$ \rho = \rho_A \otimes \rho_B $$ where both $\rho_A$ and $\rho_B$ are pure states. Here's a sketch of why that's true. Note that if $\rho$ is separable we have $$ \rho ...


1

It is postulate or axiom of quantum mechanics that if a state $|\psi\rangle $ that is a linear superposition of eigenstates $\{ |e_i\rangle\}$ of some observable, $$ |\psi \rangle = \sum_i \alpha_i |e_i\rangle $$ then upon making measurement with respect to this observable, the state is observed in the state $|e_i\rangle$ with probability $|a_i|^2$. That is, ...


2

No, we do not require $\rho_A^i$ and $\rho_B^i$ to be pure. The state is separable any time it can be written in this form with positive weights $p_i$. As a basic example, we can choose a single $p_i$ to be nonzero; this is equivalent to saying that $$\rho=\rho_A^i\otimes \rho_B^i$$ is separable. This is true regardless of the purities of $\rho_A^i$ and $\...


3

I doubt that this is possible. Given a state $|\phi\rangle$, we have no method for distinguishing it from $e^{i\varphi}|\phi\rangle$ for any phase $\varphi$. This means that we have no way of distinguishing between $$\langle\psi|\phi\rangle\qquad \mathrm{vs.}\qquad e^{i\varphi}\langle\psi|\phi\rangle.$$ Specifically, we can choose $\varphi$ such that $$e^{i\...


3

Nonclassicality in general I should start by pointing out that there is no univocal notion of "(non)classicality". To name a few examples, in the context of quantum optics one might call a state "nonclassical" if it cannot be written as a convex combination of coherent states. Or when entanglement is involved you might call "...


4

If I understand correctly, your circuit looks like this: from qiskit import * qc = QuantumCircuit(2) qc.initialize(0,0) qc.initialize(1,1) qc.h(0) qc.h(1) qc.cx(0,1) qc.h(0) qc.h(1) qc.draw('mpl') And you want to run it in the Aer unitary simulator. However, the simulator does not support the instruction initialize. So you need to transpile your circuit ...


1

Just few ideas, I do not pretend this to be the definitive answer. Firstly, to exploit quantum advantage, you need to employ both superposition and entanglement. If these phenomena are not employed, a quantum computer can do anything a classical one can do but with no speed-up (I supposed that e.g. Toffoli gate is implemented in the computer, so you can ...


0

The answer is trivial thinking directly in the Bloch representation of the states. The TL;DR is that if $\newcommand{\bs}[1]{{\boldsymbol{#1}}}\nu_{\rm op}(\bs r)$ and $\nu_{\rm v}(\bs r)$ denote the operator and $\mathbb C^2$ vector corresponding to the Bloch vector $\bs r$, respectively, then $\nu_{\rm v}(\pm\bs r)$ are the eigenvectors of $\nu_{\rm op}(\...


2

Any state can be written as a matrix product state. There are systematic procedures to construct such a description, based on sequential SVDs, see e.g. Section 4.1.3 of this review. On the other hand, this description is usually of interest if the resulting MPS description has much less parameters than the $2^N$ parameters needed to describe a general ...


3

Note that \begin{align}|\psi \rangle &= \frac {1}{2}(| 0 \rangle_1|\psi \rangle_2|\phi \rangle_3 + | 1 \rangle_1|\psi \rangle_2|\phi \rangle_3 + | 0 \rangle_1|\phi \rangle_2|\psi \rangle_3 - | 1 \rangle_1|\phi \rangle_2|\psi \rangle_3) \\ &= \dfrac{1}{2} |0\rangle \bigg( |\psi\rangle_2 |\phi \rangle_3 + |\phi\rangle_2 |\psi\rangle_3 \bigg) + \dfrac{...


Top 50 recent answers are included