# Tag Info

0

(Disclaimer: I don't know what's going on "under the hood" in Qiskit's initialize, my answer is based on Q# part of the question, but I suspect it's something similar.) The state of a quantum system is not something that can be directly initialized to the necessary state (quantum computing would've been a lot easier if it was possible!) Instead we ...

1

The effect of noise is to give us outputs that are not quite correct. The effect of noise that occurs throughout a computation will be quite complex in general, as one would have to consider how each gate transforms the effect of each error. There is a very good article that shows Noise and its effect in practical using Qiskit https://qiskit.org/textbook/ch-...

0

Aer simulators will support what you're looking for very soon: https://github.com/Qiskit/qiskit-aer/pull/834

1

You can also create a Statevector, that can be directly initialized as follows: from qiskit.quantum_info import Statevector sv = Statevector.from_label('11') You can use sv.evolve(qc) to apply an operator/circuit to the state, where qc is the operator/circuit. sv.data gives you the numpy array, containing the actual implementation of the state. Check this ...

0

may be you can define a function like below from qiskit import QuantumCircuit def qubitinitialize(n,n_init): #n = number of qubits #n_init = initial state of each qubit qc = QuantumCircuit(n) for i in n_init: if i == 1: qc.x(i) return(qc) This function will return a circuit with initial state as you provide in n_init n = 4 #...

1

Classical information is stored the same way as it is for classical computers. You cannot use quantum states to store (in a retrievable way) more information that you would with classical bits.

2

For interactions between non-nearest neighbour qubits, ancilla qubits are required, together with SWAP gates. The state of one of the (in this case) two qubits is swapped with the ancilla. This operation is repeated until the qubits are NN, and then the interaction can take place. After this is done, then the state of the ancilla is swapped back with the ...

2

If you don't have the ability to perform the controlled-not directly between a pair of qubits, then you simply need to swap the qubits to place them onto a pair of qubits which can have a controlled-not applied to them.

0

Qiskit assumes that initially each qubitt is set to the $|0\rangle$ state. So if you have $n$ qubits, the initial state is $|00..0\rangle$. If you want to flip the state of some specific qubits, you have to apply an $X$ gate to each of those specific qubits. For example, the following code sets the $|11\rangle$ state: qr = QuantumRegister(2) cr = ...

2

Like many ideas in quantum information theory, I think this is best understood using a $2$-party communication scenario. Suppose Alice has a classical random variable, $X$ which can take values $1,2, \cdots, k$ with probabilities $p_{X}(1), p_{X}(2), \cdots, p_{X}(k)$. Alice then encodes this information by encoding the classical index $j$ in the state $\rho^... 1 For measuring 2 qubits, there are 4 possible outcomes, corresponding to projectors $$P_{00}=|00\rangle\langle 00|,\qquad P_{01}=|01\rangle\langle 01|,\qquad P_{10}=|10\rangle\langle 10|,\qquad P_{11}=|11\rangle\langle 11|.$$ So, if you have a state$|\psi\rangle$, you get the outcome$x$with probability$p_x=\langle\psi|P_x|\psi\rangle$. This immediately ... 1 All your real parts and imaginary parts are interchanged. Have you used complex(1,0) instead of complex(0,1) or something similar? Without the code one can only guess. Hope you can resolve it. 2 The set of separable states is closed. Thus, around any entangled state - not necessarily pure - there is an$\epsilon$-ball which lies entirely within the entangled states. Or, in the language of your question: All entangled states are "robust". (As illustrated by DaftWullie's answer, the size of this ball can depend on the state: There are pure ... 1 For a fixed$\epsilon_0$, why not simply consider $$|\psi\rangle=\cos\theta|00\rangle+\sin\theta|11\rangle?$$ Since it's a two-qubit state, entanglement can be determined using the PPT criterion. Hence, $$\rho=(1-\epsilon)|\psi\rangle\langle\psi|+\epsilon I/4$$ is entangled if$\epsilon<2\sin(2\theta)/(1+2\sin(2\theta))$. Any$\epsilon$you give me, ... 2 Given a separable bipartite state as$|\psi\rangle\otimes|\phi\rangle$, you "get" the states of the single systems but taking only the corresponding state, e.g. here$|\psi\rangle$or$|\phi\rangle$. More generally, you might not know the structure of the state, and you might have entanglement between the different subsystems, in which case the ... 4 Yes, this observation can be generalized. To start with, let's notice why is Hadamard the transformation required to measure a state$| \psi \rangle$in the$\sigma_{x}$basis. This is because it is the unitary intertwiner'' connecting the$\sigma_{x}$basis to the$\sigma_{z}$basis (a.k.a. computational basis). Recall that the$\sigma_{x}$eigenvectors ... 1 I am no longer confused about this, since now I see in this equation we are already restricting to a subspace$||S\mathcal{E}(|u\rangle\langle u|)-S\mathcal{E}(|v\rangle\langle v|)|| = |||u\rangle\langle u|-|v\rangle\langle v|||$, and the contracting map has to contract every subspace. 2 Though we don't come across negative probabilities in a quantum computation problem in the general sense, there is a historic context on the discussion and debate around negative probabilities in quantum mechanics. In 1942, Paul Dirac wrote a paper "The Physical Interpretation of Quantum Mechanics" where he introduced the concept of negative ... 1 Some thoughts: A theoretical perspective From a theoretical perspective, the depolarizing channel is the 'standard' (if there is such a thing) or by some means the most applicable. Because the Paulis (together with the identity operator) form a basis for$SU(2)$, if a code can correct the$X, Y$and$Z$flips on a certain qubit (and it it is able to ... 3 Just to add, I sometime come accros notion of negative probability in quantum mechanics. However, this misunderstanding. As you mentioned, each qubit can be writen as $$|q\rangle = \alpha|0\rangle + \beta|1\rangle,$$ where$\alpha, \beta \in \mathbb{C}$. So, we can have for example a qubit $$|q\rangle = \frac{1}{\sqrt{2}}(|0\rangle - \beta|1\rangle).$$ ... 13 The probability is$|\alpha|^2$, not$\alpha^2$, and thus always non-negative. 1 I know this is an old question, but I feel like giving, imo, the simplest answer following the question specified in N&C. Firstly as specified in the question define:$ \mathcal{E}(A) = \frac{A + XAX + YAY + ZAZ}{4}$. It it is easy to see that$ \mathcal{E}(I) = \frac{I + XIX + YIY + ZIZ}{4} = \frac{I + XX + YY + ZZ}{4} = I$For the other three ... 1 You can represent the "A" as a series of qubits in the$\vert 01000001\rangle$-state. Any other representation would work as well, as long as there is consensus on the notation. Regarding usefulness, most envisioned applications of quantum computers are as subpart of classical algorithms, where computationally hard problems are solved. Hence, '... 2 Norbert's answer is correct, but just for the sake of being explicit: $$\langle 0|^{\otimes N} D_P^{\otimes N}|0\rangle^{\otimes N}=\left(\langle 0|D_p|0\rangle\right)^{\otimes N}=\langle 0|D_p|0\rangle^{N}=\frac{1}{2^N}.$$ 5 Let's describe the one qubit pure stat in Bloch sphere notation (in order to avoid the global phase ambiguity): $$|\psi \rangle = \cos\big(\frac{\theta}{2}\big) |0\rangle + e^{i\varphi} \sin\big(\frac{\theta}{2}\big)$$ The problem can be solved with the quantum state tomography, but in this answer, I want to consider a slightly different approach for dealing ... 0 Usually, the calculation of amplitudes can be accomplished by either of the following properties: Complex amplitudes are always normalized (as they form the probabilities) so$|\alpha|^2+|\beta|^2$=1 Using the geometric interpretation of quantum bit (if you know the angle$\theta$) which realized the two-dimensional vector in your case on a unit circle in ... 3 You measure many times and collect statistics. E.g. you do$1000$measurements and find$600$times the first outcome. You can then deduce that$|\alpha|^2\simeq 0.6$and$|\beta|^2\sim0.4$(using appropriate statistical methods to compute the associated estimation errors). Note that this does not fully characterise the state, but only gives you the ... 3 As long as your final state is a product state, everything is a product, and the probabilities for the individual qubits will just multiply. So compute the probabilities for each qubit to be in the respective state and just multiply them. But even if this is not the case, you can compute$\langle \psi\vert D_p^{\otimes k}\vert\psi\rangle$rather than the ... 3 No, it's not possible to extract digits of the phase like that. It would violate the Holevo bound. In general there's no way to "amplify" single small phase differences into big phase differences, because of linearity. 6 Symmetric Werner states in any dimension$n\geq 2$provide examples. Let's take$n=2$as an example for simplicity. Define$\rho\in\mathrm{D}(\mathbb{C}^2\otimes\mathbb{C}^2)$as $$\rho = \frac{1}{6}\, \begin{pmatrix} 2 & 0 & 0 & 0\\ 0 & 1 & 1 & 0\\ 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 2 \end{pmatrix},$$ which is ... 4 Here is a circuit that can create the desired state (similar ideas were discussed in this answer), if all mentioned measurements yield$|0\rangle$state: or in a more compact form (the circuits are constructed via quirk). The first three qubits are ancillary qubits and the rest are the qubits where$|0_L\rangle$will be created if after the measurements all ... 0 Qubits are initialized at 0 so would you be wanting to flip certain qubits to 1? I’m tempted to just apply x gates to obtain the necessary bits. For example: |ψ⟩=...+|1010101⟩+... from qiskit import QuantumCircuit qc = QuantumCircuit(7) qc.x([0, 2, 4, 6]) I hope I understood your question :) 0$\newcommand{\calU}{\mathcal{U}}\newcommand{\ket}{\lvert#1\rangle}$Suppose such a circuit existed, and denote with$\calU$the unitary describing its overall action. For this to be a "circuit detecting entanglement", there should be two types of output states, one corresponding to the answer "yes, the input was entangled" and the other ... 1 Let$P_{\pm}$be the projectors onto the two orthonormal basis states of the measurement. So, $$P_+=\frac{1}{2}(|0\rangle\langle 0|+|1\rangle\langle 1|+e^{-i\phi}|0\rangle\langle 1|+e^{i\phi}|1\rangle\langle 0|).$$ Also, let$|\psi\rangle$be the state that you're measuring (note that this must be normalised. Yours might be depending on your constraints on ... 2 No. For instance, if I either give you$|00\rangle$or$|11\rangle$with 50% probability each, or$|00\rangle\pm|11\rangle$with 50% probability each, there is no way to distinguish these two cases - not even with any whatsoever small probability. The mathematical reason is that those are described by the same density matrix - but you always get some pure ... 2 You do not need to use the density matrix approach. However, as the most general representation of a quantum state, doing so has several advantages. You can simulate noise using just statevectors using probabilistic approaches, eg wavefunction monte-carlo, that converge to the density matrix results in the limit of many repetitions. Along this same thread of ... 3 Noise effects introduce classical uncertainty in what the underlying state is. A mixed state is a statistical ensemble of several quantum states$|\psi_i\rangle$(not necessarily orthogonal), with respective probabilities$p_i$. With the state vector you can represent pure states, not mixed ones. Instead, with the density operator you can represent both pure ... 3 As noted by Mateus in the comments, the transformation you are looking for is non-linear. This cannot be done with any matrix transformation. Thus, you will need more qubits, and your solution shows two (+1 scratch qubit) is sufficient. I guess you might wonder if a two-qubit unitary can do it, though? The problem is that the transformation you want to ... 2 The XOR operation is not a well defined action in quantum computing since it is non-reversible. (For example:$|0 \oplus 0\rangle = |1 \oplus 1\rangle = |0\rangle $) However, XOR is implicit in the CNOT operation, as CNOT$(|a,b\rangle) = |a, a \oplus b\rangle$Hence to answer my own question: CNOT$(|\psi \otimes \phi\rangle) = \begin{pmatrix} a_1b_1 \\ ...

2

The $\frac{1}{\sqrt{2}}$ is due to the normalization condition which says that sum of the squares of the amplitudes of the must be equal to one while the square of the amplitude refers to the probability of getting that particular state when the qubits are measured The vectors $|+⟩$ and $|-⟩$ are known as the eigenvectors for the Hadamard gate. When we apply ...

2

The trick is that you don't need to calculate the inverse of $B$. What you really want to evaluate is $$(\langle 0|\otimes I)(B^\dagger \otimes I)(\text{select}(V))(B\otimes I).$$ So, the point is that you only need $\langle 0|B^\dagger$ which is the Hermitian conjugate of $B|0\rangle$, which you know.

3

#1: the $1/\sqrt{2}$ is a normalization which ensures that the length'' of the vector is one. #2: The notation $|\pm\rangle$ is just a label for the two states defined above. Since the states $|0\rangle, |1\rangle$ are elements of a vector space, you can take linear combinations and therefore construct the states $|\pm\rangle$

1

I think unlike the relative phase in the answer you reference, it is a global phase in your case: Your XHP-circuit where P=ID, prepares the state: [0.707+0j,-0.707+0j], where P=X, prepares the state: [-0.707+0j, 0.707+0j]. These states are differ by a global phase ${e}^{i\pi}=-1$. But the global phase is undetectable $|ψ⟩:={e}^{iδ}|ψ⟩$, also see the answer.

0

On paper I think this a cool idea. Though the terms you are using like cost threshold, cost function, and weights will all have to be transformed. Classically this a well thought out idea and then to ask "If done on classical can I just tweak a few things and make them quantum?" is an awesome idea. The terms you used must be extended to the quantum ...

2

Apparently, the specific question posed here has been answered in the affirmative--at least (first, we point out) through numerical means--by Arsen Khvedelidze and Ilya Rogojin in Table 2 of their 2018 paper, "On the Generation of Random Ensembles of Qubits and Qutrits: Computing Separability Probabilities for Fixed Rank States" ArsenIlya They ...

2

No, there's not a lot you can say. Consider these two cases, both with $\epsilon=0$. First, the obvious one, $\rho=\sigma=|\psi\rangle\langle\psi|\otimes |\psi\rangle\langle\psi|$. Clearly $\rho_r-\sigma_r=0$. Second, let $|\psi^\perp\rangle$ be orthogonal to $|\psi\rangle$. You can have \rho=(|\psi\rangle\langle\psi|\otimes |\psi^\perp\rangle\langle\psi^\...

1

What is "a single qubit state" in your question? If it is really a single qubit in a unique unknown state and there are no other qubits in the same state (for example, prepared in the same way), then in the answer it is already quite explained for this case. If it is a single qubit in a quantum program (circuit) designed to be executed on a NISQ ...

Top 50 recent answers are included