diff --git "a/stack_exchange/QC/QCQ&A 2019.csv" "b/stack_exchange/QC/QCQ&A 2019.csv" new file mode 100644--- /dev/null +++ "b/stack_exchange/QC/QCQ&A 2019.csv" @@ -0,0 +1,44018 @@ +Id,PostTypeId,AcceptedAnswerId,ParentId,CreationDate,DeletionDate,Score,ViewCount,Body,OwnerUserId,OwnerDisplayName,LastEditorUserId,LastEditorDisplayName,LastEditDate,LastActivityDate,Title,Tags,AnswerCount,CommentCount,FavoriteCount,ClosedDate,CommunityOwnedDate,ContentLicense +8770,2,,8760,11/14/2019 18:22,,2,,"
In general, given two matrices $A$ and $B$ of dimensions $n_1\times n_2$ and $m_1\times m_2$, respectively, their tensor product $A\otimes B$ can be represented using the Kronecker product as +$$(A\otimes B)_{n_1 m_1,n_2m_2}=A_{n_1,n_2}B_{m_1, m_2}.$$ +The indices on the left hand side are a standard way to enumerate the integers from $1$ to $n_1 m_1$ and from $1$ to $n_2 m_2$. This is what you already observed in the case of $H\otimes H$, where two $2\times 2$ matrices become one $4\times 4$ matrix, whose elements are the product of elements of the two copies of $H$.
+",55,,,,,11/14/2019 18:22,,,,1,,,,CC BY-SA 4.0 +8775,1,,,11/14/2019 21:40,,3,99,"Recently, I saw this article, Classical and Quantum Bounded Depth Approximation Algorithms where the author discusses the limitations of QAOA relative to classical approaches.
+ +In particular, they state in the discussion:
+ +++ +""More generally, however, the results here point to a pattern. It seems like the QAOA is simply + a way of writing a quantum circuit which does something similar to a very simple classical algorithm: initialize spins + in some configuration and then update spins depending on those around it. For a one-step version of the algorithm, + the update is usually very simple: if the spins around it apply a strong enough force to the given spin, then it changes + in a way to increase the objective function. To the extent that the QAOA works, it seems that it works because + the classical algorithm works; there does not seem to be any general explanation in the literature as to why such a + quantum circuit should be better than such a classical algorithm.""
+
Caveat: I'm just coming to understand QAOA. That said, from my reading of the paper, it seems that the 'local' QAOA approaches discussed don't yield better approximation bounds than the comparable classical heuristics. Indeed, the authors appear to indicate that classical approaches may be better in some respects given the additional guarantees they can offer. Of course, QAOA can be applied to multiple optimization problems, so this may not be generalizable. Further, even the global QAOA doesn't appear to do much better – with classical approaches still offering better approximation.
+ +Thus, my question is: Given our current understanding of quantum algorithms and the approaches they enable, can quantum approaches (like QAOA) yield provably better approximation bounds than classical algorithmic approaches on optimization problems?
+ +Any specific example of a quantum approach with a known better approximation bound would be great; even better would be a complexity argument demonstrating that a quantum model of computation can enable better approximation than classical models.
+",1937,,26,,11/26/2019 20:04,11/26/2019 20:04,"Quantum algorithms, combinatorial optimization, and approximation bounds",In finance, a European call gives the buyer the right to buy some underlying asset such as a stock at some pre-determined strike price at a specific expiration date. The Black-Scholes equation is a fairly simple formula that can be easily written in Python for classical computing to value financial derivatives like the call option.
+ +At the link below, IBM's cross-displinary quantum package for Python, Qiskit Aqua, seems to use qubits to price a European call option instead. Could someone give me a walk-through of what the code is doing line by line and how it compares to a classical Python code for pricing a European call? Are there any theoretical or numerical differences between classical and quantum pricing?
+ + + +Also, is there an article being used as the source for the above Python script? My guess is that it's this one, but not sure since I don't yet have a background in matching quantum code with quantum formulas:
+ +""Towards Pricing Financial Derivatives with an IBM Quantum Computer"" +https://arxiv.org/pdf/1904.05803.pdf
+",9118,,9006,,1/10/2020 14:14,5/4/2020 3:54,Quantum pricing of financial derivatives (call option) in Qiskit Aqua,I am starting to see a lot of classical quantitative problems such as linear regression being represented in quantum math, which suggests that almost anything based on frequentist statistics could be upgraded to the fancy 'braket' notation found in quantum math, in the same way that Bayesian interpretations of classical math models are currently abundant on the side line.
+Ignoring the fact that anyone without a Masters in physics does not have the background to grasp or make a career out of quantum programming applied to their own discipline, at least what fundamental tenets, principles, and approaches, beyond just the qubit and circuitry theory, would help with the practical translation of existing classical math and Python code to their quantum counterparts? And is there a foreseeable demand in this sort of work, assuming that the quantumification of maths and code for some antiquated problem specific to some discipline at least generates a small speed-up over classical formulas and code?
+Any holistic sources that discuss the impending migration from the classical to quantum paradigm math-wise would be great as well.
+",9118,,1768,,11/2/2022 7:21,11/2/2022 7:21,Translating classical math and code to quantum math and code,At least currently, most of the translations being made are in extraordinarily specialized areas - for example, quantum chemistry / computational chemistry. A lot of the math involves mapping domain math to quantum computers - ab initio molecular simulations need to map their traditional annihilation/creation operators to the X, Y, Z gates in quantum computers (https://arxiv.org/abs/1001.3855).
+ +There likely will be demand for people who are able to effectively create new domain-specific quantum algorithms / apply existing quantum algorithms to solve new problems.
+ +A big point is that quantum computers will not be stronger at all operations! We will likely not need to mitigate over much common classical code; instead, quantum computers will act as accelerators for specific operations (much like GPUs for graphical operations).
+",8343,,26,,11/21/2019 20:01,11/21/2019 20:01,,,,0,,,,CC BY-SA 4.0 +8780,1,,,11/15/2019 0:06,,2,69,"The Harrow-Hassidim-Lloyd (HHL) algorithm for quantum matrix inversion (linear algebra) bridges classical math to quantum math and has been adopted for quantumizing many classical applications, such as linear regression and deep neural networks.
+ +Since solving a system of linear equations can alternatively be solved with optimization algorithms to attain an equivalent solution, how has the progress been with developing quantum versions of simple gradient-based and gradient-free algorithms used in classical optimization (e.g. gradient descent, coordinate descent, other gradient-free heuristics)? I've only come across quantum annealing so far. Some explanation of linked research articles or Python code would be nice.
+",9118,,,,,11/15/2019 0:06,Quantum Optimization algorithms,The idea of a qubit being able to exist for several values between 0 and 1 (superposition) makes it sound like it can do alot for probabilistic math problems, but for one task that comes instantly to mind, probabilistic sampling, or random number generation from a target probability distribution, how would the quantum version of doing this be implemented, and where exactly does superposition kick in? For this task, does superposition get its edge due to it capturing the entire distribution all at once somehow? And are other quantum properties like entanglement also being exploited.
+ +Besides sampling, the usage of quantum to map and pre-emptively evaluate all possible outcomes for a utility, reward or loss function, for example, all seem to be related somehow, but I still can’t see what role superposition is playing in these sort of probabilistic tasks mathematically, compared to the binary 0 (false/off/no) and 1 (true/on/yes) classical case, which itself doesn’t invoke some correspondence to the task at hand either.
+",9118,,,,,11/15/2019 4:16,What does superposition do for quantum probabilistic sampling?,Bra-ket notation is not necessarily tied to ""quantum math,"" it's simply a convenient notation in many circumstances. It may seem intimidating at first, but once you understand the basics (ket = vector, bra = covector) it's straightforward to grasp, as long as you have a solid understanding of Linear Algebra. If you are shaky on Linear Algebra, different notation is unlikely to help.
+ +Quantum algorithms on the other hand are entirely different. These involve deep insights that may span several fields (particularly Math, CS and Physics), and I doubt that understanding them is easy for anybody (including physicists). Anybody from one of these three fields will certainly have a head start, but anyone with a STEM background and sufficient motivation should be able to learn the material. Nielsen and Chuang cite ""mathematical maturity"" as the key prerequisite.
+ +Once the hardware is available to run meaningful quantum algorithms, I have no doubt that demand will vastly exceed supply of people capable of applying quantum algorithms to domain specific tasks. There is, however, a fair amount of uncertainty as to when that day will come.
+ +I don't really know any references that match your request well, but you might find John Preskill's keynote address on NISQ era quantum computing helpful.
+",8623,,,,,11/15/2019 1:13,,,,0,,,,CC BY-SA 4.0 +8783,1,12030,,11/15/2019 1:40,,3,106,"Are there, any journals out there that have been steadily publishing, or are dedicated to, research on existing or new and innovative quantum algorithms? Generalist titles are fine, but they can also be field-specific.
+",9118,,26,,11/16/2019 15:16,5/15/2020 7:16,Academic journals dedicated to quantum algorithms,Classical computers are inherently deterministic, so they either generate pseudorandom numbers, or use an external physical process with statistically random noise to generate random numbers.
+ +Quantum computers are inherently probabilistic, so generating true random numbers is very natural for them. Quantum random number generators are already on the market (e.g., IDQ).
+ +This circuit
+ + + +generates 0 or 1 on $c_0$, both with probability 0.5. Using $n$ quantum and classical registers configured identical to those above would randomly generate a number between $0$ and $2^n-1$.
+ +In the circuit above, the Hadamard gate ($H$) transforms the qubit from a known state $\vert 0 \rangle$ to a superposition of states described by
+ +$$H \vert 0 \rangle = \frac{\vert 0 \rangle + \vert 1 \rangle}{\sqrt{2}}.$$
+ +If the Hadamard gate was removed, i.e. no superposition, there would be no randomness in the output since the measurement would read $\vert 0 \rangle$ every time (apart from noise).
+ +More complicated circuits can be built to do more interesting sampling tasks, but I'm not sure what you are looking for specifically. This talk goes into more detail on the subject.
+ +If you are new to quantum computing, you might need to work through a good textbook on the subject (the standard text is Nielson and Chuang) before any of this will make much sense.
+",8623,,8623,,11/15/2019 4:16,11/15/2019 4:16,,,,1,,,,CC BY-SA 4.0 +8785,2,,4179,11/15/2019 6:21,,0,,"We can physically realise Quantum Randomness using Quantum Random Number Generators which harness quantum randomness through various processes such as boson sampling. When you look at a physical implementation of Quantum Randomness from Quantum Circuits, Hadamard transforms on Qubits would be an interesting approach. In addition, we can try techniques such as Bernoulli Trials or Quantum Oracles for realising Quantum Randomness from deterministic quantum circuits. Random Sampling of deterministic circuit is a recommended approach in this regard. Please find an interesting research concept note in this area. +http://www.hri.res.in/~iwqi12/iwqi12_talks/Poster_Akshata.pdf
+",4501,,,,,11/15/2019 6:21,,,,0,,,,CC BY-SA 4.0 +8786,1,,,11/15/2019 6:24,,-3,111," + +How can I have 150 or more credits? +I mean I want to have '150/150 credits'.
+",8901,,26,,11/16/2019 15:00,11/16/2019 15:00,How to get more credits?,I'm John and I have a question which I have been thinking about. I'm studying quantum information, especially, quantum error-correcting codes. When I learned some types of quantum codes (e.g. 5 qubits code or quantum Hamming code), I thought the following condition is also a necessary condition for quantum codes, but I have no idea to prove it. Could anyone prove it although it might be false?
+ +Let $\mathbb{P}=\{P_1,...,P_n\}$ be a projection measurement, $\rho$ an $m$ qubits codeword and $U_i$ a unitary operator which represents an error ($i=1,...,m$:position of error). Then, the condition is +$$\forall k_1,k_2\in \{1,...,n\}, \forall i\in \{1,...,m\},\mathrm{Tr}(P_{k_1}U_i\rho U_i^\dagger)\neq 0 \land \mathrm{Tr}(P_{k_2}U_i\rho U_i^\dagger)\neq 0\\ \Rightarrow \frac{P_{k_1}U_i\rho U_i^\dagger P_{k_1}}{\mathrm{Tr}(P_{k_1}U_i\rho U_i^\dagger)}=\frac{P_{k_2}U_i\rho U_i^\dagger P_{k_2}}{\mathrm{Tr}(P_{k_2}U_i\rho U_i^\dagger)}$$
+",9136,,55,,12/7/2020 11:55,12/7/2020 11:55,About a necessary condition for quantum error correcting codes,D-Wave's 2000Q is a quantum annealer, not a circuit-based quantum computer like Google's Sycamore. The qubits in D-Wave's system are much noisier, less controlled and perform a fundamentally different type of computation compared to Google and IBM's circuit-based quantum computers.
+ +D-Wave's current system cannot simulate the observable universe or the human brain. What led you to believe this? Despite the large number of qubits, noise and lack of control prevent their present system from any hope of demonstrating quantum supremacy.
+ +According to John Preskill (here)
+ +++",8623,,,,,11/15/2019 6:44,,,,0,,,,CC BY-SA 4.0 +8789,2,,8769,11/15/2019 7:18,,1,,"...as of now we don't have a convincing theoretical argument or + persuasive experimental evidence indicating that quantum annealers can + really speed up the time to solution compared to the best classical + hardware running the best algorithms for the same problems.
+
The way that I approach the calculation is quite different. I think of +$$ +e^{i\frac{\theta}{2}\sum_n X_i}=\prod_ne^{i\frac{\theta}{2}X_i}. +$$ +So, this means that you can consider the term +$$ +e^{i\frac{\theta}{2}\sum_n X_i}S_Me^{-i\frac{\theta}{2}\sum_n X_i} +$$ +on a qubit-by-qubit basis. You'll have terms like +$$ +e^{i\frac{\theta}{2}X}Ze^{-i\frac{\theta}{2}X}, +$$ +where $Z$ might be replaced by $Y$ (doesn't make any difference to the forthcoming analysis). Recall that $e^{i\frac{\theta}{2}X}=\cos\frac{\theta}{2} I+i\sin\frac{\theta}{2} X$. This lets us use the anti-commutation of $Z$ with $X$: +$$ +Z(\cos\frac{\theta}{2} I-i\sin\frac{\theta}{2} X)=(\cos\frac{\theta}{2} I+i\sin\frac{\theta}{2} X)Z. +$$ +This means that our per-qubit term has become +$$ +e^{i\frac{\theta}{2}X}Ze^{-i\frac{\theta}{2}X}=e^{i\frac{\theta}{2}X}e^{i\frac{\theta}{2}X}Z=e^{i\theta X}Z. +$$ +So, overall we have +$$ +\text{Tr}\left(e^{i\theta\sum_n X_i}S_MG\right), +$$ +at which point we just use that $S_MG=G$.
+",1837,,,,,11/15/2019 7:18,,,,4,,,,CC BY-SA 4.0 +8790,2,,8787,11/15/2019 7:30,,1,,"I don't believe that this is true (at least without further qualifiers). If I'm correctly understanding what you're trying to convey, I think we can essentially simplify this statement to asking whether there can exists a state $|\psi\rangle$ and two projectors $P_1$ and $P_2$ such that $$P_1|\psi\rangle\neq P_2|\psi\rangle$$ (ignoring normalisation for simplicity). If so, your statement is false.
+ +Now, let $|\phi\rangle$ be a state that is orthogonal to $|\psi\rangle$. Then we can choose +$$ +P_1=\frac{1}{2}(|\psi\rangle+|\phi\rangle)(\langle\psi|+\langle\phi|),\qquad P_2=\frac{1}{2}(|\psi\rangle-|\phi\rangle)(\langle\psi|-\langle\phi|) +$$ +Now if you want to start imposing specific properties of syndrome measurements for error correcting codes, that might be a different story... (even then, you might want to distinguish between non-degenerate codes and degenerate codes. Without much thought, I guess your statement is true for syndrome measurements on a non-degenerate code).
+",1837,,,,,11/15/2019 7:30,,,,1,,,,CC BY-SA 4.0 +8791,2,,8763,11/15/2019 8:02,,4,,"This is a neat idea. However, having individual overlaps being small isn't sufficient in a quantum system. For example, imagine the set of overlaps +$$ +\langle V_1|V_N\rangle=0,\qquad \langle V_1|V_n\rangle=\langle V_N|V_n\rangle=\epsilon \quad \forall n=2,\ldots,N-1, \langle V_n|V_m\rangle=0 \quad \forall n,m=2,\ldots,N-2 +$$ +Remember that these are supposed to be simulating orthogonal states, so starting from $|V_1\rangle$, you should never be able to get to $|V_N\rangle$. Now consider the Hamiltonian +$$ +H=\sum_{n=2}^{N-1}|V_n\rangle\langle V_n|, +$$ +evolving the state +$$ +e^{-iHt}|V_1\rangle. +$$ +The evolution occurs in a 3-dimensional subspace spanned by +$$ +|V_1\rangle, |\Psi\rangle=\frac{1}{\sqrt{N-2}}P\sum_{n=2}^{N-2}|V_n\rangle, |V_N\rangle +$$ +where $P$ represents the projection onto the subspace orthogonal to $|V_1\rangle,|V_N\rangle$ and normalisation.
+ +Now, $\langle \Psi|H|V_1\rangle=\langle \Psi|H|V_N\rangle\sim\epsilon\sqrt{N}$ (I'm not calculating this carefully here), and we can calculate other similar terms so that the Hamiltonian in this 3-dimensional subspace becomes +$$ +\approx\left(\begin{array}{ccc} +N\epsilon^2 & \sqrt{N}\epsilon & N\epsilon^2 \\ +\sqrt{N}\epsilon & 1 & \sqrt{N}\epsilon \\ +N\epsilon^2 & \sqrt{N}\epsilon & \sqrt{N}\epsilon +\end{array}\right), +$$ +where the matrix it's supposed to be simulating is +$$ +\left(\begin{array}{ccc} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{array}\right). +$$ +For large $N$, these are very different. For example, the first matrix can almost perfectly transfer the state $|V_1\rangle$ to $|V_N\rangle$ in time $\pi/(1+2N\epsilon^2)$, and this is something you could easily measure for reasonable choices of, say $|V_1\rangle=|0\rangle^{\otimes N'}$ and $|V_N\rangle=|1\rangle^{\otimes N'}$ because to detect that the state is no longer in $|V_1\rangle$, it would be sufficient to perform a simple magnetisation measurement, or similar.
+",1837,,1837,,11/16/2019 7:32,11/16/2019 7:32,,,,6,,,,CC BY-SA 4.0 +8792,2,,8786,11/15/2019 8:21,,2,,"The point of the credits system is to make access to the devices fair so that everyone can take a turn at using them. You cannot get that number of credits as it would mean you could add a lot of jobs to the queue, slowing down response times for everyone else. I don't think there is any simple way to increase the number of credits you have.
+ +I would suggest running jobs on the simulator if you need to run that many credits worth of jobs, as simulator jobs don't use up any credits.
+",5955,,,,,11/15/2019 8:21,,,,1,,,,CC BY-SA 4.0 +8793,2,,8776,11/15/2019 8:27,,2,,"There are tutorials for a lot of the Qiskit Aqua functions kept in the tutorials repository, and I think this talks about the finance problem you are interested in.
+ +All of these tutorials are also available on the IBM Q Experience where you can run them in a browser.
+",5955,,,,,11/15/2019 8:27,,,,0,,,,CC BY-SA 4.0 +8794,1,,,11/15/2019 10:32,,6,1082,"I understand that the partial trace is a linear map, a completely positive map and a trace-preserving map. However, I have no idea how to define a quantum channel with the partial trace because partial trace depends on an index $i$(i.e. $i$ of $\mathrm{Tr}_i(\rho)$). Intuitively, the index $i$ is random, but then I don't know how to define a map that represents the partial trace. Could anyone teach me the definition of a quantum channel using the partial trace?
+",9136,,55,,11/24/2020 14:22,5/17/2021 9:08,How to define a quantum channel for the partial trace?,The first and foremost thing to realize is that the partial trace over a density matrix is indeed a linear CPTP map $\Lambda$, but it is not a map from any $\mathcal{C}^{n\times n} \rightarrow \mathcal{C}^{n\times n}$ (i.e. to `itself' - the same dimension), but rather to a density operator space with a lower dimension: $\mathcal{C}^{n\times n} \rightarrow \mathcal{C}^{m\times m}$ with $m < n$.
+For this reason, some of the common representations are not really usable; representations of a map $\Lambda$ like the Choi matrix or the $\chi$-matrix are often only used for maps that preserve the dimension.
+However, if you are familiar with Kraus operators, they do offer a very straightforward representation. A partial trace over some index $i$ can be seen as the following operation:
+\begin{equation} +tr_{i} \big[\rho\big] = \sum_{j} \Big(I^{\otimes i-1}\otimes \langle{j}|\otimes I^{\otimes n-i}\Big) \rho \Big(I^{\otimes i-1}\otimes |{j}\rangle\otimes I^{\otimes n-i}\Big) +\end{equation} +That is, if I want to trace out the $i$-th qubit of some system of $n$ qubits described by $\rho$, I sum over an entire basis $\{|j\rangle \}$ on that qubit, and I do nothing (i.e. $I$, the identity operator) on all other $n-1$ qubits.
+This representation allows us to obtain a straightforward Kraus representation of the map:
+\begin{equation} +A_{j} = I^{\otimes i-1}\otimes \langle{j}|\otimes I^{\otimes n-i}, +\end{equation}
+which is an operation that acts trivially on the first $i-1$ qubits and last $n-i$ qubits, and only acts nontrivially on the $i$-th qubit. Note that the Kraus operator is not square, which reflects the fact that the linear map is from a space of higher dimension to a space of lower dimension.
+Furthermore, note that we are free to choose what basis we use for $\{|j\rangle \}$; the computational basis is often used. This reflects the fact that a set of Kraus operators for a map is not unique.
+Generalization to tracing out more qubits is easily done by either applying the single-qubit trace in succession, or by replacing the $I$ operator of the specific qubit by a ket state as well - an important thing to notice here is that one needs to sum over the entire basis of the combined qubits that are being traced out. (That means that to trace out $k$ qubits there are $2^{k}$ Kraus operators associated with that map.)
+",8141,,8141,,11/24/2020 22:02,11/24/2020 22:02,,,,5,,,,CC BY-SA 4.0 +8797,1,8798,,11/15/2019 13:14,,3,172,"The problem of quantum simulation can be formulated as follows:
+ +++ +Given a Hamiltonian $H$ ( $2^n \times 2^n$ hermitian matrix acting on $n$ qubits), a time $t$ and maximum simulation error $\epsilon$, the goal is to find an algorithm that approximates $U$ such that $ || U - e^{-iHt}|| \leq \epsilon $, where $ e^{-iHt}$ is the ideal evolution and $|| \cdot ||$ is the spectral norm.
+
I was wondering, how can you compare the result of your algorithm with an ideal evolution? It would make sense, if this ideal evolution could be calculated analytically, but I think it's rarely the case. This $e^{-iHt}$ could be also given by an oracle, but in a real world scenario we just cannot use such an approach.
+ +So, how can you actually compare the result of your approach with something, that cannot be efficiently obtained (in fact, if it could be obtained efficiently, then the whole idea of designing other algorithm to approximate this result doesn't make sense anymore).
+",2098,,,,,11/15/2019 14:58,How is the precision of a quantum simulation algorithm actually proved?,++ +how can you compare the result of your algorithm with an ideal evolution?
+
You cannot and you do not need to.
+ +As you said, computing $e^{-iHt}$ is intractable for most of the interesting cases. If it was not, chemistry simulations would be easy, solving the Schrödinger equation too.
+ +The thing you can do though is to prove that your algorithm will, for a (potentially restricted) set of Hamiltonians, output a unitary $U$ that satisfy the condition $||U - e^{-iHt}|| \leqslant \epsilon$. You do not compare the output of your algorithm with the ideal evolution, you prove that your algorithm is guaranteed to return a result that satisfy the condition.
+ +If you are more familiar with computer science, these are pre/post-conditions. +Applied to the definition of Hamiltonian simulation you gave:
+ +Any algorithm that solve the Hamiltonian Simulation problem should, when the pre-conditions are checked (i.e. the user gave correct inputs), return a result that verify the post-conditions above.
+",1386,,,,,11/15/2019 14:58,,,,1,,,,CC BY-SA 4.0 +8799,1,9661,,11/15/2019 15:48,,1,217,"In Nielsen and Chuang Quantum Computation and Quantum Information book section 1.5.1 describing the Stern-Garlach experiment, it says: ""Hydrogen atoms contain a proton and an orbiting electron. You can think of this electron as a little 'electric current' around the proton. This electric current causes the atom to have a magnetic field;"" I thought the view of an electron orbiting the nucleus is outdated, replaced by the model of a probabilistic cloud around the nucleus in modern quantum physics view.
+ +Can anyone help me to understand the relationship between the two views today? (I majored in computer science, without much formal education in modern physics.) Thanks.
+",8321,,26,,11/16/2019 14:53,1/26/2020 19:14,Atom magnetic moment caused by orbiting electron,When I try to install Qiskit using Pip install Qiskit I get the error as shown in the attached snapshot.
+ +Any help will be highly appreciated.
+ + +",9141,,26,,11/16/2019 14:51,11/16/2019 14:51,Problem in installing Qiskit,This issue is within the pyscf
package that is required by qiskit. It says here that this error may occur with certain versions of python, and I have seen it commonly coming up with python 3.8. There are some workarounds in that link, but if you have nothing forcing you to use python 3.8, I would suggest downgrading to the next newest version before that.
I have been running on python 3.7.5 (which you should be able to install by simply specifying python=3.7
when creating a new anaconda environment) and I do not see this error.
Suppose you had an ""analog"" quantum computer, where a register would store a wavefunction $\psi(x)$ where $x$ is a continuous variable (with $0\leq x\leq 1$, say). Instead of gates, you would somehow apply unitary operators to the wavefunction. In this context, it seems to me that the QFT would essentially be equivalent to changing to the momentum basis, $\psi(k)$. This could be done by using a different physical apparatus to measure the state of the register, and wouldn't require the actual application of any unitary operators to the wavefunction. Could there be a similar result for a qubit register which could be measured in two different non-commuting bases? If not, why?
+",9144,,,,,11/15/2019 21:40,Can a QFT be implemented as a physical change of the measurement basis?,Yes, you can in principle do any measurement as a direct physical operation. The real obstacle is to come up with a way of actually doing it in practice.
+ +The basis states of QFT-ish measurement span every qubit in the register. This means that whatever physical mechanism you are using must be merging together information as large as the register. But physics is local, and your measurement is not, implying you need to build up your big information-merging measurement out of many local interactions. That set of local interactions will probably be isomorphic to quantum gates.
+ +For example, you can do a QFT-ish measurement on photons by putting a diffraction grating between them and the detectors... but isn't putting down the grating just a ultimately roundabout way of applying a gate before measuring?
+",119,,,,,11/15/2019 21:40,,,,3,,,,CC BY-SA 4.0 +8804,1,8805,,11/15/2019 22:39,,4,341,"I have seen two similar proofs of the no-cloning theorem. They assume (to the contrary) that there exists a unitary operator $U$ such that $U |\psi\rangle |0 \rangle = | \psi \rangle | \psi \rangle$, For any possible $|\psi\rangle$. The proof does not seem to rule out the case that there exists a specific $U$ that can clone only the specific state $| \psi \rangle$. Discussion of the no-cloning theorem implies that there cannot be a specific $U$, which can only clone a certain state, even when the proof only proves that there cannot be a general $U$ which can clone any state. Is there a proof of this specific case somewhere? Or maybe I am missing something from the original proof.
+ +(I am referencing the one in Nielsen and Chuang which ends with the contradicition that $\langle \psi | \phi \rangle = \langle \psi | \phi \rangle^2$.)
+",9149,,9149,,11/20/2019 4:48,11/20/2019 4:48,Premise of the proof of the No-Cloning Theorem,++ +The proof does not seem to rule out the case that there exists a specific U that can clone only the specific state |ψ⟩.
+
That's because you can clone specific states. Cloning is only impossible if the set of possible input states includes a pair of states that are not orthogonal.
+ +For example, here is a circuit that performs $|\psi⟩ \to |\psi⟩|\psi⟩$ as long as $|\psi\rangle$ is promised to be exactly $|0\rangle$ or exactly $|1\rangle$ and never anything else:
+ + +",119,,26,,11/16/2019 14:44,11/16/2019 14:44,,,,4,,,,CC BY-SA 4.0 +8806,2,,8799,11/16/2019 9:13,,0,,"Yes. It is outdated, however, to explain something without sounding too abstract the old stationary orbiting solutions come handy.
+",9070,,,,,11/16/2019 9:13,,,,1,,,,CC BY-SA 4.0 +8807,2,,8804,11/16/2019 9:20,,1,,"The real missing keyword in the stating the theorem is ""arbitrary unknown state""! If you have some information about $|\psi\rangle$, i.e. specific state, then perhaps you can reconstruct that state!
+",9070,,26,,11/16/2019 14:45,11/16/2019 14:45,,,,0,,,,CC BY-SA 4.0 +8808,1,,,11/16/2019 10:06,,3,656,"Given two sets of $N$ uniformly random binary bitstrings of size $m$, such as $$(x_0,x_1,...,x_m) \space \forall x_i \in \{0,1\}.$$
+ +One generated from a quantum device and the other generated by random uniform in Python. Knowing that quantum is really random and classical is pseudo-random, is there any statistical test to distinguish which one is classical and which one quantum?
+",9070,,26,,11/16/2019 14:41,11/19/2019 9:35,How to distinguish quantum random from classical random?,Depends on what pseudorandom generator Python is using; if the pseudorandom generator is cryptographically secure, then it is computationally impossible to distinguish whether a bit string is generated by the pseudorandom generator or is truly random.
+ +On the other hand, ""truly random"" quantum generator may fail classical randomness tests, because real-world quantum random number generation does not automatically guaranty uniformity (and requires some randomness extractor, quantum or classical, to make the output bit string computationally indistinguishable from uniform).
+",2105,,,,,11/16/2019 11:40,,,,0,,,,CC BY-SA 4.0 +8810,1,,,11/16/2019 17:08,,2,64,"I have to test a simulator with a high number of random stabilizer circuits. +One way to create random stabilizer circuits is to generate random graph states and convert those to circuits, this, however, will always yield optimized circuits (in particular the entanglement gates will be optimized).
+ +Is there a systematical way to generate randomized unoptimized stabilizer circuits? Can this algorithm take the starting state into account i.e. if the simulation will always start from $$|+\rangle = \left(\bigotimes\limits_{i=0}^{n-1} H_i \right)|0\rangle \ ?$$
+",9157,,26,,11/16/2019 17:25,11/16/2019 17:25,How to randomly generate unoptimized stabilizer circuits?,I've been meaning to implement Grover's Algorithm for the 3-bit case, wherein I need to implement a CCCNOT gate. How can this be done efficiently (i.e. as few Toffoli and/or CNOT as possible)?
+",9156,,,,,11/16/2019 17:09,How would one implement a 4-qubit CCCNOT gate (equivalent to controlled-Toffoli)?,The idea behind pseudo-random number generators is to generate random numbers using the software, which is convenient and cost-effective. The pseudo-random number generators are one-way functions so if you know the seed you can predict their subsequent values but you cannot determine the sequence of values if you do not know the seed. Quantum randomness is physical randomness or the so-called true randomness. Mathematically, they both have the same statistical properties; provided large number of values are sampled from both of them. Thus, a well designed pseudo-random number generator would be as random as Physical (True) Quantum random number generators, so if you do not know the seed, you will not be able to distinguish them. The advantage of Physical (True) Quantum random number generators is that you cannot guess their values in any case.
+ +If the pseudo-random number generator is not well designed then you can identify patterns in it like the infamous RANDU routine (https://en.wikipedia.org/wiki/Randomness_tests), which fails randomness tests.
+ +In practice, physical source of randomness is often XORed with pseudo-random numbers to pass the randomness test. You may refer to https://en.wikipedia.org/wiki/Random_number_generation
+",8120,,,,,11/16/2019 18:34,,,,0,,,,CC BY-SA 4.0 +8814,1,8815,,11/17/2019 0:10,,6,451,"In Nielsen and Chuang Quantum Computation and Quantum Information book section 2.2.6, a POVM of three elements are used to measure a single qubit in order to know for sure whether the state is $|0\rangle$ or $|+\rangle$ if the first two measurement results are obtained, and do not infer the state when the third result is obtained.
+ +My question is: is it physically realizable to measure three possible results from a single qubit? I thought you can only get n bit of information measuring n qubits. Three outcomes is more than one bit.
+",8321,,55,,3/12/2021 19:45,3/12/2021 19:45,Are three POVM measurements on a single qubit physically realizable?,Three outcomes amounts to more than one bit if the outcomes are all deterministic, and give you information about the original qubit.
+ +But suppose I have a coin (that is either heads or tails). I roll a dice, and if it comes 1 through 5, I tell you ""H"" or ""T"", depending on what the coin is. If it comes up 6, I tell you ""6"".
+ +There are three outcomes, but on average, you're only getting $\frac{5}{6}$ of a bit of information about the coin with each trial.
+ +You're indeed getting more than one bit of information about the symbol I tell you, but if you get a ""6"", it doesn't tell you anything about my coin.
+ +This is the way that Nielsen and Chuang's POVM works. You either learn $|0\rangle$, $|+\rangle$, or a third outcome (call it ""6"") that doesn't tell you anything about the qubit.
+",1765,,,,,11/17/2019 2:31,,,,2,,,,CC BY-SA 4.0 +8816,1,8826,,11/17/2019 11:33,,1,181,"What does the notation $|\psi\rangle$ mean and how does it relate to the notation $|0\rangle$ and $|1\rangle$? Does $\psi$ have some connection to the one found in Shroedinger's equation?
+",9118,,9118,,11/17/2019 23:05,11/17/2019 23:05,What does $\lvert \psi \rangle$ mean?,If
+ +then are binary states (0,1) a significant and pervasive construct underpinning the theory of classical physics as opposed to quantum physics?
+",9118,,26,,11/18/2019 7:44,11/19/2019 9:44,Are binary states (bits) pervasive in classical physics?,Ewin Tang says to not expect exponential speed-ups from quantum machine learning using low-dimensional data because, in such cases, quantum analogues of classical algorithms will not provide outperformance.
+ +What then is the definition of low-dimensional data exactly in classical machine learning for an array with $N$ rows and $K$ columns? Can such an array even be considered high-dimensional, and if so, in which direction ($N\gg K$ or $K\gg N$)? Or does high-dimensionality require that the array possess a third dimension ($N$, $K$ and $M$)?
+",9118,,9118,,11/17/2019 18:42,11/18/2019 23:59,Low-dimensional data and quantum machine learning,Quantum computing is not a refinement of classical computing; it's simply a different paradigm of computing aimed at solving specific categories of problems more efficiently.
Quantum computing doesn't necessarily require qubits (cf. qudit); that's just a theoretical and experimental convenience. In fact, continuous-variable quantum computing seems to be a hot research area these days.
As for the broader question of whether the universe is 'discrete' or 'quantizable', you might find the concepts of digital physics and bit string physics interesting.
Consider an arbitrary $n$-qubit state $\lvert \psi \rangle$. How much do we understand about the probability distribution of the fidelity of $\lvert \psi \rangle$ with a tensor product $\lvert \alpha \rangle = \lvert \alpha_1 \rangle \lvert \alpha_2 \rangle \cdots \lvert \alpha_n \rangle$ of Haar-random pure states $\lvert \alpha_j \rangle$?
+ +It seems to me that the mean fidelity will be $1/2^n$ (taking fidelity to be measured in units of probability, i.e., $F(\lvert\alpha\rangle,\lvert\psi\rangle) = \lvert \langle \alpha \vert \psi \rangle \rvert^2$). For instance, we can consider the fidelity instead of $\lvert \psi \rangle$, subject to a tensor product of Haar-random single-qubit unitaries, with the state $\lvert 00\cdots0 \rangle$. It seems to me that, up to phases, the Haar-random unitaries on $\lvert \psi \rangle$ will in effect randomise the weights of the components of $\lvert \psi \rangle$ over the standard basis. The expected fidelity with any particular standard basis state would then be the same over all standard basis states, i.e. $1/2^n$.
+ +What bounds we can describe on the probability, that the fidelity will will differ much from $1/2^n$ (either in absolute or relative error) — without making any assumptions about the amount of entanglement or any other features of $\lvert \psi \rangle$?
+",124,,55,,7/21/2022 9:45,7/21/2022 9:45,On the distribution of the fidelity of a random product state with an arbitrary many-qubit state,Is it $\theta$ or $\varphi$ as usually depicted on the Bloch sphere? In other words, is it the angle projected on the $xy$-plane or is it the one on a plane that intersects the $z$-axis of the Bloch sphere? How could I have answered this myself?
+ + +",9165,,,,,11/17/2019 19:43,Which angle is estimated by the phase estimation algorithm?,The notation $\lvert \alpha \rangle$, $\lvert \psi \rangle$, etc. just indicates that the thing in question is a vector. Furthermore, it is extremely common that the following things are also intended (in that one really should say if any of these things do not hold):
+ +Such a vector is usually called a state-vector, or sometimes a (pure) state.
+ +The symbol $\lvert \psi \rangle$ in particular, like a bold-face $\mathbf v$ in the context of vector algebra, is often used just as a generic choice of symbol or variable. It does relate to the wave function $\psi$ in Schrödinger's equation, in that the wave function $\psi$ can be interpreted as a state vector in a very large vector space.
+ +The notation of putting $\psi$ in asymmetrical brackets (technically, a ""ket"": one reads $\lvert \psi \rangle$ either as ""psi"" or ""ket-psi"" by convention) is a part of Dirac notation. There is a corresponding dual object $\langle \psi \rvert = \lvert \psi \rangle^\dagger$ called a ""bra"" (we read $\langle \psi \rvert$ as ""bra-psi""), and when you multiply a bra and a ket, you evaluate an inner product (or a ""bracket""): +$$ \bigl( \langle \alpha \rvert \bigr) \bigl( \lvert \psi \rangle \bigr) = \langle \alpha \vert \psi \rangle = \langle \alpha, \psi \rangle.$$ +Thus, you'd often see the normalisation condition on state vectors written as $\langle \psi \vert \psi \rangle = 1$. You will often see people talk about some state vectors $\lvert \alpha \rangle$ and $\lvert \beta \rangle$ being orthogonal: this can be denoted by $\langle \alpha \vert \beta \rangle = 0$.
+ +The symbols $\lvert 0 \rangle$ and $\lvert 1 \rangle$ are a (very frequently occurring) special case. They indicate standard basis vectors, usually of $\mathbb C^2$, which have a 1 in one position and 0 everywhere else, and which are orthogonal to one another: +$$ \lvert 0 \rangle = \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \qquad\lvert 1 \rangle = \begin{bmatrix} 0 \\ 1 \end{bmatrix}. $$ +Elsewhere in mathematics, these might be written instead as $\mathbf e_0$ and $\mathbf e_1$.
+ +It's reasonably common to consider such vectors indexed by other integers, e.g. $\lvert 2 \rangle$, $\lvert 3 \rangle$, etc.: these are then standard basis vectors $\mathbf e_2$, $\mathbf e_3$, etc. in a vector space of dimension greater than 2.
It is also common to see vectors indexed by binary strings, e.g. $\lvert 001 \rangle$: this is a standard basis state of a system consisting of multiple qubits, in this case identified with the Kronecker product $\lvert 0 \rangle \otimes \lvert 0 \rangle \otimes \lvert 1 \rangle = \mathbf e_0 \otimes \mathbf e_0 \otimes \mathbf e_1 =: \mathbf e_{001}$.
It is also common to see vectors indexed by elements of an arbitrary (though usually finite) set, e.g. $\lvert v \rangle$ for a vertex $v$ of some graph $G$. This is just a standard basis vector in some vector space, indexed by (the elements of) the set in question.
More generally, it is very very common to write $\lvert \text{(expression)} \rangle$, where $\text{(expression)}$ is some variable or formula on variables ranging over some set. This just represents a standard basis vector which is being indexed by that expression. For instance, to take an arbitrary example, for $x,y, z\in \mathbb Z_8$, we may write $\lvert z{+} xy \rangle =: \mathbf e_{z{+}xy} $ (a standard basis state of a vector space of dimension eight, indexed by elements of $\mathbb Z_8$), in which case we should understand from context that ""$+$"" is the addition operation in the ring of the integers modulo 8, and ""$xy$"" is the product of $x$ and $y$ in that same number system.
There are more special cases in Dirac notation, which might not be the most sensible notation from a general point of view (they are the equivalent of ""irregular verbs"") but which are in heavy use and which are useful shorthand:
+ +$\lvert + \rangle$ represents the specific state $\tfrac1{\sqrt 2}(\lvert 0 \rangle + \lvert 1 \rangle)$.
$\lvert - \rangle$ represents the specific state $\tfrac1{\sqrt 2}(\lvert 0 \rangle - \lvert 1 \rangle)$.
Generalising the correspondence above with the symbols $+$ or $-$ in the kets, and the idea that you can have expressions in your kets, the symbol $\lvert \pm \rangle$ represents either one (or the set of both) of the two state vectors $\tfrac1{\sqrt 2}(\lvert 0 \rangle \pm \lvert 1 \rangle)$.
Physicists often put arrows in their kets: for example, $\lvert \uparrow \rangle$, $\lvert \downarrow \rangle$, $\lvert \rightarrow \rangle$, +$\lvert \nearrow \rangle$, and others generally refer to spin states or polarisations in physical systems, where the arrow literally refers to some spacial orientation.
In general, you can put pretty much any symbol in a bra or a ket that you like, and it will be immediately understood to refer to some state or functional. Because of the conventions above, this can allow you to quickly import some meaning which the symbols might have in a closely related context. (Though you should choose your notation carefully and explain it if it is not in very common usage.)
+ +Hopefully this clarifies some of what's going on with the notation.
+",124,,124,,11/17/2019 18:33,11/17/2019 18:33,,,,0,,,,CC BY-SA 4.0 +8827,1,,,11/17/2019 19:06,,1,34,"In classical optimization problems, some objective function's surface serves as a landscape for finding its minimum through minimization algorithms.
+ +Instead of your typical U-shaped objective surface (e.g. the squared loss function), consider instead a W-shaped surface, implying two pockets where one pocket must contain the global minimum, while the other only holds a local minimum.
+ +Quantum annealing, in contrast to classical simulated annealing, has an additional ability to evaluate both pockets of the W-shape concurrently, from what I understand based on 'parallel universes' or quantum parallel computation that classical, sequential optimization can't. How much of this ability is due to superposition, entanglement and teleportation?
+ +(It seems to me like superposition and entanglement both contribute to overall parallelizing behavior, but with one being an option reserved for certain applications, outside of, or such as, quantum annealing.)
+ +Could someone also go into detail about the maths/circuitry behind this process, of how quantum annealing is designed to jump between or parallelize the optimizer in two or more different locations of the objective surface at once?
+ +A referral to a Python package that demonstrates quantum annealing would be good too.
+",9118,,26,,11/17/2019 21:23,11/17/2019 21:23,Entanglement and teleportation in quantum annealing and parallel computation,Neither.
+ +Phase estimation algorithm does not estimate a property of a qubit state (and the angles $\theta$ and $\varphi$ in your question are exactly that - a property of a given qubit state).
+ +Rather, it estimates the eigenvalue of a given unitary $U$ that corresponds to the given eigenvector $|\psi\rangle$ - the angle $\alpha$ in the following equation:
+ +$$U|\psi\rangle = e^{2i\pi\alpha}|\psi\rangle$$
+ +Wikipedia article on phase estimation has more details on the algorithm.
+",2879,,,,,11/17/2019 19:43,,,,0,,,,CC BY-SA 4.0 +8829,2,,8814,11/17/2019 20:13,,1,,"Thanks Peter for the clarification about information vs. outcomes. I accept his answer to acknowledge that, and want to add the possible construction of such measurement.
+ +In the same book section 2.2.8, a general method is described. In this case, one can add two qubits prepared as $|00\rangle$, apply a unitary on the three qubits and measure the two ancillary ones to get classic value 0, 1, or 3. Clearly to get 3 outcomes upon measurements, we do need at least two qubits to be measured. However, we already know the two ancillary ones, the measurements do not give new information about the ancillary ones.
+",8321,,,,,11/17/2019 20:13,,,,0,,,,CC BY-SA 4.0 +8830,1,8831,,11/17/2019 20:53,,6,988,"Superdense encoding allows us to transmit the information of two classical bits using a single qubit with a pre-shared Bell state qubit pair. We can duplicate the construct to transmit $2n$ classical bits using $n$ qubits. My question is: can we do better by using fewer qubits by leveraging multiqubit entanglement?
+ +Superdense coding applies $I, X, Z, XZ$ operator on a single qubit to get $4$ different outcomes. For $n$ qubits, if we can only apply these four operators on individual qubits, then $4^n$ combinations are possible. Given $4^n=2^{2n}$, one can only get information of $2n$ classical bits. I know it's a big ""if"". Is that assumption correct since Pauli group forms a basis for all operators?
+ +Sorry I am a beginner in this subject and am not clear about many concepts yet. Also apologize if the answer is already embedded in some earlier thread. Thanks.
+",8321,,55,,11/18/2019 10:16,11/18/2019 10:16,Can superdense coding be made more efficient?,No, you can't send more than 2 bits per transmitted qubit. Ultradense Coding would allow FTL Signalling.
+ +The basic problem is that, if either teleportation or superdense coding was slightly more efficient, iteratively nesting them inside of each other would allow you to send more encoded qubits than the number of physical qubits you sent. Suppose you could ultradense code 3 bits into 1 sent qubit. Send 2 ultradense qubits, equivalent to 6 bits, but use those 6 bits to power teleportation of 3 qubits, which are actually ultradense coding 9 bits, which are teleporting 4 qubits, which are coding 12 bits, which are teleporting 6 qubits, which are coding 18 bits, teleporting 9 qubits, coding 27 bits, teleporting 13 qubits, coding 39 bits, ... you get the idea.
+ +Throw an error detecting code on top, and the receiver can just guess at the initial teleportation bits and see if it worked. This would presumably allow them to receive the message before you even send it, which is clearly a problem.
+",119,,,,,11/17/2019 22:14,,,,1,,,,CC BY-SA 4.0 +8832,1,8835,,11/18/2019 1:01,,8,419,"This is a follow-up question to a previous question I had, where the correct answer was to use the Kronecker product.
+Given, for example, a vector representing two qubits $$\begin{bmatrix}0 \\ 1 \\ 0 \\ 0\end{bmatrix}$$ is there an algorithm to decompose it into two vectors $$\begin{bmatrix}1 \\ 0\end{bmatrix}$$ and $$\begin{bmatrix} 0 \\ 1\end{bmatrix}$$
+If so, does this generalize to N qubits? I suspect the procedure doesn't scale well computationally (hence the entire point of quantum computing) but I'm still curious to know whether and what form the algorithm may take.
+",5289,,2927,,11/3/2021 1:25,11/3/2021 1:25,How to efficiently calculate the inverse of a Kronecker product?,Say I have some qubit $|q\rangle = \alpha |0\rangle + \beta |1\rangle$. If I apply some unitary $U$, I get $U |q\rangle$; great. I can also think of $U$ as a change-of-basis matrix that maps the $|0\rangle, |1\rangle$ basis to the $U|0\rangle, U|1\rangle$ basis. If I just decide to measure the original $|q\rangle$ in that new basis, then all of my very limited knowledge about all of this would lead me to believe I get $U|q\rangle$. So is there any actual difference between the two situations? This seems like a well-known or obvious thing but I really don't know.
+",9168,,,,,11/18/2019 5:54,Difference between unitary transformations and measurement,Application of a unitary transformation $U$ on a state $|q\rangle$ really leads to a new state $U|q\rangle$. What you get after a measurement is a one particular outcome of $U|q\rangle$ state because the measurement leads to colapse of the state wave function.
+ +If you repeat measurement many times you will get probability distribution of possible outcomes of the quantum state.
+ +Another difference is a reversability. While transformation of the quantum state is always reversible because the unitary matrix can be always inverted, the measurement is irreversible because of the wave function colapse. To reconstruct the quantum state you need to do many measurements of same state in different basis and employ so-called quantum tomography.
+",9006,,,,,11/18/2019 5:54,,,,3,,,,CC BY-SA 4.0 +8835,2,,8832,11/18/2019 7:22,,7,,"You specifically ask about qubits, so I'll keep it to that. Imagine you have a state +$$ +|\psi\rangle=\sum_{x\in\{0,1\}^n}a_x|x\rangle. +$$ +You can choose to look at each qubit. I'll take the first qubit for the sake of simplicity. We have that +$$ +|\psi\rangle=|0\rangle\sum_{y\in\{0,1\}^{n-1}}a_{0y}|y\rangle+|1\rangle\sum_{y\in\{0,1\}^{n-1}}a_{1y}|y\rangle +$$ +which we can equally well think of as +$$ +|\psi\rangle=c_0|0\rangle|\phi_0\rangle+c_1|1\rangle|\phi_1\rangle, +$$ +where $\langle\phi_0|\phi_0\rangle=\langle\phi_1|\phi_1\rangle=1$. If it happens that $\langle\phi_0|\phi_1\rangle=e^{i\gamma}$, then this is the same as +$$ +|\psi\rangle=(c_0|0\rangle+c_1e^{i\gamma}|1\rangle)|\phi_0\rangle, +$$ +which is now in its separable form, as desired. You keep repeating this qubit-by-qubit. Of course, as the number of qubits, $N$, increases, you're dealing with exponentially many coefficients, so the calculation is not efficient, although it is procedurally straightforward.
+ +In terms of actually performing the computation, it may be easier to rely on the partial trace, which is built in to many packages. You'd calculate, for example, +$$ +\rho_1=\text{Tr}_{2,3,\ldots N}|\psi\rangle\langle\psi|, +$$ +the reduced density matrix on the first qubit. If $\text{Tr}\rho_1^2=1$, then this state is separable. Moreover, $\rho_1$ is a rank 1 projector, and the state that it projects onto is the separable decomposition of that qubit.
+",1837,,1837,,11/19/2019 17:06,11/19/2019 17:06,,,,1,,,,CC BY-SA 4.0 +8836,1,8838,,11/18/2019 11:37,,1,214,"I have the following code, which runs properly.
+ +from qiskit import *
+from qiskit.converters import *
+
+ghz2 = QuantumCircuit(5, 5)
+ghz2.h(2)
+ghz2.cx(2, 1)
+ghz2.cx(1, 0)
+ghz2.cx(2, 3)
+ghz2.cx(3, 4)
+
+
+ghz_dag = circuit_to_dag(ghz2)
+
+
+How do I access properties of this dag? For instance, I would like to get all the 2-qubit gates using the collect 2qubit gates method (the output is supposed to be a dictionary) or simply draw the DAG but again, dag_drawer(ghz_dag) throws up an error ('MultiDiGraph' object has no attribute 'number_of_selfloops'
) even though, that's done in an example here.
Maybe this is just a Python usage question but how does one access the properties of the DAG?
+",4831,,26,,11/18/2019 12:17,11/18/2019 14:23,How does one get the attributes of a circuit from its DAG in qiskit?,I am new to quantum computing and I wanted to do a project for one of my classes where I study a specific algorithm from the field and then insert parallelism in it so it can be executed more efficiently on a cluster i.e., high-performance computing (HPC) system.
+ +I would appreciate any suggestions which algorithm should I pursue to implement, as well as any resources available to study its background. Thanks in advance!
+",9174,,26,,11/18/2019 15:11,11/25/2019 7:10,Which algorithm in quantum computing can be implemented for a HPC system?,Properties of the DAG are simply accessed using dot notation. For example, if you would like to get all the two qubit gates you would do dag.twoQ_gates()
which returns a list of the two qubit gates present in the dag.
The code you have linked to is a transpiler pass. This is a method that looks over the dag to identify some property or to perform some optimization. It stores variables to the property set, self.property_set
. There is more information about using the transpiler here.
I'm a Politecnico di Torino student currently enrolled - and close to graduate - in Electronics and Communications engineering. As such, I know the basics of analog electronics, digital electronics, signal processing and of course anything that has to do with communications, especially TCP/IP on all levels, even physical. I like the theory of information and signal modulation, and I also like higher levels in TCP/IP, knowing some basic algorithms and protocols; I'm not new to this. Furthermore, I hate analyzing analog circuits, but I love digital electronics and LTI systems theory (including discrete analysis like Z-transform of signals, FFT, etc). Along with this, I have a strong personal background on operating systems and programming (mainly C/C++; but I also have a big experience in higher-level languages). My initial thought was to engage with embedded systems as my MSc, in order to strengthen my knowledge in OSes (since I'm not used to real-time ones) and find a mix between my hobby, programming, and something that has to do with telecommunications, signal analysis, or anyways low-level computer stuff (for example, I love memory management and CPU arch, and I'd love to learn more about them). So, why not, this sounds like a good mix.
+ +However, I've recently discovered that one of our free-choice exams includes, weirdly, an introduction to Quantum Information, Quantum Computing, and Teleportation at the Bachelor's level. I was selected for this and I will start the lectures next semester. I still have no idea how the whole thing works, but the concept of quantum computing seems extremely interesting to me, right now. In case I end up loving this course, I think I'd be wanting to do something about quantum computing in my future Ph.D. program if I ever get to get into one. +At this point, I got some choices:
+ +MSc in Computer/Electronic Engineering with Embedded Systems path - I think this would be good especially for getting to know into details how these systems work on a low level, how classical architectures work before heading to a hypothetical quantum computing background
MSc in Physics of Complex Systems - this one is very interesting because it provides a lot of statistical inference, statistical quantum mechanics, and some quantum information theory backgrounds
MSc in Computer Engineering, Cyber Security path - this one could be interesting if I want to operate with the security of quantum systems - I saw that, in telecommunications, there is something called a ""quantum key sharing""; I'm not sure what it is, but sounds cool.
Do these courses make sense? In case they do, which one could be the best? I'm very interested in computer architecture and in telecommunications, and also in reverse engineering memory management, and data structures. One thing I absolutely love is working with bits, especially when it's about manipulating memory or also bitmasks, and I also am amazed and very interested in probability when it's applied to signals (power spectral densities and that stuff), and in general statistical inference. I hate purely analog circuits analysis because, to me, they have lots of inconsistencies and I'm not good at re-modeling circuits from different points of view, let alone all the awful approximations that are often taken for granted in these courses. I also love physics, especially electromagnetism, and stochastic processes-based physical theories, so Physics of Complex Systems could be interesting.
+ +What do you think? Do any of these make sense? +I could also switch university, but quantum computing courses at MSc level are extremely rare and they're usually found in mostly Physics and Technology courses, and furthermore, it would be a great problem with funding, but I suppose I could make some more sacrifices.
+ +I am really sorry for my long post and I hope this is the right subsite, and I hope this wasn't already asked (couldn't really think anything about it, especially with these courses). For any suggestions, thank you in advance! I would really appreciate any tips. Have a good day!
+",8999,,26,,11/18/2019 15:50,11/18/2019 15:50,Could any of these university courses be a good MSc for a quantum computing future job/research?,$\newcommand{\on}[1]{{\operatorname{#1}}}$The basic answer is to just write, for a given bipartite state $X$, $\Phi(X)\equiv\operatorname{Tr}_B(X)$. This defines a quantum channel which acts on the input as a partial trace. You can check that this does indeed qualify as a quantum channel etc.
+A misconception that might have led you to ask this question can be found in your saying that "I have no idea how to define a quantum channel with the partial trace because partial trace depends on an index $i$ (i.e. $i$ of $\operatorname{Tr}_i(\rho)$). Intuitively, the index $i$ is random, but then I don't know how to define a map that represents the partial trace. This is wrong. The index used to denote the partial trace represents which space is being traced out. It is not "random", but rather is something that has to be decided when the operation is defined. For example, for a bipartite system, you can always define the partial trace with respect to either of the two subspace, thus getting two different, if related, maps.
+Another way to interpret the question is: "What does the partial trace map look like in one of the common quantum channel representations?".
+A note on notation: I'll use here Einstein's summation notation (though using only lower indices) for repeated indices, as well as numbers instead of letters to represent indices. This is because I believe it makes it easier to see the structure of some expressions. Furthermore, I will sometimes use primed indices when an index represents an element in a dual vector space (i.e. it corresponds to a bra). For example, I'll write the matrix elements of a density matrix $\rho$ as $\rho_{11'}$. For a bipartite state $\sigma$, I will write $\sigma=\sigma_{12,1'2'}|1\rangle\!\langle 1'|\otimes|2\rangle\!\langle2'|$, where "$1$" and "$2$" correspond to kets in first and second space, while "$1',2'$" correspond to bras in the same spaces. +Whenever suitable, I will include both the expression in operatorial form and the explicit base-dependent one with indices. +
+(Natural representation in general) Given an arbitrary channel $\Phi$, denote with $K(\Phi)$ its natural representation. You can think of this as the linear map that acts on states via their vectorisations. Fixing a canonical basis, we can write $K(\Phi)$ explicitly through its matrix components as +$$K(\Phi)\on{vec}(X) = \on{vec}(\Phi(X)), \qquad +[\Phi(X)]_{11'}=K(\Phi)_{11',22'}X_{22'}.$$ +One thing to notice at this point is that what the "$1$" and "$2$" indices represent does not really matter at this point. If $X$ is bipartite, then "$2$" is an index denoting an element of a bipartite space, and so it might be written as something like $2=(2_1 2_2)$, or directly $2\sim 23$, as I will do in the following. However, the natural representation is still possible, regardless of what the input and output spaces actually are.
+(Natural representation of partial trace) In the case of $\Phi=\on{Tr}_B$ (where $B$ denotes here the second space), the input $X$ has a bipartite structure, and so we can write its matrix elements as $X_{12,1'2'}$, while the output does not have a tensor product structure (or at least we are not considering this structure here). +We can then write the action of the partial trace in the natural representation as +$$[\operatorname{Tr}_B(X)]_{11'}=K(\operatorname{Tr}_B)_{11',232'3'}X_{232'3'}.$$ +From the definition of partial trace, we know that +$[\operatorname{Tr}_B(X)]_{11'}= +\sum_\alpha X_{1\alpha1' \alpha}\equiv X_{1\alpha 1'\alpha}.$ +For the two expressions to be consistent, you then need the partial trace to have the following natural representation: +$$ + K(\on{Tr}_B)_{11',232'3'} = \delta_{12}\delta_{1'2'}\delta_{33'}. \tag A +$$
+(Alternative expression) +We can get an expression with less floating indices by reasoning directly in terms of the operatorial relations: as pointed out before, we must have +$K(\on{Tr}_B)\on{vec}(X) = \on{vec}(\on{Tr}_B(X))$. But we can also observe that +$$\on{vec}(\on{Tr}_B(X)) += \sum_{i,j,\alpha} |i,j\rangle X_{i\alpha,j\alpha} += \left(\sum_\alpha I\otimes\langle \alpha|\otimes I\otimes\langle \alpha|\right)\on{vec}(X),$$ +and thus +$$K(\on{Tr}_B) = \sum_\alpha (I\otimes\langle \alpha|\otimes I\otimes\langle \alpha|)$$
+(Natural vs Kraus representation) Write the Kraus decomposition of $\Phi$ as +$\Phi(X)=\sum_a A_a X A_a^\dagger \equiv A_a X A_a^\dagger.$ +I will use "$a$" to index the Kraus operators, to distinguish the associated "auxiliary space" from indices denoting Hilbert space components. I will also not give any meaning to whether an index is raised or not (i.e. $A_a\equiv A^a$), as the meaning of the indices will be obvious from the context. +The relation between this and the natural representation (again using non-bipartite notation for now) is +$$ +K(\Phi) = \sum_a A_a\otimes \bar A_a, \qquad +K(\Phi)_{11',22'}=A^a_{12} \bar A^a_{1'2'}.$$ +In the case of the partial trace, the input space (the index "$2$" here) has a bipartite structure while the output one doesn't, so the components of the $A_a$ operators are written as $A^a_{1,23}$ etc.
+(Kraus repr of partial trace) Using the previous result about the natural representation of the partial trace, we can write +$$\delta_{12}\delta_{1'2'}\delta_{33'}=A^a_{1,23}\bar A^a_{1',2'3'},$$ +which means that $A^a_{1,23}=\delta_{12}B^a_3$ for some object $B$ such that +$$B^a_3 \bar B^a_{3'}=\delta_{33'}.\tag{Y}$$ +There are many equivalent choices for such an object. What we can observe is that (Y) can be understood as the orthonormality relation between a set of vectors, where "$3$" indexes the vectors and "$a$" is used for the components. This means that for (Y) to be possible, the auxiliary space in which the "$a$" indices live must have dimension greater than or equal to the dimension of the space of the index "$3$" (because you cannot have $n$ orthogonal vectors in a space of dimension $< n$). +We can then take the dimensions to be equal, which makes $B$ a unitary operator with respect to its two indices. Because unitary matrices are all and only those whose rows (columns) form an orthonormal system for the space, and can freely choose which basis to use, the easier choice is to use the computational basis, which means that $B^a_3=\delta_{a3}$. +It is trivial to check that this choice satisfies (Y), and therefore produces the correct Kraus operators. +We conclude that the most natural (or a natural choice) for the Kraus operators of the partial trace is +$$ +A_a = I\otimes\langle a|, + \qquad +A^a_{1,23} = \delta_{12}\delta_{a3}.$$
+This is straightforward from our analysis of the natural representation. +Indeed, the Choi operator $J(\Phi)$ as the same matrix components as the natural representation $K(\Phi)$, up to some rearrangement. More specifically, +$$J(\Phi)_{12,1'2'} = K(\Phi)_{11',22'}.$$ +It then follows from (A) that +$$J(\Phi)_{123,1'2'3'} = \delta_{12}\delta_{1'2'}\delta_{33'}.$$ +Equivalently, as an operator, this reads +$$J(\Phi) = |m\rangle\!\langle m|\otimes I,$$ +where $|m\rangle\equiv \sum_i|i,i\rangle\!\langle i,i|$ is the maximally entangled state (modulo normalisation).
+If you want to then represent this operator as a matrix, in the simplest case of all spaces being two-dimensional, you find a matrix that is the same as the density matrix of the Bell state $|00\rangle+|11\rangle$, upon replacing $1$ with the two-dimensional identity, and $0$ with the $2\times2$ zero matrix. More explicitly: +$$ +\left( +\begin{array}{cccccccc} + 1 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ + 0 & 1 & 0 & 0 & 0 & 0 & 0 & 1 \\ + 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ + 1 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ + 0 & 1 & 0 & 0 & 0 & 0 & 0 & 1 \\ +\end{array} +\right). +$$
+The fact that the $J(\Phi)$ is a square matrix while $K(\Phi)$ isn't is not a coincidence. The Choi is a square matrix for any map $\Phi$, while the natural representation is only square when input and output spaces have the same dimensions.
+The Mathematica code to generate the above matrix is the following:
+SparseArray[{{i_, j_} :> 1 /; With[
+ {iList = IntegerDigits[i - 1, 2, 3],
+ jList = IntegerDigits[j - 1, 2, 3]},
+ And[
+ iList[[1]] == iList[[2]],
+ jList[[1]] == jList[[2]],
+ iList[[3]] == jList[[3]]
+ ]]}, {8, 8}] // Normal // TeXForm
+
+",55,,55,,5/17/2021 9:08,5/17/2021 9:08,,,,0,,,,CC BY-SA 4.0
+8842,2,,8818,11/18/2019 20:46,,3,,"The algorithm Ewin Tang originally examined and dequantized was the quantum recommendation system algorithm by Kerenidis & Prakash.
+ +Many QML algorithms, including the quantum recommendation system algorithm, exploit the quantum linear systems algorithm (QLSA), which was posted on arXiv in 2008 by Harrow, Hassidim, and Lloyd (that's why it's also sometimes known as the HHL algorithm). The QLSA algorithm solves a quantum linear system of equations (i.e. the input is quantum information) via matrix inversion. Formally, given a matrix $\mathbf{A} \in \mathbb{R}^{N \times N}$ and a vector $\vec{b} \in \mathbb{R}^N$, the task is to solve for $\vec{x} \in \mathbb{R}^N$ in the system $\mathbf{A} \vec{x}=\vec{b}$. Note that the original QLSA didn't include a data loading or measurement procedure (important when considering its complexity).
+ +The QLSA outputs a solution with complexity $O(d^4\kappa^2\log N/\epsilon)$, where $d$ is the density of $\mathbf{A}$, $\kappa$ is the magnitude of the ratio of the largest to smallest eigenvalues of the matrix (i.e. $\kappa = \vert\lambda_{\max}/\lambda_{\min}\vert$), and $\epsilon$ is the precision.
+ +Focusing on $d$ and $\kappa$, we can define them in layman's terms as:
+ +Over the years, several improvements have been made to the QLSA – so this complexity can be considered higher than what is theoretically possible.
+ +First off, we typically talk about the dimensionality of a data matrix in terms of its columns – that is, an $m\times n$ matrix would be high dimensional $n \gg m$, where $m$ is the number of rows (samples) and $n$ is the number of columns (features). You could think of this in the context of the QLSA where $\mathbf{A}$ is the data matrix for a linear regression.
+ +I'd argue that Tang is making a general statement about algorithmic complexity. Specifically, that you need a large input (matrix) to get a meaningful speedup up, just given the complexity of the algorithm and a comparable classical approach like Gaussian elimination (which is $O(N^3)$) or one of Tang's dequantized (classical) algorithms, which (as I understand them) end up having polynomial complexity, though the polynomials are of quite high order(s) on some term(s).
+ +That said, another point is that given the polynomial terms $d$ and $\kappa$ and the $\log N / \epsilon$, if $N$ is relatively small and $d$ and $\kappa$ are large, the latter are going to have a greater influence on the complexity.
+",1937,,1937,,11/18/2019 23:59,11/18/2019 23:59,,,,2,,,,CC BY-SA 4.0 +8843,1,,,11/19/2019 0:28,,3,513,"I’m trying to get a Quantum Fourier Transform working with the rest of a compiled version of Shor’s algorithm, attempting to factor $N=21$. +In the following image, there’s an initialization phase (before the first vertical line), then a compiled version of modular exponentiation with base 4 up to the second vertical line (based on 1, figure 5), followed by QFT. The output of modular exponentiation seems correct (the output of that module matches the truth table in 1 (table V), which gives $f(4, 21, x) = 4^x \bmod 21)$.
+ +However, the output of QFT gives a pretty much flat distribution over [q3…q7]
. This is slightly involved, but I’d appreciate any tips over where I may be going wrong. Happy to provide my code, etc.
+
+
1 Simplified Factoring Algorithms for Validating Small-Scale Quantum Information Processing Technologies, Gamel & James, 2013, https://arxiv.org/abs/1310.6446v2 (edited)
+",9180,,26,,11/19/2019 13:20,8/19/2021 17:45,Implementing QFT for Shor's Algorithm,from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit
+from qiskit.tools.visualization import matplotlib_circuit_drawer as drawer
+from qiskit import Aer
+from qiskit import execute
+import numpy as np
+%matplotlib inline
+
+
+This is the code cell that I am trying to implement. The error is in the second line.
+ +Error--> ImportError: cannot import name 'matplotlib_circuit_drawer'
+
+
+I'm using Google Colab to execute the code. How to solve this?
+",8330,,26,,11/19/2019 13:18,11/19/2019 13:18,ImportError: cannot import name 'matplotlib_circuit_drawer',qiskit.tools.visualization
has been moved to qiskit.visualization
and matplotlib_circuit_drawer
has been removed. Instead of using it, try using qiskit.visualization.circuit_drawer()
with the appropriate arguments.
So in this case it should be qiskit.visualization.circuit_drawer(my_circuit, output='mpl', filename='my_circuit.png')
Consider an arbitrary vector $\boldsymbol v\equiv(v_i)_{i=1}^N\in\mathbb C^{nm}$ of length $n m$ (if you care only about qubits, just fix $n=m=2$).
+ +For $\boldsymbol v$ to have an $(n,m)$ partition means that we can write it as $\boldsymbol v=\boldsymbol u\otimes \boldsymbol w$ for some $\boldsymbol u\in\mathbb C^n$ and $\boldsymbol w\in\mathbb C^m$. +If this is the case, then the components of $\boldsymbol v$ must be related to those of $\boldsymbol u,\boldsymbol w$ via +$$v_{ij}=u_i w_j. \tag A$$ +The first thing to notice is that the tensor product operation $(\boldsymbol u,\boldsymbol w)\mapsto\boldsymbol v$ is not injective. In particular, for any $\lambda\in\mathbb C$ we have $(\lambda \boldsymbol u)\otimes \boldsymbol w=\boldsymbol u\otimes(\lambda \boldsymbol w)$, and thus given a separable $\boldsymbol v$ we can only recover its ""reduced vectors"" up to their individual norms and phase factors. + +Because we are interested in quantum states, this means that we don't need to worry about neither the normalisation nor the phase of the vectors $\boldsymbol u,\boldsymbol w$.
+ +A remarkable property of (A) is that, for any pair of indices $j\neq j'$ and $i$, we have $v_{ij}/v_{ij'}=w_j/w_{j'}$, where, you might notice, the $i$ index does not appear on the right-hand side.
+ +This property characterises separable vectors: check that $v_{ij}/v_{ij'}$ does not depend on $i$ for all $j,j'$, and if so, define $w_i\equiv v_{i1}/v_{ij}$, where we are using the fact that $\boldsymbol w$ is defined up to normalisation to assume $w_1=1$ (when some of the elements $v_{ij}$ we might not be able to assume this, but those cases are usually trivial to handle separately). +Once you have $\boldsymbol w$, you can find $u_i$ by simply computing $v_{ij}/w_j$.
+ +For example, if $\boldsymbol v=(1,1,2,2)^T$, then +$$v_{11}=v_{12}=1, \qquad v_{21}=v_{22}=2,$$ +and thus $v_{12}/v_{11}=v_{22}/v_{21}=1$. You can thus define $\boldsymbol w=(1,1)$. You then compute $u_1=v_{11}/w_1=1$ and $u_2=v_{21}/w_1=2$, which tells you that $\boldsymbol u=(1,2)$.
+ +For example, if $\boldsymbol v=(0,1,0,0)^T$ and $n=m=2$, then by definition +$$v_{11}=v_{21}=v_{22}=0 \qquad\text{and}\qquad v_{12}=1.$$ +Because $v_{11}=0$, we cannot use directly the procedure above, but the fact that $v_{2j}=0$ for all $j$ tells you immediately that $\boldsymbol u=(1,0)$, and then finding $\boldsymbol v$ is easy.
+ +As for how numerically efficient this particular method is, I'm not so sure. The main problem is that all these divisions will be prone to numerical instability for small values of the amplitudes. Methods that are based on computing entropies might work better, but I'm not sure.
+",55,,,,,11/19/2019 8:52,,,,0,,,,CC BY-SA 4.0 +8847,2,,8808,11/19/2019 9:35,,1,,"In general, you cannot distinguish between the two. Both classical and quantum mechanics can produce arbitrary probability distributions, so there simply isn't enough information to distinguish between the two if that's all you have access to.
+ +A setting in which observable differences can be observed is when locality is taken into account. If the probability distribution is obtained by spatially separated parties interacting with two parts of an entangled system, then the produced correlations in the observed statistics can be measurably incompatible with classical mechanics (see Bell's inequalities and such).
+",55,,,,,11/19/2019 9:35,,,,3,,,,CC BY-SA 4.0 +8848,2,,8817,11/19/2019 9:44,,1,,"Qubits are the quantum states that carry the smallest amount of ""quantum information"": the simplest possible quantum states you can imagine. They are pervasive for this reason, just like bits in classical physics are pervasive because they are the basic unit of information. We use bits all the times simply because we find it convenient to build things (e.g. coputers) in such a way that we can model their behaviour in terms of bits. Underlying the simplified models, physical reality is much more complex than that though: inside your computers that are transistors carrying ""continuous"" amounts of currents and voltages, and describing the whole thing in terms of bits is only an extremely useful way to simplify how the whole thing works.
+ +One caveat is that there is a sense in which ""qubits"" are more natural in quantum mechanics than ""bits"" are in classical physics. Indeed, elementary particles often have intrinsic degrees of freedom that seem to be genuine two-dimensional systems (qubits). There isn't anything like this in classical physics that I know of. But then again, one could argue that even talking about elementary particles in quantum mechanics is only a ""simplified model useful for descriptions"".
+",55,,,,,11/19/2019 9:44,,,,0,,,,CC BY-SA 4.0 +8849,1,8851,,11/19/2019 9:51,,16,3595,"When explaining a quantum algorithm, many revert to 'circuit-speak' by drawing a diagram of how qubits split off into transformations and measurements, however, rarely if not never would someone explaining a classical math algorithm revert to its representation in binary circuits. I would understand that this is because transforms and such don't exist in the binary world, but:
+ +Doesn't this unnecessary focus on the computational details relating to computing-computing, rather than the mathematical/statistical/optimization problem that the circuitry merely only underlies, detract from the main problem/application at hand? Is the classical mindset just that intuitive and aligned to general human thought, that quantum circuits, on the other hand, will remain to be a standard explanation strategy?
+",9118,,26,,11/19/2019 12:33,2/11/2022 8:43,"Quantum circuits explain algorithms, why didn't classical circuits?",I found some examples of implementing the oracle when the marked state is $|000\rangle$. +But how can we know what gate we should use inside of the oracle?
+ + + +Besides, for the part implementation, the example shows like this:
+ + + +Mathematically, it should be $2|0\rangle\langle 0|-I$, but how can it be realized by X gates and controlled-Z gate?
+",9105,,26,,11/19/2019 13:17,1/12/2023 2:08,"In Grover, how to implement oracle and amplification using Qiskit?",You might find this analogy helpful: the development of quantum algorithms is still in the Booth's multiplication algorithm stage; we haven't quite reached dynamic programming or backtracking. You'll find that most textbooks explain the Booth's algorithm using the following circuit.
+ + + +That is in fact, the method in which the multiplication logic is implemented in most modern processors (with some minor modifications depending on the version). However, this kind of representation quickly becomes tedious when you move to on algorithmic techniques like looping and recursion which may involve multiple multiplication and division steps, among others. It would be crazy for textbooks to explain more advanced algorithms using hardware-level implementations like this. Not to mention that the basic hardware circuitries vary with the processor. If you've ever done assembly language programming this should resonate.
+ +Classical algorithm textbooks like the CLRS evade this problem by framing the algorithms without any particular processor in mind. The basic algorithmic procedures like addition, multiplication, looping, etc. are all considered as black boxes. If you're interested to see the processor-specific implementation of a CLRS algorithm you could certainly write it up in some high-level language like C and then convert it to assembly. Fortunately, compilers do that tedious conversion on our behalf!
+ +Now the interesting part is that the basic building blocks of quantum algorithms are not addition or multiplication as such, but rather operations like Fourier transform and amplitude amplification. Quantum algorithms are largely framed in terms of these basic transformations that are very easy to visualize using quantum circuits (at least, if we're using the gate model). It's really much more about convenience and much less about intuition.
+ +Rest assured that if a textbook ever states a generalized quantum equivalent of the Dijkstra's algorithm it wouldn't be showing you all the gates required to implement it, but rather in terms of the elementary quantum operations whose hardware implementations would largely vary depending on the quantum processor you're using. The bottom line is that we're still in the assembly language stage of quantum computing.
+",26,,9399,,12/7/2019 14:59,12/7/2019 14:59,,,,7,,,,CC BY-SA 4.0 +8852,2,,8849,11/19/2019 14:15,,8,,"The state of quantum computing technology is still in its infancy, so implementation details are generally important when considering quantum algorithms. Number of gates, number of operations, types of gates (e.g. Clifford vs. non-Clifford) are often necessary information to evaluate the feasibility and value of a quantum algorithm.
+ +In many cases quantum algorithms are still being optimized, and there are often competing approaches with different trade-offs being considered and iterated. As a result, even publications describing very complex algorithms often include circuit diagrams implementing novel functions to improve efficiency (e.g. Fig. 1: controlled SELECT).
+ +The quantum circuit model is also one of the more intuitive ways to depict quantum computations. Quantum circuits are a restricted form of tensor networks (see e.g. here), which are often used more broadly in both physics and classical computing (particularly in machine learning).
+ +Microsoft seems to be one of the leaders in terms of developing the level of abstraction of quantum computation that you seem to be referring to, embodied in Q#. However, effective abstraction is not always straightforward or necessarily more intuitive (see e.g. here).
+",8623,,8623,,11/19/2019 14:52,11/19/2019 14:52,,,,0,,,,CC BY-SA 4.0 +8853,2,,8715,11/19/2019 15:35,,1,,"This is my attempt. Let's say the list looks like:
+ +$\lambda_1$, $\lambda_2$, $\lambda_1$, $\lambda_3$, $\dots$, $\lambda_n$
+ +where $\lambda_i$ are numbers. The variables (unknowns) are the Hamiltonian and the energy eigenvectors
+ +We start with the following tricks:
+ +The qubit is able to take on multiple states at once, unlike the bit. This property I know is superposition, but is this property perpetual (always on) or optional (controlled to be on or off only when needed by an algorithm, such that when not needed, the qubit reverts to, or takes on the disguise of, a bit)?
+ +and how does perpetual/optional superposition play into the notion of quantum parallelism: Does the qubit always execute parallel computations and incapable of a uni-sequential workflow, or can it be controlled to execute tasks in parallel only when the algorithm deems it necessary?
+ +Essentially, what is the difference or connection between superposition and quantum parallelism and are these properties always active in a quantum algorithm?
+ +(optional: Circuit diagrams that demonstrate example comparisons of ""superposition/parallelism on"" and ""superposition/parallelism off"" can be included as long as each item (line, gate and symbol) is annotated as a bullet point list.)
+",9118,,9118,,11/19/2019 18:46,11/19/2019 22:57,Can quantum parallelism be turned on and off?,In classical computing, both circuit diagrams and pseudo-code are used to explain algorithms. The choice between circuits and pseudo-code depends on the context. If the goal is to explain a highly optimized implementation of an algorithm on FPGA, a circuit diagram is probably more suitable. For example, see this paper on AES implementation on FPGA. Pedagogical explanation of AES uses pseudo-code.
+ +Similarly in quantum computing, if one wants to explain a highly optimized implementation of a modular adder, they resort to showing circuit diagrams. Papers focused on more high-level quantum algorithms frequently contain no quantum circuit diagrams and use pseudo-code instead. A good example of such a paper is Quantum algorithm for linear systems of equations. If you look through papers referenced at Quantum Algorithm Zoo, you will find many that have no circuit diagrams in them.
+ +It seems that many people get the impression that 'circuit-speak' is so common because quantum computing is taught from the ground up. Quantum circuits are one of the first concepts many get exposed to when learning quantum computing.
+",5445,,,,,11/19/2019 19:14,,,,0,,,,CC BY-SA 4.0 +8856,2,,8854,11/19/2019 19:49,,2,,"'Quantum parallelism' is a common misconception - sure, the quantum computer does compute in a 'parallel' fashion, but really the power of quantum computing emerges from constructive / destructive interference.
+ +If you wanted, you could absolutely make a quantum computer behave in a classical format: constantly measure the qubits and correct if necessary. For example, if you had a qubit in $\frac{1}{\sqrt{2}} (|0\rangle + | 1 \rangle) $ and desired a classical bit of $|0\rangle$, you can measure, and apply $X$ if the qubit measured resolves to a $|1 \rangle$.
+",8343,,9006,,11/19/2019 22:57,11/19/2019 22:57,,,,2,,,,CC BY-SA 4.0 +8857,2,,5073,11/19/2019 22:11,,4,,"This feature is now available using the snapshot
function of Qiskit Aer. Snapshots can be added to the circuit and the values are then returned in the results object.
This is an example of how you can create a circuit, add a snapshot to it and then get the result:
+ + + +from qiskit import *
+
+qc = QuantumCircuit(2)
+qc.h(0)
+qc.snapshot('1') # add a snapshot with the key '1'
+qc.h(0) # add more gates after the snapshot
+
+backend = Aer.get_backend('statevector_simulator')
+result = execute(qc, backend).result()
+snapshots = result.data()['snapshots']['statevector']
+
+
+snapshots
now contains a dictionary where the keys are the names given to the snapshots, and the values are an array of state vectors associated with that key.
In this example it is{'1': [[[0.7071067811865476, 0.0], [0.7071067811865475, 0.0], [0.0, 0.0], [0.0, 0.0]]]}
.
This is going to look like homework because it is from a self-inflected Coursera course. I have already found the answer by trial and error but I want to clear my logic. (Coz I'm not getting sleep otherwise and I can't ask the question in Coursera without revealing too much and ruining the quiz for others.)
+ + + +Instead of doing the long math here I used the online calculator: here’s a link:
+ + + +Once again online calculator to help : Link:
+ +The result comes out as 3/4 but the expected answer is set as 1/2. +Can anyone help? I might be missing something very simple.
+ +The complete solution:
+ +$$\begin{aligned}|\phi| = {(1+ \sqrt{3}i) \over 4\sqrt{2}}(|+\rangle +|-\rangle)|0\rangle+{(1- \sqrt{3}i)\over 4\sqrt{2}}(|+\rangle + |-\rangle)|1\rangle \\ + {(1- \sqrt{3}i) \over 4\sqrt{2}}(|+\rangle-|-\rangle)|0\rangle+{(1+ \sqrt{3}i) \over 4\sqrt{2}}(|+\rangle - |-\rangle)|1\rangle\end{aligned}$$
+ +By dropping the $|+\rangle$ combinations we are left with
+ +$$\begin{aligned}|\phi| = {(1+ \sqrt{3}i) \over 4\sqrt{2}}|-\rangle|0\rangle-{(1- \sqrt{3}i) \over 4\sqrt{2}}\rangle|1\rangle+{(1- \sqrt{3}i) \over 4\sqrt{2}}|-\rangle|0\rangle-{(1+ \sqrt{3}i) \over 4\sqrt{2}}|-\rangle|1\rangle\end{aligned}$$
+ +This is where I was wrong to not solve it even further.
+ +$$|\phi| = ({(1+ \sqrt{3}i) \over 4\sqrt{2}}-{(1- \sqrt{3}i) \over 4\sqrt{2}})|-\rangle|0\rangle+({(1- \sqrt{3}i) \over 4\sqrt{2}}-{(1+ \sqrt{3}i) \over 4\sqrt{2}})|-\rangle|1\rangle$$
+ +$$|\phi| = {\sqrt{3}i \over 2\sqrt{2}}|-\rangle|0\rangle-{\sqrt{3}i \over 2\sqrt{2}}|-\rangle|1\rangle$$
+ +Next, we normalize this.
+ +$$|\phi| = {({\sqrt{3}i \over 2\sqrt{2}}|-\rangle|0\rangle-{\sqrt{3}i \over 2\sqrt{2}}|-\rangle|1\rangle) \over \sqrt {{\left|\sqrt{3}i \over 2\sqrt{2}\right|^2}+{\left|\sqrt{3}i \over 2\sqrt{2}\right|^2}}}$$
+ +$$|\phi| = {2\sqrt{3} \over 3} . {\sqrt{3}i \over 2\sqrt{2}}|-\rangle|0\rangle-{2\sqrt{3} \over 3}.{\sqrt{3}i \over 2\sqrt{2}}|-\rangle|1\rangle)$$
+ +$$|\phi| = {1 \over \sqrt{2}}|-\rangle|0\rangle-{1 \over \sqrt{2}}|-\rangle|1\rangle)$$
+ +Hence the probably of second qubit: $P(|0\rangle)$ when the first qubit is $|-\rangle$ is :
+ +$$|\phi| = {\left ({1 \over \sqrt{2}}\right )}^2 = \frac{1}{2}$$
+",9193,,26,,11/27/2019 13:20,11/27/2019 13:20,Beginners doubt: calculating probability of one qubit based on other in a 2 qubit system,What areas of research in NISQ algorithms have heavy focus? I'm interested in quantum chemistry algorithms because of previous work (e.g. VQEs), and I'd love to learn more about other near-term algorithms that are being explored.
+",8343,,8343,,11/20/2019 15:53,11/21/2019 11:56,Active areas of research for NISQ algorithms,There is no long math, and you need not online calculators. When you simply omit $|+\rangle$ state of the first qubit after the measurement, the resulting 2-qubit state $|\Phi\rangle$ is unnormalized. You just need to factor out the state $|-\rangle$ of the first qubit and normalize the remaining state of the second qubit before obtaining the final answer.
+",2105,,2105,,11/20/2019 6:21,11/20/2019 6:21,,,,0,,,,CC BY-SA 4.0 +8861,2,,8858,11/20/2019 6:16,,2,,"In the line immediately before Step 2, you have like terms that can be combined. Combine these, then renormalize the vector.
+ +Recognize that your misstep lies in the properties of the amplitude. Generally, for some $a, b$ components and $x, y$ separation:
+ +$$ +|a + bi|^2 \neq |x + yi|^2 + |(a - x) + (b - y)i|^2 +$$
+ +In this case, the like terms aren't combined, so we're combining the probabilities of the individual terms, which doesn't hold.
+",8343,,,,,11/20/2019 6:16,,,,1,,,,CC BY-SA 4.0 +8862,1,8863,,11/20/2019 6:32,,4,1971,"I have read some of the other decomposition questions here however still don't understand how to do it manually. The matrix I wish to decompose is the following for 2 qubits:
+ +$M=\frac{1}{\sqrt2}\begin{bmatrix} +1 & 0 & 0& i\\ +0 & 1& i & 0\\ +0 & i & 1 & 0\\ +i & 0& 0 & 1 +\end{bmatrix}$
+ +I have used the Qiskit circuit decompose to find that it corresponds to the following image, but I don't understand how that was done.
Also Qiskit is only able to decompose for up to 2 qubits. My application for the matrix expands beyond 2 qubits and I would also like to know how to decompose for more.
+ +Any help on the step by step process of decomposition would be appreciated as well as any insight on multiple qubit decomposition :)
+",8405,,55,,11/26/2019 10:40,11/26/2019 10:40,How to decompose this two-qubit unitary matrix to the standard gate set?,I found paper Quantum Circuits for Isometries to be a useful reference on the topic. It describes several methods for decomposing multi-qubit unitaries into CNOT gates and qubit unitaries and also gives several references to earlier related works.
+ +There is also a Mathematica package that implements algorithms described in the mentioned paper. If you don't have Mathematica you can still probably run it using Wolfram Engine and Wolfram Language for Jupyter.
+ +For decomposition of two-qubit unitaries with minimal CNOT count quant-ph/0308033 is a good reference.
+",5445,,,,,11/20/2019 7:36,,,,0,,,,CC BY-SA 4.0 +8864,1,,,11/20/2019 8:18,,1,322,"What will happen if the two qubits in Bell state for a 2-qubit system, $\frac{1}{\sqrt2}(\left|00\right\rangle+\left|11\right\rangle)$ are simultaneously measured at the same instant? Two scenarios: Qubits are measured in the same states or different states. Has anyone tried to measure the qubits experimentally in IBM-Q? What is the answer from Quantum Mechanics?
+",8120,,26,,11/20/2019 16:22,9/12/2021 21:29,Bell state: simultaneous measurement of two entangled qubits,In theory, there is no difference between this and measuring one qubit and then the other. One way of thinking about this is from the perspective of inertial frames of reference in special relativity - for two separated parties, there is no global definition of simultaneous. Different observers can observe different orderings of space-like separated events. While this is not strictly built in to quantum mechanics, it does respect that structure.
+",1837,,,,,11/20/2019 8:24,,,,3,,,,CC BY-SA 4.0 +8866,2,,8864,11/20/2019 12:26,,2,,"I tried to prepare and measure this Bell state on IBM Q. There is a low probablity, around few percent, that you measure states $|01\rangle$ or $|10\rangle$. But this is caused by a thermal noise and spontaneous break of the entangled state.
+",9006,,,,,11/20/2019 12:26,,,,2,,,,CC BY-SA 4.0 +8867,1,,,11/20/2019 12:40,,1,124,"Recently, I used the transpile() function with the level 3 preset pass manager to compile a very long and complex circuit on a real device coupling map. I was curious to see how much the depth of the circuit would increase due to the inevitable swaps. The result was quite strange, the depth of the transpiled circuit was an order of magnitude lower than the original circuit.
+When I drew the transpiled circuit I found that it was composed of some strange multi-qubit gates labeled as 'unitary' (see picture below), while most of the two-qubits gates from the original circuit were gone.
+ +I was wondering what these unitaries could mean.
+",9200,,-1,,6/18/2020 8:31,11/20/2019 15:54,Strange circuit with multi-qubit 'unitary' gates after transpiler with optimization level 3,In IBM Q-Experience how can I upload a data file that I intend to read from the python code?
+",9201,,,,,11/20/2019 13:30,Data file read/write from within IBM Q-Experience Jupyter notebook,There are no classical registers nor a clock in quantum computing
+In classical computers you can have a well defined "current state at a given time" (stored notably in CPU registers and DRAM memory in modern systems), and this state changes with time (each CPU clock) in a controlled way.
+Therefore, it is easier to map sequential description of an algorithm back to classical real hardware. For example, a classical algorithm might be described sequentially as:
+a = b + c
+d = 2 * a
+
+and in a classical computer this might actually be implemented in two separate steps:
+a
d
In quantum computing however, you cannot save the "intermediate state of a computation" and operate on it in a later step: you set up the inputs and the circuit, and information flows in a single indivisible step to the sensor device at the end of the circuit which makes a probabilistic reading.
+Therefore, unless we are treating quantum circuits as black boxes between classical registers, sequential algorithm descriptions don't make much sense.
+It is this fact that makes quantum computers much harder to program.
+So a more likely useful description of quantum computing looks more like the combinatorial logic blocks (i.e. blocks with no registers and therefore no state) in hardware description languages such as Verilog and VHDL, which are just textual descriptions of a graph of circuits. This is exactly the case of IBM's OpenQASM quantum circuit description for example.
+For example, in a Verilog combinatorial block, when you say:
+a = b + c
+
+it doesn't mean "on the next clock cycle of the algorithm, the register a
will be worth b + c
" like in say C or Python.
It rather means:
+a
is a wire,b
is a wirec
is a wire+
is an adding circuit with b
and c
as inputs and a
as outputTherefore, as soon as b
or c
change, a
also "immediately" changes. With "immediately" in quotes because in practice electrons do take some time to move, and so we can't take the clock smaller than this propagation time.
A "propagation time" analogue is also present in quantum computers, where each experiment takes some time to finish, and the faster that time, the faster you can rerun the experiment to reduce uncertitude of the result.
+Of course, for any maximum input size, you could make one huge combinatorial circuit that implements that algorithm. But in classical computing we don't do that because silicon is expensive to design and produce, so it is much more economical to design a circuit that solves a wider range of problems than a huge specialized circuit, even if each problem is solved a bit less fast.
+In quantum computers, you don't have a choice. Unless you can use a divide and conquer style algorithm to generate smaller subproblems (which generally implies a P problem which might not be so interesting to a quantum computer), you just need a minimum number of qubits and gates for each given algorithm.
+",4243,,4243,,2/11/2022 8:43,2/11/2022 8:43,,,,7,,,,CC BY-SA 4.0 +8870,2,,8868,11/20/2019 13:30,,4,,"If you go to the Qiskit Notebooks section, you will see this button
If you click import you can chose to upload the file from your computer into IQX.
+",5955,,,,,11/20/2019 13:30,,,,5,,,,CC BY-SA 4.0 +8871,2,,8867,11/20/2019 13:41,,1,,"The point of the transplier is not only to map circuits to backends, but also to optimize the circuit to reduce the number of gates it contains so that the results you receive will (hopefully) be better. This is done through a series of optimizations, provided by things called transpiler passes. There is more information about them here.
+ +A unitary in this case is quantum gate which can be represented by a matrix. You could try calling to_matrix()
on this gate so you can see what action it is performing. It may have been formed by combining several gates into one. The 0
and 1
labels show which qubits it is acting on.
I recently attended a seminar where a professor of quantum cryptography told the audience that one quantum qubit can theoretically store ""infinite information"". I was very intrigued by this statement, and me being an absolute novice in this domain, do not have the means of verifying the validity of his statement. My questions are as follows:
+ +++ ++
+- Can we really compute the distance $|x - y| < \epsilon$ using a quantum qubit? If so, can anyone throw light on how this is done?
+- Also, if not, how far along are we in actually computing this quantity?
+- Can we measure if quantum computers approximate this quantity better (or worse?) than classical computers?
+
Thanks a lot in advance!
+",8989,,55,,11/24/2020 14:22,11/24/2020 14:22,How close are we in achieving computation over reals using quantum qubits?,If an individual or commercial enterprise resorts to renting quantum computing power on the cloud, wouldn't the company who owns and hosts the quantum computer be able to see/monitor/eavesdrop on the electronic transmissions that their customers make, causing privacy concerns? And about adoption, first of all, how has the business and usage statistics of renting cloud services been for supercomputers anyway?
+ +About error correction, How would the user be able to verify the reliability of the estimates and solutions returned by the superconductor they are renting, given how the current state of the technology is widely known to lack error correction mechanisms, or is that just a misconception?
+",9118,,26,,11/20/2019 15:52,11/20/2019 16:33,"Renting quantum on the cloud: data privacy, adoption and error correction",These are two separate questions, so I will (try to) answer them separately as well.
+ +Without any alterations, the instructions for a quantum computation that is to be run on a remote computer can be seen by that remote computer. That is to say, if you want to conceal the computations that you want to perform (be it the type of computations or the input to said operation), this is not possible using this approach.
+ +There is a parallel to be made to classical remote computation: there exist methods to hide/encrypt the input parameters to some remote computation, which is known as Homomorphic encryption. This can be used to hide the input parameters of the quantum computation as well, in principle.$^{1}$.
+ +To conceal the type of computation that you want to perform, is a much more challenging task. There is no way of doing this in classical computation that I know of, but there is a method that can be used in quantum computing. +For this to work, you need to have a quantum channel to the remote machine (i.e. an internet-type link over which you can send qubits). This method is known as blind quantum computing, and is very much in an active area of research.
+ +You are right in saying that current quantum computers have too few qubits to perform active reliable error correction. This is true for both local and remote quantum computers. However, the answers of most computations that quantum computers perform are relatively easy to test: they are hard to compute, but easy to assert. This means that one just tests the answer returned by the remote machine and through that determines the reliability of the remote machine.
+ +Furthermore, there exist types of computations that are less affected by the current noise levels of qubits; see for instance VQE's. These types of algorithms are more readily implemented on current hardware.
+ +$^{1}$ I believe that this is the case, I am not an expert on the matter.
+",8141,,8141,,11/20/2019 16:33,11/20/2019 16:33,,,,0,,,,CC BY-SA 4.0 +8876,2,,8843,11/20/2019 18:52,,4,,"The comment made by arriopolis is correct. The output registers of these compiled circuits are important for synthesizing the circuit, but not particularly interesting to measure. As you saw already, those measurements just match the truth tables they were designed to match.
+ +The QFT and measurements intended for this circuit are
+ + + +which gives the probability distributions
+ + + +(If the code implementing any of this would be helpful to anyone, just let me know in the comments.)
+ +The significance of these probability distributions is that they match the expectations of theory for analogous registers of a general implementation of Shor's algorithm. The authors show how this works in detail in Section V, along with proposed uses including quantifying entanglement capacity and noise.
+ +The punchline is that these distributions match the diagonal elements of a reduced density matrix, tracing over the output register to get
+ +$$\rho_p \equiv \text{tr}_o(\vert \phi_p \rangle \langle \phi_p \vert).$$
+ +These are tabulated for this particular case in Table XI (it's clear a priori that $p=3$). Note that the authors' intent to represent binary numbers in the registers by integers was made clear earlier in the section.
+ +However, the circuit above is only an intermediate step towards the authors' aim of substantial simplification of a complex circuit. For example, the composite density matrix for this circuit, which is a necessary step in getting to Table XI, has dimension $2^8 \times 2^8$.
+ +Noting that 5 qubits are used to represent three values (1, 4, and 16) on the output register, the authors use a $\text{log}_4$ map to synthesize the much improved circuit
+ + + +which remarkably has the same probability distribution on the input register (i.e. matches the same row in Table XI) and maintains the $\text{log}_4$ map between output registers.
+",8623,,8623,,11/20/2019 19:10,11/20/2019 19:10,,,,0,,,,CC BY-SA 4.0 +8877,1,,,11/20/2019 20:42,,1,42,"OpenQasmReader was added in https://github.com/microsoft/Quantum/pull/58. I can't find this code on the latest clone of the aforementioned repository. Going through the commits, I found that it had been de-referenced in the README.
+",362,,,,,11/20/2019 20:42,Where is OpenQasmReader in Q#?,,1,0,,,,CC BY-SA 4.0 +8878,2,,8877,11/20/2019 20:42,,1,," OpenQasmReader was moved to another repository.
+",362,,,,,11/20/2019 20:42,,,,0,,,,CC BY-SA 4.0 +8879,2,,1631,11/20/2019 21:51,,2,,"Entanglement is a quantum physical phenomenon, demonstrated in practical experiments, mathematically modeled in quantum mechanics. We can come up with several creative speculations of what it is (philosophically), but at the end of the day we just have to accept it and trust the math.
+ +From a statistics point of view we can think of it as a complete correlation (1 or -1) between two random variables (the qubits). We may not know any these variables outcome beforehand, but once we measure one of them, due to the correlation, the other will be previsible. +I recently wrote an article on how quantum entanglement is handled by a quantum computing simulator, wich you may find helpful as well.
+",9207,,,,,11/20/2019 21:51,,,,3,,,,CC BY-SA 4.0 +8881,2,,2151,11/21/2019 0:25,,5,,"The most recent quantum machine learning textbook is
+ +Schuld and Petruccione (2018). Supervised Learning with Quantum Computers
+ +while a nice companion to Nielsen and Chuang for introductory quantum maths is
+ +Marinescu and Marinescu (2011). Classical and Quantum Information, +Chapter 1: Preliminaries
+",9118,,9118,,11/21/2019 0:41,11/21/2019 0:41,,,,0,,,,CC BY-SA 4.0 +8882,1,8884,,11/21/2019 9:13,,1,736,"I have the really odd problem when it comes to plotting Bloch spheres using QuTip. Plotting state vectors works perfectly fine e.g.
+ ++ +from qutip import * +import numpy as np +import matplotlib.pyplot as plt + +b = Bloch() +s = Qobj([[1],[0]]) +b.add_states(s) +b.show() +
But when I try to plot points on the Bloch sphere using QuTiP
+ ++ +from qutip import * +import numpy as np +import matplotlib.pyplot as plt + +b = Bloch() +pnt = [1,1,1] +b.add_points(pnt) +b.show() +
I get the following error message
+ ++ +Traceback (most recent call last): + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/matplotlib/backends/backend_macosx.py"", line 80, in _draw + self.figure.draw(renderer) + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/matplotlib/artist.py"", line 38, in draw_wrapper + return draw(artist, renderer, *args, **kwargs) + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/matplotlib/figure.py"", line 1709, in draw + renderer, self, artists, self.suppressComposite) + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/matplotlib/image.py"", line 135, in _draw_list_compositing_images + a.draw(renderer) + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/matplotlib/artist.py"", line 38, in draw_wrapper + return draw(artist, renderer, *args, **kwargs) + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/mpl_toolkits/mplot3d/axes3d.py"", line 292, in draw + reverse=True)): + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/mpl_toolkits/mplot3d/axes3d.py"", line 291, in <lambda> + key=lambda col: col.do_3d_projection(renderer), + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/mpl_toolkits/mplot3d/art3d.py"", line 545, in do_3d_projection + ecs = (_zalpha(self._edgecolor3d, vzs) if self._depthshade else + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/mpl_toolkits/mplot3d/art3d.py"", line 847, in _zalpha + rgba = np.broadcast_to(mcolors.to_rgba_array(colors), (len(zs), 4)) + File ""<__array_function__ internals>"", line 6, in broadcast_to + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/numpy/lib/stride_tricks.py"", line 182, in broadcast_to + return _broadcast_to(array, shape, subok=subok, readonly=True) + File ""/Users/turbotanten/anaconda3/lib/python3.7/site-packages/numpy/lib/stride_tricks.py"", line 127, in _broadcast_to + op_flags=['readonly'], itershape=shape, order='C') +ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (0,4) and requested shape (2,4) +
I have tried using different matplotlib backends like TkAgg without any success. I don't know how to fix this problem.
+",2136,,26,,11/21/2019 16:27,11/21/2019 16:27,Can't plot points on the Bloch sphere (QuTip),,1,0,,,,CC BY-SA 4.0 +8883,1,8891,,11/21/2019 10:09,,4,360," In Cirq, quantum circuit consists of moments, which in turn consists of operations. This is different from Qiskit/OpenQASM, which doesn’t have the concept of moments. What is the design philosophy behind the moment-based quantum circuit? What are the advantages and disadvantages of it?
+ +As a result of moments, one can insert operations in different moments using different insert strategies. It seems to me the earliest insert strategy is always preferred, which is the same as Qiskit/OpenQASM. What are the use cases for different insert strategies?
+",7474,,26,,11/21/2019 16:27,11/21/2019 19:36,Moments-based quantum circuit in Cirq,,1,1,,,,CC BY-SA 4.0 +8884,2,,8882,11/21/2019 10:56,,1,," I found a solution to my problem here https://github.com/qutip/qutip/issues/1027
+ +Apparently plotting points on the Bloch sphere does not work with Matplotlib v3.1.0. +So I had to downgrade to v.3.0.3 for it to work!
+",2136,,,,,11/21/2019 10:56,,,,0,,,,CC BY-SA 4.0 +8886,1,,,11/21/2019 15:03,,0,97,"I'm looking for an entrypoint to learning about quantum computing to which I'm exposed only by popular science articles and some qiskit materials so far. I understand that it's entirely possible that I'm insulated from the underlying math and implementation details, but I'm not interested in that. Considering my background is in classical programming, mostly imperative languages, what's a good book or set of other materials to get me started but with a view to eventually go deep?
+",9215,,26,,11/21/2019 16:25,11/21/2019 16:25,Intro to quantum computing for programmers,,1,1,,11/25/2019 21:31,,CC BY-SA 4.0 +8887,2,,8886,11/21/2019 15:22,,6,," I don't think I agree - you really do need a grasp of quantum computing mechanics (including the math) in order to do any programming
+ +TLDR: Quantum computers are so specialized and the software is so close to the physical realization that you need an understanding of the math of quantum algorithms.
+ +Here's my logic
+ +With classical computers, we have a large workforce of programmers who don't understand the physical implementation of bits, the semiconducting gates, etc. But, that's because the physical realization has been heavily abstracted away - we think in data structures that are far removed from bit realizations. So, they don't need to think of primitive logic gates when programming, as compilers already bring it to the bit level.
+ +For quantum computers, we don't have these far off abstractions yet - we barely can achieve 50+ qubits (with so-so error correction), so an understanding of the underlying mechanics of qubits is critical. Programming a quantum computer is modifying individual qubits with gates, so you need to understand how the gates affect qubits. Also, quantum computers aren't meant for general computing - they're meant for tough, math heavy problems (like machine learning, molecular simulation, cryptography).
+",8343,,,,,11/21/2019 15:22,,,,0,,,,CC BY-SA 4.0 +8888,1,8890,,11/21/2019 16:02,,1,159,"Could someone guide me on how to create my own
+ +qiskit.result.models.ExperimentResultData
object? I would simply like to create an object with some self-created dict of counts.Creating
+",9216,,5955,,11/21/2019 17:04,11/21/2019 17:04,qiskit - Creating your own ExperimentResultData object,qiskit.result.models.ExperimentalResults
object is somehow easy, since by calling it fromqiskit.result.models.ExperimentResults
, I simply pass the required attributes. But somehow I was not able to figure out how to do the same withqiskit.result.models.ExperimentResultData
, which should be passed as ""data"" attribute toqiskit.result.models.ExperimentalResults
object.,1,0,,,,CC BY-SA 4.0 +8889,1,,,11/21/2019 16:31,,2,814," If I consider $a|00\rangle + b|01\rangle +c|10\rangle +d|11\rangle$ as a valid two-qubit system, what is the probability of measuring the first qubit in state $\frac{1}{\sqrt 2}(|0⟩+|1⟩)$?
+ +I know that the probability of measuring the first qubit in state $|0\rangle$ is $|a|^2 + |b|^2$, but I couldn't figure out how it works here. Thanks in advance.
+",9218,,55,,11/22/2019 14:50,11/22/2019 14:50,Probability of measuring the first qubit in the state $\frac{1}{\sqrt 2}(|0⟩+|1⟩)$ in a two-qubit state,,1,1,,,,CC BY-SA 4.0 +8890,2,,8888,11/21/2019 16:59,,2,," You should be able to do this by simply creating an instance of the class. This can be done as follows
+ ++ +from qiskit.validation import base +raw_counts = {'0x0': 4, '0x2': 10} +data = models.ExperimentResultData(counts=base.Obj(**raw_counts)) +
There are lot of examples of how to do this in the testing file for these classes.
+",5955,,,,,11/21/2019 16:59,,,,2,,,,CC BY-SA 4.0 +8891,2,,8883,11/21/2019 19:36,,4,,"++ +What is the design philosophy behind the moment-based quantum circuit? What are the advantages and disadvantages of it?
+The basic idea is that we wanted to give users more control over what will actually happen on hardware. Whether or not two gates are run in parallel is really important information when dealing with noise (e.g. it determines total runtime), so it's important for users to be able to determine-whether that's happening and also control-if that's happening.
+ +The philosophy of giving more control isn't limited to moments. Cirq also requires users to specify specific qubits (no implicit placement), and to use the native gateset of whatever device they are targeting (no implicit decomposition). The important thing is that you should be able to have a clear concrete idea of what will actually happen on the device.
+ +Cirq also has the concept of a ""schedule"", which has even more control over timing. But ironically we've found that users don't want to use it, and programmers don't like consuming it. So we're actually cutting that next version.
+ +The list-of-moments structure seems to be a nice sweet spot in terms of flexibility, ease of production, and ease of consumption. You can certainly put the abstraction boundary in other places, but that's where we've found ourselves pulled towards.
+ +++ +It seems to me the earliest insert strategy is always preferred
+It's a good rule of thumb, which is why it's the default. But it's not always optimal. For example, hardware may perform best when circuits are stratified into layers of single-qubit gates and layers of two-qubit gates (but never a layer with both single and two qubit gates). So even if you can move a single qubit operation earlier, that may result in it being in the same layer as two qubit operations. Moving it would not be a fatal mistake, the circuit would still run, but it might be slightly noisier. There are lots of ""little things"" like that when dealing with hardware.
+",119,,,,,11/21/2019 19:36,,,,4,,,,CC BY-SA 4.0 +8893,1,8894,,11/21/2019 21:23,,7,838,"Why is the order reversed on measurement?
+ ++ +from qiskit import( + QuantumCircuit, + execute, + Aer) +from qiskit.visualization import plot_histogram + +# Use Aer's qasm_simulator +simulator = Aer.get_backend('qasm_simulator') + +# Create a Quantum Circuit acting on the q register +circuit = QuantumCircuit(3, 3) + +# Add a X gate on qubit 0 +circuit.x(0) + +# Add a CX (CNOT) gate on control qubit 0 and target qubit 1 +circuit.cx(0, 1) + +circuit.barrier() +# Map the quantum measurement to the classical bits +circuit.measure([0,1,2], [0,1,2]) + +# Execute the circuit on the qasm simulator +job = execute(circuit, simulator, shots=1000) + +# Grab results from the job +result = job.result() + +# Returns counts +counts = result.get_counts(circuit) +print(""\nTotal count:"",counts) + +# Draw the circuit +circuit.draw() +
Got result:
+ +++ +Total count for 00 and 11 are: {'011': 1000}
+But I'm expecting '110'.
+",9223,,9223,,11/21/2019 22:40,4/27/2021 19:04,Why is the order reversed on measurement?,,3,0,,,,CC BY-SA 4.0 +8894,2,,8893,11/21/2019 22:39,,6,," I still run into this issue too. If you consider $|q0\rangle$ to be the most significant bit (MSB) you have to map it to the most significant classical bit as well, which is in your case a bit no. 2. Or you can flip your quatnum circuit upside down and then $|q0\rangle$ become the least significant bit (LSB) and the measurement will meet your expectation.
+ +A code
+ ++ +circuit.measure([0,1,2], [0,1,2]) +
is valid in case $|q0\rangle$ is LSB and
+ ++ +circuit.measure([0,1,2], [2,1,0]) +
in case $|q0\rangle$ is MSB.
+ +I think that the reason for this arrangement is simply a convention, so you can choose whether $|q0\rangle$ is MSB or LSB and set the measurement procedure accordingly.
+",9006,,,,,11/21/2019 22:39,,,,1,,,,CC BY-SA 4.0 +8895,2,,5215,11/21/2019 23:30,,2,,"I will try to give an answer from complexity theory's point of view. This question should be asked in cs.stackexchange by the way. The Deutsch-Jozsa problem has an efficient algorithm on quantum computation and on a classical probabilistic Turing machine, so it is in BQP and BPP. There is no result that says: if you show a problem A in BQP and not in P, then P is different from BQP. Thus, in order to prove P $\ne$ BQP, first consider the probabilistic part of P which is BPP [since complexity theorist believe that P $=$ BPP and it is better to compare a a probabilistic version of P with the quantum world of P, which is BQP] then according to complexity's theorist, they say that you need to prove something very hard like: P $\ne$ PSPACE to work on this BBP$ \ne$ BQP, here is a part of the answer by Greg Kuperberg says:
+ +++ +BQP $\ne$ BPP is another thing that people can't prove, because they are both sandwiched between P and PSPACE and no one can prove that P $ \ne $ PSPACE either. (In fact it's worse than that, there are major results on how not to prove that P $\ne$ PSPACE.)
+How is it that Deutsch-Jozsa has a probabilistic polynomial running time? Here for this paper, it states the following in page 2:
+ +++",1899,,55,,11/22/2019 7:57,11/22/2019 7:57,,,,2,,,,CC BY-SA 4.0 +8896,2,,8889,11/22/2019 0:02,,3,,"the Deutsch-Jozsa problem has an efficient solution on a classical probabilistic Turing machine [8, 9]
+Given an arbitrary state $|\psi\rangle$, if it is expressed in the computational basis as $|\psi\rangle=\sum_k c_k |k\rangle$, then it will give the $k$-th result (when measuring in the computational basis) with probability $|c_k|^2$.
+ +Note that here by ""computational basis"" I simply mean the measurement basis under consideration.
+ +If you consider another type of measurement, corresponding to a different basis, say $\{|u_k\rangle\}_k$, then to figure out the outcome probabilities in this new basis you need to express $|\psi\rangle$ in terms of the $|u_k\rangle$. Say that doing this you get something of the form +$$|\psi\rangle = \sum_k d_k |u_k\rangle.$$ +That means that the outcome corresponding to $|u_k\rangle$ is obtained with probability $|d_k|^2$.
+ +If you start with a description of the state in the $|k\rangle$ basis, and want to switch to a description in terms of the $|u_k\rangle$ one, you simply need to compute the inner products $\langle u_k|\psi\rangle=d_k$.
+ +More generally, given a state $|\psi\rangle$, the probability of finding it in a state $|\phi\rangle$ is given by $|\langle\phi|\psi\rangle|^2$.
+ +There is, however, a slightly more general way to do measurements, that doesn't (necessarily) involve a full collapse of the state. You can ask questions of the form ""is the state in a given subspace?"". For example, you can ask whether a state is in one of first $3$ (or any other subset of) computational basis states. You model this situation by using a projector $P$ that projects onto the required basis, and the associated measurement probability is then given by $\|P|\psi\rangle\|^2$.
+ +Taking as an example your specific case, you have a bipartite state expressed in terms of the computational basis $\{|00\rangle,|01\rangle,|10\rangle,|11\rangle\}$ with coefficients $a,b,c,d$. Let's call this state $|\psi\rangle$. +You are asking about the probability of the state being found in the subspace $\{|+,0\rangle, |+,1\rangle\}$. To compute this probability you therefore write down the projector $P$ defined as +$$P = |+,0\rangle\!\langle +,0| + |+,1\rangle\!\langle +,1| +\equiv |+\rangle\!\langle +| \otimes I_2,$$ +and you compute $\|P|\psi\rangle\|^2$. +Equivalently, you just rewrite $|\psi\rangle$ expressing the first qubit in the $|\pm\rangle$ basis, and then sum the probabilities of finding it in either $|+,u\rangle$ or $|+,v\rangle$, with $\{|u\rangle,|v\rangle\}$ the basis chosen for the second qubit (it doesn't matter which one is used).
+",55,,55,,11/22/2019 14:28,11/22/2019 14:28,,,,2,,,,CC BY-SA 4.0 +8898,1,9300,,11/22/2019 1:27,,4,157,"Many scientific programmers get by fine without having a computer science background, i.e. they don't need to know the machinery behind the prevailing paradigm of 0's and 1's (bits), let alone basic logic, to code.
+ +Given this lack of awareness of classical computing's inner workings, what are stand-out concepts from classical computing that every aspiring quantum programmer should know?
+",9118,,1386,,12/3/2019 10:06,12/22/2019 23:55,What concepts from classical computing are vital for quantum programmers?,,1,1,,,,CC BY-SA 4.0 +8900,1,,,11/22/2019 5:32,,10,3059," DiVincenzo criteria for quantum communication mentions flying qubits:
+ +a. The ability to interconvert stationary and flying qubits +b. The ability to faithfully transmit flying qubits between specified locations
+ +So, what exactly is a flying qubit, and how is it related to and different from a normal qubit? +Please help understand more. +I am undertaking Delft University's course in EdX on Quantum Internet and Quantum Computers.
+",9227,,4501,,2/3/2021 15:36,2/3/2021 15:36,What is a flying qubit?,,1,0,,,,CC BY-SA 4.0 +8901,1,,,11/22/2019 5:49,,3,82," Recently there has been interest in understanding the out of time order correlation function (OTOC) $F$, which essentially compares the overlap of two operators $W$ and $V$ acting on a state in two different ways
++
+- Apply $V$ onto a quantum state, wait a time $t$, then apply $W$
+- Apply $W$ at time $t$, then reverse time to $t=0$ and apply $V$
+This correlation function then takes the form +$$F=\langle W_t^{\dagger} V^{\dagger} W_t V \rangle$$
+Roughly speaking, $F$ tells you how quickly interactions make the initially commuting $V$ and $W$ stop commuting.
+Completing step (1) above is straightforward, you just apply the operators one after another. However (2) is more challenging, because one has to reverse the direction of time.
+The most obvious way to implement (2) is to reverse time through changing the sign of the entire Hamiltonian $H \rightarrow -H$, which effectively reverses the time evolution. Needless to say, this is very tricky in dissipative/open systems, as you can only reverse the sign of a select part of the Hamiltonian, but not all of it.
+My question is the following: is it meaningful to think about OTOCs in the interaction picture? I ask because it is often the case in experiment (e.g. NMR Hahn echo experiments) that you can reverse the sign of the interaction Hamiltonian but not the full Hamiltonian. What does the OTOC tell you with respect to time evolution in the interaction picture?
+More concretely, say you have the following spin Hamiltonian
+$$H = H_0 + g \sum_i \mathbf{S}_i\cdot \mathbf{B}$$
+Where $H_0$ is some unknown function of the spin operators.
+Assume that you can change the sign of the magnetic field $\mathbf{B}$ at will, like in NMR. Is there anything interesting about the resulting OTOC in this case? Or does it not have any of the useful properties of "true" OTOCs?
+",2260,,2260,,11/6/2022 15:58,11/6/2022 15:58,Out-of-time-order correlation function in the interaction picture?,,0,1,,,,CC BY-SA 4.0 +8902,2,,8900,11/22/2019 9:18,,11,," Preliminary - The DiVincenzo criteria for a 'normal' quantum computer
+The DiVincenzo criteria, as originally proposed by DiVincenzo, are $5$ criteria that he originally proposed in his seminal 2000 paper. In this paper, he proposed five criteria, which are widely considered to be the five (sufficient and necessary) criteria that any physical quantum computer should meet.
+As you are doing the TUD quantum crypto course, you are familiar with the concept of a quantum internet. The five DiVincenzo criteria are not sufficient for quantum computer(s) connected over a quantum internet; they come up short in the communication part. For this, two more criteria (nr. $6$ & $7$) have been 'added'. They were also proposed by DiVincenzo in his paper, but in a separate section.
+I have met people who, by using the term 'The DiVincenzo criteria', refer to only the first five criteria and others who use it to refer to all seven collectively. I tend to view the first five as regarding to stationary qubits, and the latter two as regarding to flying qubits and make the distinction by using this view, but please view that as my personal opinion.
+The latter two criteria
+Criteria $6$ & $7$ have to do with communication between different quantum computers or nodes. To exchange (quantum) information between two nodes, one needs to have a carrier of this quantum information. This is exactly what a flying qubit should be: a qubit that can be freely send from one node to the other.
+The first extra criterium prescribes that the information encoded in a qubit within the quantum computer (often referred to as the stationary qubit in this context) should be reliably transferred to a flying qubit. Additionally, an obtained flying qubit's information needs to be reliably transferred back to a stationary qubit as well.
+The second extra criterium prescribes that such a flying qubit should be reliably send from one node to another. This is a daunting task if you consider that the nodes might be (geographically) very far apart ($> 50$km). The coherence of the flying qubit needs to be preserved over this scale, possibly (likely) with the use of error correction.
+Properties of a flying qubit when compared to a stationary qubit
+A flying qubit should, just as a stationary qubit, be able to reliably store quantum information. However, there are some important distinctions. +First and foremost, flying qubits have a more restricted use case than stationary ones - they are only used to propagate the information between macroscopic distances, whereas stationary qubits are used to not only store information, but also to perform calculations with.
+So to compare:
+Stationary qubits need to:
++
+- +
Be able to store quantum information reliably on a timescale of $\sim ms$.
+- +
Perform calculations: various gates/operations need to be reliably performed on them. This includes an operation that moves/converts the information to a flying qubit.
+- +
Be able to be measured/read out reliably.
+- +
Be able to be highly entangled.
+Flying qubits, however, need to:
++
+- +
Be send over macroscopic distances while keeping their encoded (quantum) information intact.
+- +
Be operational on a macroscopic temperature scale (i.e. about room temperature).
+- +
Perform only one single operation reliably: converting into stationary qubits.
+- +
Be able to be entangled.
+Therefore, there are some important distinctions between the two. To summarize in what I believe is their defining distinctions:
++
+- Stationary qubits need to be reliably calculated with.
+- Flying qubits need to be reliably transmitted over macroscopic distances.
+Physical implementation of a flying qubit
+There exist myriad different implementations of stationary qubits that all have their advantages and disadvantages; it is still an open question what the final 'go to' stationary qubit design (if any) will be. +For flying qubits, there is one clear design which is the most promising: the photon. The photon travels very fast, and has a straightforward two-level system (namely, its polarization). Also, this polarization can be conserved at higher temperatures. Note that other encodings of the qubit into the photon are also possible, for instance the time-bin encoding.
+Note that it is highly unlikely that stationary and flying qubits will be based on the same physical principle or design. That is to say, stationary qubits will most likely be based on an entirely different physical phenomenon than stationary qubits (e.g. Ion traps, superconducting qubits/transmons, quantum dots, other confined electron systems etc. for stationary qubits.) There are, however, designs for a quantum computer (with stationary qubits) based on the use of photons; only time will tell what actual implementation of stationary and flying qubits will prevail.
+Current implementations of flying qubits
+As an interesting sidenote, in the context of quantum key distribution, flying qubits are used in the key distillation. However, for these types of protocols to work, often only a subset of all possible qubit states need to be transferred (often this are the eigenstates of the $Z$ and $X$ operators); this reduces the complexity of the flying qubits. Note that for a general quantum internet this reduction needs to be omitted.
+",8141,,8141,,2/3/2021 9:59,2/3/2021 9:59,,,,4,,,,CC BY-SA 4.0 +8904,1,8906,,11/22/2019 13:59,,2,1236,"I am trying to understand how CNOT or X gate can be explained by even more basic gates.
+ +I went through these 2 links that explained the relation, but for my understanding, I am trying to prove it by matrix form. And yes I am clearly disabled in mathematics.
+ + + + + +So, let's take the case where first Qbit(Q1) is the control and the second Qbit(Q2) is the target.
+ +As per the articles, CNOT can be explained by $(I\times H)\cdot Z\cdot(I\times H)$. where X is matrix multiplication and (.) refers to dot product.
+ +So, I went on to first convert all of them to the matrix +Step 1:
+ +$\left(\begin{bmatrix}1 & 0\\0 & 1\end{bmatrix}\times{1\over\sqrt2}\begin{bmatrix}1 & 1\\1 & -1\end{bmatrix}\right)\cdot\begin{bmatrix}1 & 0\\0 & -1\end{bmatrix}\cdot\left(\begin{bmatrix}1 & 0\\0 & 1\end{bmatrix}\times{1\over\sqrt2}\begin{bmatrix}1 & 1\\1 & -1\end{bmatrix}\right)$
+ +I have my doubts if this understanding itself is correct but let's continue hoping it is.
+ +Step 2: +$\left({1\over\sqrt2}\begin{bmatrix}1 & 1 & 0 & 0\\1 & -1 & 0 & 0\\0 & 0 & 1 & 1\\0 & 0 & 1 & -1 \end{bmatrix}\right)\cdot\begin{bmatrix}1 & 0\\0 & -1\end{bmatrix}\cdot\left({1\over\sqrt2}\begin{bmatrix}1 & 1 & 0 & 0\\1 & -1 & 0 & 0\\0 & 0 & 1 & 1\\0 & 0 & 1 & -1 \end{bmatrix}\right)$
+ +Does this approach look right? if so, how should I approach further? if not what am I missing?
+ +I even tried to take a smaller bit to solve and tried to solve this:
+ +$X = H\cdot Z \cdot H$
+ +Step 1: +$X = {1\over\sqrt2}\begin{bmatrix}1 & 1\\1 & -1\end{bmatrix}\cdot \begin{bmatrix}1 & 0\\0 & -1\end{bmatrix} \cdot {1\over\sqrt2}\begin{bmatrix}1 & 1\\1 & -1\end{bmatrix}$
+ +Step 2: +$X = {1\over2}\begin{bmatrix} 1*1 & 1*0 \\ 1*0 & -1*-1\end{bmatrix}\cdot \begin{bmatrix}1 & 1 \\ 1 & -1\end{bmatrix}$
+ +Step 3: +$X = {1\over2}\begin{bmatrix} 1 & 0 \\ 0 & 1\end{bmatrix}\cdot \begin{bmatrix}1 & 1 \\ 1 & -1\end{bmatrix}$
+ +Step 4: +$X = {1\over2}\begin{bmatrix} 1*1 & 0*1 \\ 0*1 & 1*-1\end{bmatrix}$
+ +Step 5: +$X = {1\over2}\begin{bmatrix} 1 & 0 \\ 0 & -1\end{bmatrix}$
+ +once again, this is not Pauli-X gate, so I must be doing something stupid. +Please help and guide me.
+",9193,,26,,11/23/2019 4:40,11/23/2019 4:40,How to translate CNOT gate by Hadamard and Pauli Z gate in matrix form?,,1,5,,,,CC BY-SA 4.0 +8905,1,,,11/22/2019 14:27,,3,58," I am reading through the following article: https://arxiv.org/abs/1312.2579 +and I really struggle to understand anything of the section ""D. The standard graph-coloring method"" on page 7 and ""E. The band-coloring method"" on page 8 as well. I've been through plenty of articles that say they use this method, but I am having a hard time understanding anything that is done here. If someone here has any idea, it would be really appreciated if a walkthrough could be provided.
+",5632,,26,,11/23/2019 4:39,11/23/2019 4:39,Graph coloring to reduce the number of qubits in VQE,,0,0,,,,CC BY-SA 4.0 +8906,2,,8904,11/22/2019 16:17,,3,," I think you have a slight misunderstanding of what the $Z$ gate in the screenshot you attached is. It is, in fact, not a Z gate, but a (2-qubit) $CZ$ or controlled-$Z$. gate, also referred to as a controlled-phase gate (because the $Z$ operation is a flip of the phase of the $|1\rangle$ state).
+ +This $CZ$ gate is a lot like the $CX$ gate, however, it performs a $Z$ operation on the second qubit, but only if the state of the first qubit is $|1\rangle$ state. If the first is in the $|0\rangle$ state it performs nothing (i.e. $I$ operation) on the second qubit instead.
+ +In more technical terms, we can write thus: +\begin{equation} +CZ = |0\rangle \langle0| \otimes I + |1\rangle \langle1| \otimes Z. +\end{equation}
+ +Then: +\begin{equation} +(I \otimes H) CZ(I\otimes H) = |0\rangle \langle0| \otimes HIH + |1\rangle \langle1| \otimes HZH. +\end{equation}
+ +We can simplify the $HIH$ term easily: $HIH = HH = I$, from the properties of $I$ and $H$. +The $HZH$ term is actually equal to $X$: +\begin{equation} +\begin{split} +HZH &= \frac{1}{2}\begin{bmatrix}1 & 1 \\ 1 & -1\end{bmatrix}\begin{bmatrix}1 & 0 \\ 0 & -1\end{bmatrix}\begin{bmatrix}1 & 1 \\ 1 & -1\end{bmatrix}\\ +&= \frac{1}{2}\begin{bmatrix}1 & -1 \\ 1 & 1\end{bmatrix}\begin{bmatrix}1 & 1 \\ 1 & -1\end{bmatrix} \\ +&= \frac{1}{2}\begin{bmatrix}0 & 2 \\ 2 & 0\end{bmatrix}\\ +&= \begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix} = X. +\end{split} +\end{equation} +So we can write: +\begin{equation} +(I \otimes H) CZ(I\otimes H) = |0\rangle \langle0| \otimes HIH + |1\rangle \langle1| \otimes HZH = |0\rangle \langle0| \otimes I + |1\rangle \langle1| \otimes X. +\end{equation} +That is to say, an operation that performs the $X$ operation on the second qubit if the first qubit is in the $|1\rangle$ state (and nothing if the first qubit is in the $|0\rangle$ state). This is, of course, exactly the $CX$ gate which we are looking for.
+",8141,,,,,11/22/2019 16:17,,,,1,,,,CC BY-SA 4.0 +8908,1,,,11/22/2019 18:05,,6,2065,"I'm interested in quantum computing, specifically in “quantum machine learning” (QML). I'm going to start my masters program in computer science and have previous experience in classical machine learning. I'd like to learn quantum mechanics generally but focus on quantum algorithms.
+ +I have read about Qiskit and Pennylane, but I'm unsure where to look next. Could you recommend books, courses, and papers to gain background into QML? My goal is to use Qiskit and Pennylane to develop QML algorithms in NISQ systems for data science and big data.
+ +Another question - can we use quantum computing to develop Bayesian deep learning models (Gaussian processes, bayesian quantum circuits) for data science and big data? Thanks in advance.
+",9226,,1859,,10/8/2022 21:06,10/8/2022 21:06,Pennylane and Qiskit for quantum machine learning,,3,1,,,,CC BY-SA 4.0 +8909,2,,8908,11/22/2019 21:57,,6,," Have a look at these for quantum machine learning:
+ ++
+",9118,,9118,,11/24/2019 18:32,11/24/2019 18:32,,,,0,,,,CC BY-SA 4.0 +8910,2,,8862,11/23/2019 6:16,,2,,"- Supervised learning with quantum computers by Schuld and Petruccione (2018)
+- An introduction to quantum machine learning by the same authors of the textbook above
+- Quantum machine learning published in Nature 2017 by some experts in the field: Wittek, Rebentrost, Lloyd, et al
+- Video presentations by Dr. Schuld and Dr. Wittek on quantum machine learning
+- Quantum bayesian deep learning for Qiskit is discussed +here
+You can found some interesting approaches to decomposing gates also here: https://arxiv.org/abs/quant-ph/9503016 (Elementary gates for quantum computation).
+",9006,,,,,11/23/2019 6:16,,,,0,,,,CC BY-SA 4.0 +8911,2,,8742,11/23/2019 17:58,,1,,"We can proceed by applying the parity check matrix $H_2$ for $C_2^\perp$ on the ancilla, which would become $\vert H_2(z'+e_2)\rangle =\vert H_2(z'+u + e_2 -u)\rangle =\vert H_2(e_2-u)\rangle$. Measuring the ancilla gives us $H_2(e_2-u)$. As $u$ is known. we then know $H_2 e_2$, and in turn $e_2$. +After correcting the now bit flip $e_2$, we have: +$$\dfrac{1}{\sqrt{2^n/\vert C_2\vert}}\sum_{z'+u\in C_2^{\perp}}(-1)^{(x+v)z'}|z'\rangle \label{eq:1}\tag{$\star$}$$ +We then re-apply Hadamard gates to each qubit of $\eqref{eq:1}$, which is equivalent to applying Hadamard gates to the state on the final line of the question $$\dfrac{1}{\sqrt{2^n/\vert C_2\vert}}\sum_{z'+u\in C_2^{\perp}}(-1)^{(x+v)z'}|z'+e_2\rangle$$ with $e_2=0$. Hadamard gates are self-inverse, so we get back $$\dfrac{1}{\sqrt{|C_2|}}\sum_{y\in C_2}(-1)^{u\cdot y}(-1)^{(x+y+v)\cdot 0}\vert x+y+v\rangle $$ which is the original encoded state: +$$\dfrac{1}{\sqrt{|C_2|}}\sum_{y\in C_2}(-1)^{u\cdot y}\vert x+y+v\rangle $$
+",7460,,7460,,11/23/2019 18:08,11/23/2019 18:08,,,,0,,,,CC BY-SA 4.0 +8912,1,8934,,11/23/2019 18:36,,8,601,"I noticed that approaches for finding quantum algorithms the hidden subgroup problem for both Abelian groups ($(\Bbb Z_n\times \Bbb Z_n, +)$, $(\Bbb R, +)$, etc.) and non-Abelian finite groups like the dihedral group and symmetric group often use representation theory.
+ ++
+",26,,,,,11/25/2019 16:05,Why does representation theory often arise in the context of quantum algorithms for the hidden subgroup problem?,- +
Why is this the case? How's it helpful?
- +
What are some resources for where I can learn sufficient representation theory to at least get started with understanding such algorithms? (I'm not in a position to read a heavy grad-level math textbook on representation theory.)
,1,1,,,,CC BY-SA 4.0 +8913,2,,8908,11/23/2019 22:37,,3,," Since quantum machine learning with NISQ hardware is such a relatively new field, it is still very highly research driven, and a lot of the potential is still being determined.
+ +To make these new research implementations more accessible, we've begun building implementations over at https://pennylane.ai/qml. Interesting ones include:
+ + + +These implementations are executable, and can be downloaded as Python scripts or Jupyter notebooks. Our goal is to keep regularly adding new implementations and demos (the repository behind the website is also open-source at https://github.com/XanaduAI/qml, so anyone can contribute demos).
+",371,,,,,11/23/2019 22:37,,,,0,,,,CC BY-SA 4.0 +8914,1,,,11/24/2019 3:17,,5,331,"For $q=e^{2 \pi i/3}$, the set of $d^2$ vectors ($d=3$) +\begin{equation} +\left( +\begin{array}{ccc} + 0 & 1 & -1 \\ + 0 & 1 & -q \\ + 0 & 1 & -q^2 \\ + -1 & 0 & 1 \\ + -q & 0 & 1 \\ + -q^2 & 0 & 1 \\ + 1 & -1 & 0 \\ + 1 & -q & 0 \\ + 1 & -q^2 & 0 \\ +\end{array} +\right) +\end{equation}
+ +forms a SIC-POVM (symmetric, informationally complete, positive operator-valued measure), as noted in eq. (1) of https://arxiv.org/abs/1109.6514 .
+ +I would similarly like to have a 16-vector counterpart for $d=4$ (to use for entanglement detection--per https://arxiv.org/abs/1805.03955). (There is clearly a huge amount of interesting related literature on such topics, but an attempt of mine to find an explicit d=4 counterpart somewhere within it has so far not been successful.)
+",3089,,55,,8/22/2020 5:57,8/22/2020 5:57,Give an explicit example of a $d = 4$ SIC-POVM,,2,2,,,,CC BY-SA 4.0 +8915,2,,8837,11/24/2019 7:49,,2,," If I understand you correctly, your goal is:
+ ++
+ +- +
To choose some quantum algorithm (your question is: which algorithm would be good?)
- +
Instead of running the quantum algorithm on a real quantum computer, you want to run a simulation of a quantum computer on a classical computer to simulate the execution of the quantum algorithm.
- +
You want to optimize your classical simulator to make efficient use of the special capabilities offered by a High Performance Cluster (e.g. parallelism) and demonstrate that the simulation runs faster.
If so, it really does not matter which quantum algorithm you choose, as long as it involves many qubits and many gates.
+ +You are probably best off choosing some very well-known algorithm that is well described in the literature, e.g. Grover or Shor.
+ +Your simulation will involve multiplying very large matrices with each other.
+ +The more qubits, the larger the matrices. The growth is exponential: if you have $N$ qubits, you will be multiplying $2^N$ by $2^N$ matrices.
+ +The more gates, the more multiplications.
+ +You will make life easier on yourself if you assume the qubits are perfect (no noise, no errors).
+ +Since the main point of your exercise is to parallelize some code for an HPC, it probably doesn't matter that the simulation is less realistic.
+",4733,,4733,,11/25/2019 7:10,11/25/2019 7:10,,,,0,,,,CC BY-SA 4.0 +8917,1,8919,,11/24/2019 10:02,,7,463,"I have already posed the question on Math SE but I hope that people from QC community can help. I am starting studying QC, but first, I want to understand the classical view of algorithms. So in the following my question:
+Here is the description of Deutsch-Jozsa problem: Let $f:\{0,1\}^n↦\{0,1\}$ be a function promised to be either constant or balanced ('balanced' means that f outputs as many $0$'s as $1$'s). Imagine that you try $k$ inputs (out of the $2^n$ available) and consistently find the same output. What is the probability that the function is actually constant? This link gives an answer as $1-1/2^{k-1}$. I am not able to reproduce this result and I have a prior question: how can the result not depend on $n$? Obtaining 5 equal results has a very different meaning if $n=10$ or $n=100$ isn't it?
+",9243,,2927,,4/27/2021 23:02,4/27/2021 23:02,Probability estimate in classical Deutsch-Jozsa problem,,2,0,,,,CC BY-SA 4.0 +8918,2,,8917,11/24/2019 11:22,,3,," Indeed, the formula assumes that $n=\infty$, and is approximately correct if $2^n \gg k$
+",2105,,,,,11/24/2019 11:22,,,,1,,,,CC BY-SA 4.0 +8919,2,,8917,11/24/2019 12:17,,5,,"Yes, it will depend on $n$ because sampling with replacement is assumed in the proof, which doesn't make sense if $n$ is finite. Intuitively, if a function $f$ really is balanced, and first output corresponding to certain random input is $0$ or $1$, then the probability that the second output corresponding to some other random input will be the same is less than $\frac{1}{2}$ (if $n < \infty$). The formula you state only gives a lower bound which is approached as $n\to\infty$. In general, $k=2^{n-1}+1$ inputs is sufficient to prove whether $f$ is constant or balanced, assuming it's guaranteed to be one of the two. As explained in the linked answer, without assuming replaceability, a tighter lower bound would have been $$\frac{2\binom{2^{n-1}}{k}}{\binom{2^{n}}{k}} = 1-\prod_{i=1}^{k-1} \left(\frac{2^{n-1}-i}{2^n-i}\right).$$ Notice that this becomes equivalent to your formula for $n\to\infty$ i.e., +$$\lim_{n\to\infty} 1-\prod_{i=1}^{k-1} \left(\frac{2^{n-1}-i}{2^n-i}\right) = 1 - \frac{1}{2^{k-1}}.$$
+ +Perhaps even better bounds can be found depending on the specific nature of $f$; I'll think about it.
+",26,,26,,11/24/2019 13:48,11/24/2019 13:48,,,,0,,,,CC BY-SA 4.0 +8920,2,,8914,11/24/2019 13:35,,3,,"You can find it here Symmetric Informationally Complete Quantum Measurements or here SIC-POVMs: A new computer study, in the appendix B.
+ +Update
+ +Given a single fiducial vector $v = (a_1,a_2,a_3,a_4)^T \in \mathbb{C}^4$ it's pretty easy to write down all SIC-POVM vectors. They are just $C^kS^lv$ for $k,l \in \{0..3\}$, where $C$ and $S$ are clock and shift matrices given by +$$ +C = \begin{pmatrix} +1 & 0 & 0 & 0 \\ +0 & i & 0 & 0 \\ +0 & 0 & -1 & 0 \\ +0 & 0 & 0 & -i \\ +\end{pmatrix}, ~~~ +S = \begin{pmatrix} +0 & 0 & 0 & 1 \\ +1 & 0 & 0 & 0 \\ +0 & 1 & 0 & 0 \\ +0 & 0 & 1 & 0 \\ +\end{pmatrix}. +$$
+ +So $C^kS^lv = (a_{1-l},i^ka_{2-l},(-1)^ka_{3-l},(-i)^ka_{4-l})^T$, where $a_0 = a_4$, $a_{-1} = a_3$, etc.
+ +
+Note that a phase of any SIC-POVM vector doesn't matter.Update 2
+ +A simple formula for all 16 vectors can be found here, eq (32)
+",5870,,5870,,11/25/2019 18:58,11/25/2019 18:58,,,,8,,,,CC BY-SA 4.0 +8921,1,8922,,11/24/2019 14:40,,4,779,"
+The non-normalized fiducial vector is just +$$ +\left( \begin{array}{c} +\sqrt{2+\sqrt{5}} \\ +1 \\ +1 \\ +1 +\end{array} \right) +$$ +but we must change the matrices $C$ and $S$ to correctly generate 16 vectors: +$$ +C = e^{i\pi/4}\begin{pmatrix} +0 & 1 & 0 & 0 \\ +-i & 0 & 0 & 0 \\ +0 & 0 & 0 & -i \\ +0 & 0 & -1 & 0 \\ +\end{pmatrix}, ~~~ +S = e^{i\pi/4}\begin{pmatrix} +0 & 0 & 1 & 0 \\ +0 & 0 & 0 & 1 \\ +-i & 0 & 0 & 0 \\ +0 & i & 0 & 0 \\ +\end{pmatrix}. +$$I know that there are papers (cf. arXiv:quant-ph/0205115) out there which prove that the Toffoli gate by itself is not enough for universal quantum computation, but I haven't had the time to go through the whole proof. Could someone give me the crux of the proof or the intuition for this?
+",26,,,,,11/24/2019 14:57,Why is the Toffoli gate not sufficient for universal quantum computation?,,1,0,,,,CC BY-SA 4.0 +8922,2,,8921,11/24/2019 14:57,,9,," The Toffoli gate is just a permutation. If you start in a known basis state, application of a Toffoli just changes it into another basis state, one that you can easily calculate classically (after all, it’s a decision based on looking at 3 bit values). Repeating that doesn’t change anything.
+ +To make it universal, you need to add something like Hadamard which introduces superposition.
+",1837,,,,,11/24/2019 14:57,,,,0,,,,CC BY-SA 4.0 +8923,1,,,11/25/2019 4:48,,4,143,"Is it possible to tell Qiskit to execute a parameterized gate where the parameter varies between shots?
+ +Let's say, for whatever reason, I'd like to speed up the dephasing of a qubit during a run. I can accomplish this by explicating implementing the dephasing Kraus operators by using an $R_x(\phi)$ gate, a controlled $Z$ gate and an ancilla qubit. However, this adds a decent amount of complexity, and thus error, to my circuit.
+ +A more clever way to do it is to add an $R_z(\theta)$ gate into the circuit, where $\theta$ is drawn from a normal distribution and thus varies shot to shot. This would mean the circuit would need to be reassembled from the parameterized transpilation each shot, which makes me think it's probably not possible. But I wanted to ask just in case.
+ +I can always do a series of single shot experiments, but I believe the backend (not to mention other users) might have an issue with me submitting thousands of single shot jobs.
+ +So is there any way to implement a circuit which has a parameter which varies from shot to shot?
+",7701,,,,,9/28/2020 16:39,Vary parameter between shots,,1,2,,,,CC BY-SA 4.0 +8924,1,,,11/25/2019 6:05,,4,122," I am going through different types of attacks that eve can perform on the quantum channel. I came across the intercept-resend attack and measure-resend attack. What is the difference between the two?
+ +According to my view,
+ ++
+ +- measurement attack - Eve measures the particles going from Alice to Bob as in BB84 protocol
+- intercept-resend - Eve can apply a unitary operation
+Am I correct?
+",8620,,26,,11/25/2019 13:45,11/25/2019 13:45,What is the difference between intercept-resend attack and measure-resend attack?,,0,0,,,,CC BY-SA 4.0 +8925,1,8926,,11/25/2019 10:44,,0,54," I'm searching for a good quantum algorithm to approximate Chaitin's Constant. Any references/resources will do?
+ +Note: This number is uncomputable.
+",5045,,26,,11/25/2019 13:25,11/25/2019 13:25,Algorithm to approximate Chaitin's Constant?,,1,0,,,,CC BY-SA 4.0 +8926,2,,8925,11/25/2019 11:03,,3,," Any quantum algorithm to approximate Chaitin's constant (or any other number) will also yield a classical algorithm to approximate that same number, just by simulating the quantum computer. (It won't be a great classical algorithm, but it's still an algorithm.)
+ +As Chaitin's constant provably doesn't admit such a classical algorithm, it also doesn't admit a quantum algorithm either.
+",124,,,,,11/25/2019 11:03,,,,3,,,,CC BY-SA 4.0 +8927,1,8928,,11/25/2019 11:56,,2,65,"I am a beginner in quantum computing. Please consider the following scenario:
+ +Suppose Alice wants to send +$\frac{1}{\sqrt{N}}\sum_{j=0,1,2,..N-1} |j\rangle$ to Bob.
+ +Eve has intercepted the state and want to do the following operation - add his $|0_{\text{Eve}}\rangle$ and get $$\frac{1}{\sqrt{N}}\sum_{j=0,1,2,..N-1} |j\rangle |0_{\text{Eve}}\rangle$$
+ +Next he wants to apply apply Unitary Transformation $$U|j\rangle|0_{\text{Eve}}\rangle = |j\rangle|j\rangle$$ and convert the state to $|0_{\text{Eve}}\rangle$ and get $$\frac{1}{\sqrt{N}}\sum_{j=0,1,2,..N-1} |j\rangle |j\rangle$$
+ +Does such unitary operation/transformation exist? if no is it because conflicting no-cloning theorem that you cannot copy a state as it is?
+",8620,,55,,7/26/2020 18:19,7/26/2020 18:19,Can Eve perform this operation?,,2,0,,,,CC BY-SA 4.0 +8928,2,,8927,11/25/2019 12:46,,1,," It does exist. It's basically the controlled-not gate generalised to higher dimensional systems.
+ +The important thing to realise is that means that the bit that Bob ends up with will be highly entangled with what Eve has, and that will have significant observable consequences. As part of a cryptographic protocol, for exampe, Bob could detect that Eve is doing this before sending any sensitive informaiton.
+",1837,,,,,11/25/2019 12:46,,,,0,,,,CC BY-SA 4.0 +8929,2,,8927,11/25/2019 12:58,,1,,"Please be careful with your notation; don't get confused with the number of qubits that are in $|0_{Eve}\rangle$ (I'm not necessarily saying that you are - just mentioning this as a precaution). Since the state $|\psi\rangle = \frac{1}{\sqrt{N}}\sum_{j \in 0,1,2....N-1}|j\rangle$ that Alice wants to send is a $n$-qubit state with $N=2^{n}$, Alice needs to send $n$ qubits to Bob - possibly via Eve. Therefore, the state $|0_{Eve}\rangle$ that you describe is a $n$-qubit state as well.
+ +A unitary $U$ that copies the state $|\psi\rangle$:
+ +The $2n$-qubit unitary that you describe is possible, but on the presumption that Eve knows exactly what Alice will send. Then, a series of $n$ $CX$ gates from the $i$th qubit to the $(i+n)$th qubit will suffice - it will copy any state $|j\rangle$ in the first $n$ qubit to the second $n$ qubits, thereby obtaining the total state $|j\rangle \otimes |j\rangle$. By linearity, it also copies a superposition of different $|j\rangle$-states. So we have: +\begin{equation} +U_{copy} = \sum_{i\in \{1,2...n\}}CX^{(i,i+n)}, +\end{equation}
+ +where $CX^{(i,i+n)}$ is the CNOT operation with qubit $i$ as the control qubit and qubit $(i+n)$ as the target qubit.
+ +A unitary that copies any state $|\phi\rangle$:
+ +However, if Eve does not know what state Alice sends, there is no unitary that will perform the task (of copying a unknown $n$-qubit state $|\phi\rangle$ into the second $n$ qubits). The proof of impossibility is straightforward via the condition that the operation needs to be linear; for a proof see a proof of the no cloning theorem, which applies here.
+",8141,,8141,,11/25/2019 13:46,11/25/2019 13:46,,,,0,,,,CC BY-SA 4.0 +8930,1,8952,,11/25/2019 13:25,,5,850,"In Quantum Computation and Quantum Information by Nielsen and Chuang, the authors introduce operator sum representation in Section 8.2.3. They denote the evolution of a density matrix, when given an environment, is the following:
+ +$$\varepsilon (\rho) = \mathrm{tr}_{\text{env}} [U(\rho\otimes \rho_{\text{env}})U^\dagger]$$
+ +Where you are essentially taking the trace to discard the environment of the unitary evolution of the entire system. What I don't understand is how the operator sum representation is equivalent (Equations 8.9 and 8.11 in N&C)
+ +$$\varepsilon (\rho) = \sum_k \langle \mathbf{e}_k|U[\rho \otimes |\mathbf{e}_0\rangle \langle \mathbf{e}_0|]U^\dagger|\mathbf{e}_k\rangle = \sum_k E_k\rho E_k^\dagger$$
+ +In this equation, I take $|\mathbf{e}_k\rangle$ to represent the basis of the system and U to be a 4 x 4 unitary matrix governing the evolution. How is this equivalent to the first equation where you discard the trace? It seems like the second equation (equation 8.9 in N&C) above would yield a scalar quantity. What does this equation mean? I understand the first equation where you take the partial trace, but how does partial trace relate to the 2nd and 3rd equations? I'm a relative beginner in this field.
+",9254,,55,,2/19/2021 18:30,2/19/2021 18:30,How is the partial trace related to the operator sum representation?,,3,1,,2/20/2021 20:27,,CC BY-SA 4.0 +8931,2,,8930,11/25/2019 13:33,,2,," $|e_k\rangle$ is the basis of the environment. Taking the sum of projections onto an orthonormal basis of one subsystem is the definition of the partial trace over that subsystem.
+",1837,,,,,11/25/2019 13:33,,,,6,,,,CC BY-SA 4.0 +8934,2,,8912,11/25/2019 16:05,,5,,"Two classical texts for the representation theory of finite groups are the books of Hamermesh and Serre. These books however lack chapters on Fourier analysis needed for the quantum computation applications.
+ +For a more modern text for finite group representations which includes a chapter on Fourier analysis, please see the lecture notes by: Steinberg.
+ +However, for a fast introduction, quite sufficient for the quantum computation applications, there are very concise texts: in Enrique Alvarez lecture notes (Chapter 9, in first reading one can skip the representation theory of $S_N$ and study the 17 pages 79-95 only), and in chapter 2 of the lecture notes by Willwacher.
+ +Since these concise resources also lack the subject of Fourier analysis, you can read the 5 pages of chapter 3 of Shengyu Zhang quantum computing course giving an introduction to the group theory needed for the hidden subgroup problem.
+ +In the hidden subgroup problem, we are given a function $f: G \rightarrow S$ ($S$ is a finite set) which is invariant on the cosets of some subgroup $H$ of $G$; i.e., $f(g) = f(gh), \,\, h\in H$; and we want to identify the subgroup $H$.
+ +Representation theory appears because every function on a finite group $G$ can be written as a linear combination of the matrix elements of its irreducible representations; and we need to identify the representations appearing in the function $f$. We do so by preparing a state: +$$\sum_G |g, f(g)\rangle$$ +(This state is efficiently preparable, when there is an efficient oracle for the computation of $f$). If we measure the second register, we are left with a uniformly weighted combination of group elements belonging to the coset corresponding to the measured values of $f$: +$$\sum_H |ch\rangle$$ +($c$ is any element in this coset).
+ +Let $\rho$ be an irreducible representation of $G$, then $\rho$ is a matrix function of $G$ of dimension $d_{\rho} \times d_{\rho}$; the quantum Fourier transform, transforms a group vector $|g\rangle$ to:
+ +$$\sum_{\rho \in \hat{G}} \sum_{i=1}^{d_{\rho}}\sum_{j=1}^{d_{\rho}}\sqrt{\frac{d_{\rho}}{|G|}} \rho(g)_{ij} |i, j, \rho\rangle$$
+ +Where $\hat{G}$ is the set of irreducible representations, (which is in a one to one correspondence with the conjugacy classes of $G$).
+ +In order to appreciate the role of the Fourier transform, please consider the case of $\mathbb{Z}_N = \{ z_0, …, z_{N-1}\}$. Since $\mathbb{Z}_N$ is Abelian all its irreducible representations are one dimensional given by:
+ +$$\rho_m (z_n) = e^{\frac{2 \pi i mn}{N}}$$
+ +This is the kernel of the usual Fourier transform. $m$ is the representation index and $n$ is the group element index. We know that if we perform a Fourier transform of the function $\rho_m$, we get a peaked function at $m$ by which we identifiy the representation $m$.
+ +In the general case when we measure the $\rho$ register in $|i, j, \rho\rangle$, we get with a high probability a representation appearing in $f$, thus by repeating the experiment, we get with a high probability all representations having $H$ in their kernel and we can identify $H$ as their mutual kernel.
+ +Please see the following https://arxiv.org/abs/0812.0380v1 work by Childs and Dam reviewing cases where the above standard method and other improved methods lead to efficient hidden subgroup identification in the non-Abelian cases.
+",4263,,,,,11/25/2019 16:05,,,,0,,,,CC BY-SA 4.0 +8935,1,8938,,11/25/2019 16:43,,6,735,"Qiskit Aqua has a module that implements the HHL algorithm:
+ +https://qiskit.org/documentation/_modules/qiskit/aqua/algorithms/single_sample/hhl/hhl.html
+ +How does one draw the implemented circuit?
+ +* EDIT * +I'm working with an example from the github. I modified it as follows:
+ ++ +# +# Example from +# https://github.com/Qiskit/qiskit-iqx-tutorials/blob/master/qiskit/advanced/aqua/linear_systems_of_equations.ipynb +# + + +from qiskit.aqua import run_algorithm +from qiskit.aqua.input import LinearSystemInput +from qiskit.quantum_info import state_fidelity +from qiskit.aqua.algorithms.classical import ExactLSsolver +import numpy as np + + +params = { + 'problem': { + 'name': 'linear_system' + }, + 'algorithm': { + 'name': 'HHL' + }, + 'eigs': { + 'expansion_mode': 'suzuki', + 'expansion_order': 2, + 'name': 'EigsQPE', + 'num_ancillae': 3, + 'num_time_slices': 50 + }, + 'reciprocal': { + 'name': 'Lookup' + }, + 'backend': { + 'provider': 'qiskit.BasicAer', + 'name': 'statevector_simulator' + } +} + +# The 2 x 2 System to solve +# + + +matrix = [[1, 0], [0, 2]] +vector = [1, 4] +params['input'] = { + 'name': 'LinearSystemInput', + 'matrix': matrix, + 'vector': vector +} + + +# Run the HHL Algorithm +result = run_algorithm(params) +
+ +
result
is the following:+ +{'probability_result': 0.024629684664855277, + 'output': array([0.46919178+0.00000000e+00j, 0.8830963 -6.70000184e-15j]), + 'solution': array([1.05859322-8.03148712e-15j, 1.99244701-3.02331663e-14j]), + 'matrix': array([[1, 0], + [0, 2]]), + 'vector': array([1, 4]), + 'circuit_info': {'size': 28870, + 'depth': 28820, + 'width': 7, + 'qubits': 7, + 'bits': 0, + 'factors': 1, + 'operations': {'u3': 6011, + 'u1': 8021, + 'cx': 14066, + 'barrier': 700, + 'u2': 6, + 'cu3': 42, + 'x': 24} + } +} +
I tried the following
+ ++ +
HHL.construct_circuit(result.circuit_info).draw()
but that resulted in
+ ++ +--------------------------------------------------------------------------- +NameError Traceback (most recent call last) +<ipython-input-13-4cf1b322ed4c> in <module> +----> 1 HHL.construct_circuit(result.circuit_info).draw() + +NameError: name 'HHL' is not defined +
So it may very well be that I didn't import something or that I just don't understand the syntax for the HHL.
+ +So how should I form the instructions to generate the circuit? (I'm not very good at python so if this question is trivial, I do apologize.) I checked the qiskit documentation but I couldn't understand it well. It didn't give an explicit example so if there's something I need to learn to be able to do this, please let me know. Thank you for your time.
+",9258,,26,,11/26/2019 12:06,10/8/2020 16:37,How to draw Qiskit's HHL algorithm as a circuit?,,2,0,,,,CC BY-SA 4.0 +8936,1,8956,,11/25/2019 17:19,,6,113," I want to build a circuit that performs the following operation: +$$ +U_f = \left(\begin{array}{cccccccccc} +1 & 0 & 0 & \dots & \dots & \dots & \dots & \dots & \dots & 0 \\ +0 & 1 & 0 & & & & & & & \vdots\\ +0 & 0 & 1 & & & & & & & \vdots \\ +\vdots & & & \ddots & & & & & & \vdots \\ +\vdots & & & & 0 & 1 & & & & \vdots \\ +\vdots & & & & 1 & 0 & & & & \vdots \\ +\vdots & & & & & & \ddots & & & \vdots \\ +\vdots & & & & & & & 1 & 0 & 0 \\ +\vdots & & & & & & & 0 & 1 & 0 \\ +0 & \dots & \dots & \dots & \dots & \dots & \dots & 0 & 0 & 1 +\end{array}\right) +$$ +but I don't know the equivalent gate combination, and I have never seen such a matrix on any book.
+ +So I am curious about how one could build this circuit, and generally, given a matrix, if there is any general procedure of decomposing it in gates or deriving the circuit.
+",6245,,26,,11/25/2019 19:07,11/26/2019 19:08,How to construct a circuit to perform this operation? Is there a general way of getting a circuit from a matrix?,,2,1,,,,CC BY-SA 4.0 +8938,2,,8935,11/25/2019 19:12,,6,," You can draw the circuit using
+ +construct_circuit().draw()
.In the tutorial you are talking about, if you scroll down to the 4x4 randomly generated section that uses
+ +params5
you can runprint(hhl.construct_circuit())
, after the linehhl = HHL.init_params(params5, algo_input)
.This may take a little while to complete but it should eventually print out ASCII art of the circuit. Other drawing options can be configured using
+ +.draw()
.NB this isn't to say that you can't draw any of the other circuits, if you follow the way the HHL object is created in this section you can draw any of the configurations specified by the params. For example, you could draw the circuit you are creating using
+ ++",5955,,5955,,11/25/2019 20:37,11/25/2019 20:37,,,,7,,,,CC BY-SA 4.0 +8940,2,,8914,11/25/2019 20:27,,4,,"from qiskit.aqua.input import LinearSystemInput +from qiskit.aqua.algorithms.single_sample import HHL +algo_input = LinearSystemInput(matrix=matrix, vector=vector) +hhl = HHL.init_params(params, algo_input) +
As indicated by Danylo in his anwser, eq. (32) in arXiv: 1103.2030 +presents the sixteen vectors (""ignoring overall phases and normalisation"") +\begin{equation} +\left( +\begin{array}{cccc} + x & 1 & 1 & 1 \\ + x & 1 & -1 & -1 \\ + x & -1 & 1 & -1 \\ + x & -1 & -1 & 1 \\ + i & x & 1 & -i \\ + i & x & -1 & i \\ + -i & x & 1 & i \\ + -i & x & -1 & -i \\ + i & i & x & -1 \\ + i & -i & x & 1 \\ + -i & i & x & 1 \\ + -i & -i & x & -1 \\ + i & 1 & -i & x \\ + i & -1 & i & x \\ + -i & 1 & i & x \\ + -i & -1 & -i & x \\ +\end{array} +\right), +\end{equation} +where +\begin{equation} +x=\sqrt{2+\sqrt{5}}. +\end{equation} +These form ""a set of 16 SIC-vectors covariant under the Heisenberg group"".
+ +To now normalize the vectors we need to multiply them by $\frac{1}{\sqrt{5+\sqrt{5}}}$. The resultant sixteen vectors $|\psi_i\rangle$ satisfy the desired relation +($d=4$) +\begin{equation} +|\langle\psi_i||\psi_j\rangle|^2 = \frac{d \delta_{ij}+1}{d+1}, i,j=1,2,\ldots, d^2 , +\end{equation} +given in eq. (7) in arXiv: 1805.03955, giving us the explicit set requested in the question.
+",3089,,26,,11/26/2019 12:17,11/26/2019 12:17,,,,0,,,,CC BY-SA 4.0 +8941,1,,,11/25/2019 23:55,,1,121,"I am currently trying to understand HHL by implementing a very inefficient Qiskit simulation script that performs HHL on an arbitrary hermitian matrix $A$ and a vector $b$.
+ +Because I am currently only attempting to understand the higher-level workings of the HHL algorithm itself, I am cheating and just using Qiskit simulator features to implement the operators $e^{iAt/T}$ and to 'prepare' $|b>$
+ +So far, I am trying to get it to work on two examples: the HHL example here and the problem done in this paper. It works as expected on the former, but not on the latter. This makes me wonder if i am correctly implementing the operators $e^{iAt/T}$ used in the QPE section of HHL.
+ +So my question is whether I am implementing $e^{iAt/T}$ correctly or not. +I have written a function that takes a hermitian matrix, exponentiates it using the scipy function expm, adds a control to this matrix, and then turns it into an operator using the Qiskit Operator function.
+ +Does this function return the intended unitary operator, $e^{iAt/T}$? If it is ill-conceived, why?
+ ++",4943,,26,,11/26/2019 12:05,11/26/2019 12:05,Exponentiating Hermitian Matrix for use in QPE/HHL,from qiskit.quantum_info.operators import Operator +from scipy.linalg import expm + +def hermitian_to_controlled_U(hermitian_matrix,T): + U_matrix = expm(2j*pi*hermitian_matrix/T) + + # add control + M0 = np.asarray([[1,0],\ + [0,0]]) + M1 = np.asarray([[0,0],\ + [0,1]]) + I = np.eye(np.shape(hermop)[0]) + controlled_U_matrix = np.kron(M0,I)+np.kron(M1,U_matrix) + + controlled_U_gate = Operator(controlled_U_matrix) + + return controlled_U_gate +
,0,0,,,,CC BY-SA 4.0 +8943,1,,,11/26/2019 0:21,,2,92," I am really puzzled when it comes to the construction of a stabilizer code. By that, I mean how to come up with the subgroup $S$ and the matrix generators $M= \{M_1, M_2, \cdots, M_{n-k}\}$? In classical error correcting codes, there is a generator matrix $G$ where each row is linearly independent and from there, you can find the codewords.
+ +Though stabilizer code deals with operators rather the state itself, what is the process?
+ +I found this that might be relatable: +Given $n-k$ stabiliser generators, how can we find an additional $k$ commuting generators?
+",7528,,7528,,11/26/2019 20:33,11/26/2019 20:33,The process behind constructing a Stabilizer Code?,,0,1,,,,CC BY-SA 4.0 +8944,2,,8935,11/26/2019 5:07,,2,," The credit for this answer goes to met927 in the previous post. So please upvote that answer instead of this one. met927's response answered my question. Not setting up some of the parameters to make system draw faster was my error. So thank you met927 for responding quickly and answering my question!
+ +Below is a snippet that one can run quite quickly (less than a minute).
+ ++ +########################################################### +# +# +# met927's response incorporated into the github example +# +# +########################################################### + + +from qiskit.aqua import run_algorithm +from qiskit.aqua.input import LinearSystemInput +from qiskit.aqua.algorithms.single_sample import HHL + +import numpy as np + +# System to solve +# A = [[1.5, 0.5], [0.5, 1.5]] +# b = [2, 2] + +matrix = [[1.5, 0.5], [0.5, 1.5]] +vector = [2, 2] + +params = { + 'problem': { + 'name': 'linear_system' + }, + 'algorithm': { + 'name': 'HHL' + }, + 'eigs': { + 'expansion_mode': 'suzuki', + 'expansion_order': 2, + 'name': 'EigsQPE', + 'num_ancillae': 3, + 'num_time_slices': 50 + }, + 'reciprocal': { + 'name': 'Lookup' + }, + 'backend': { + 'provider': 'qiskit.BasicAer', + 'name': 'statevector_simulator' + } +} + +params['input'] = { + 'name': 'LinearSystemInput', + 'matrix': matrix, + 'vector': vector +} + +params['algorithm'] = { + 'truncate_powerdim': False, + 'truncate_hermitian': False +} +params['reciprocal'] = { + 'name': 'Lookup', + 'negative_evals': True +} +params['eigs'] = { + 'expansion_mode': 'suzuki', + 'expansion_order': 2, + 'name': 'EigsQPE', + 'negative_evals': False, + 'num_ancillae': 1, + 'num_time_slices': 70 +} +params['initial_state'] = { + 'name': 'CUSTOM' +} +params['iqft'] = { + 'name': 'STANDARD' +} +params['qft'] = { + 'name': 'STANDARD' +} + + +# Prep the input +algo_input = LinearSystemInput(matrix=matrix, vector=vector) + +# Run the HHL algorithm +hhl = HHL.init_params(params, algo_input) + +# Draw the circuit +print(hhl.construct_circuit()) +
It draws an ascii circuit. I just wanted to know how to get the routine to draw the circuit. Thanks again met927.
+",9258,,,,,11/26/2019 5:07,,,,0,,,,CC BY-SA 4.0 +8945,1,8946,,11/26/2019 7:32,,3,787,"Suppose I share two Bell states among two participants Alice and Bob in the following manner : +$$ |\psi\rangle=\left(\dfrac{|0\rangle_1|0\rangle_2+ |1\rangle_1|1\rangle_2}{\sqrt{2}}\right)\left(\dfrac{|0\rangle_3|0\rangle_4+ |1\rangle_3|1\rangle_4}{\sqrt{2}}\right) $$ +Now suppose Alice has qubits $(1,4)$ and Bob has $(2,3)$. I want to find out the density matrices corresponding to Alice, Bob, and combined.
+ +For the first case should I calculate $|\psi\rangle\langle\psi|$, what should be done, in case there was only one Bell pair shared between Alice and Bob, I would have done $$ \rho_A = \mathrm{Trace}_B(\rho)$$ can this be generalized when there are more than one Bell pair shared in the sense that I have shared? +Can somebody help?
+",6070,,26,,11/26/2019 12:04,11/27/2019 21:59,Density matrix of a product of Bell states,,2,0,,,,CC BY-SA 4.0 +8946,2,,8945,11/26/2019 8:43,,3,," Yes, the overall density matrix shared between Alice and Bob is $|\psi\rangle\langle\psi|$. To get the desnity matrix of either Alice or Bob, you should calculate +$$ +\text{Tr}_B|\psi\rangle\langle\psi|\qquad\text{Tr}_A|\psi\rangle\langle\psi| +$$ +respectively.
+ +However, in this particular case, the calculation is much simply. Let $|\phi\rangle$ be the Bell pair such that +$$ +|\psi\rangle=|\phi_{12}\rangle|\phi_{34}\rangle. +$$ +Because there's a separable partition between (1,2) and (3,4), this is not changed by the partial trace. Thus +$$ +\text{Tr}_B|\psi\rangle\langle\psi|=\left(\text{Tr}_2|\phi\rangle\langle\phi|\right)\otimes \left(\text{Tr}_3|\phi\rangle\langle\phi|\right). +$$
+ +You imply that you know how to do the partial trace for a single Bell state. The answer is $I/2$. So, we have +$$ +\text{Tr}_B|\psi\rangle\langle\psi|=\frac{1}{4}I\otimes I, +$$ +the maximally mixed state of two qubits. Similarly, +$$ +\text{Tr}_A|\psi\rangle\langle\psi|=\left(\text{Tr}_1|\phi\rangle\langle\phi|\right)\otimes \left(\text{Tr}_4|\phi\rangle\langle\phi|\right)=\frac{1}{4}I\otimes I +$$
+",1837,,,,,11/26/2019 8:43,,,,7,,,,CC BY-SA 4.0 +8947,1,,,11/26/2019 9:35,,-4,126,"I have composed the gate with IBM Q Experience, but I do not know how to set the answer.
+",9242,,26,,11/30/2019 11:48,11/30/2019 11:48,Bernstein-Vazirani algorithm in IBM Q Experience,
+Please tell me how to set it?,1,1,,12/2/2019 12:06,,CC BY-SA 4.0 +8948,2,,8936,11/26/2019 10:25,,3,," I investigated your gate for three different cases:
+ +1) one q-bit: in this case the $U_f$ is simply $X$
+ +2) two q-bits: state $|01\rangle$ is mapped to $|10\rangle$ and conversely, otherwise q-bits are unchanged, so the gate implements q-bits swap
+ +3) three or more q-bits: gate $U_f$ act like this: state $|011...1\rangle$ is mapped to $|100...0\rangle$ and conversely. These states are mutually inverse, i.e. to obtain the second one from the first one, it is sufficient to negate all q-bits. The same is true for obtaining the first state from the second one. In all other cases q-bits are unchanged. Thus it is necessary to introduce an indicator that a quantum register is either in state $|011...1\rangle$ or $|100...0\rangle$. The indicator can be Boolean function $f = \bar{q_0}q_1...q_{n-1} + q_0\bar{q_1}...\bar{q}_{n-1}$. It returns $|1\rangle$ for states $|100...0\rangle$ and $|011...1\rangle$, otherwise it returns $|0\rangle$. Note, that ancilla q-bits are needed. After calculation of the indicator, the result is stored in ancilla bit, other ancillas are uncomputed and CNOT gates controlled by the result of the function $f$ are applied on q-bits $|q_0\rangle$, $|q_1\rangle$...$|q_{n-1}\rangle$.
+ +Please find here a figure of a circuit implementing case 3) for three q-bits. Its expansion for more q-bits is straighforward. Note that I tested the circuit on IBM Q simulator and it works.
+ + +",9006,,9006,,11/26/2019 11:20,11/26/2019 11:20,,,,2,,,,CC BY-SA 4.0 +8949,1,8951,,11/26/2019 10:47,,3,990,"I've recently started reading about quantum computing and I apologize in advance if this is (and I think it probably is) a very simple question.
+ +I've created the following circuit.
+ + + +I believe I understand this circuit. It sends qubit 1 through the Hadamard gate to give it a 50/50 chance of being 0 or 1. The C-NOT gate means, if
+ +q[1]
is 0 thenq[0]
remains 0 and ifq[1]
is 1 thenq[0]
has a not gate applied to make it 1. Therefore, the two qubits are entangled. It does the same to entangleq[1]
andq[2]
and for that reason, when the three are measured it is always 000 or 111 with a 50/50 chance of each. (I may not have understood this part well so if this is wrong, please verify my misunderstanding).I've been fiddling with a similar circuit by adding a Hadamard gate to the third qubit at the beginning which is this circuit producing the below result. +
+ + + +I don't quite understand how those are the four possible results so please can someone explain how this circuit works. Many thanks
+",9263,,26,,11/26/2019 12:38,11/26/2019 12:43,Explanation of output produced by the following quantum circuit,,2,2,,,,CC BY-SA 4.0 +8950,2,,8949,11/26/2019 12:18,,3,," Yes you are absolutely right with your understanding but here is the game: +All the Qubits are starting with the |0> i.e. value 0 until the Hadamard gate is applied. The Hadamard gates just makes the probability of the Qubit being 0 or 1 to be 50-50 i.e $\frac{1}{\sqrt{2}}|\mathbf{0}> + \frac{1}{\sqrt{2}}|\mathbf{1}>$
+ +
+ +Now in the second example you applied H gate to q1 and q2 which gave them the probability of being 0 or 1 to be 50-50. So, lets see all the possible initial states of the Qubits and their values as outputs on measurement first:
+ +
+ ++
+ +- State 1: + +
++
- q0 |0> ---OUTPUT : 0--- |
+- q1 |0> ---OUTPUT : 0--- |
+- q2 |0> ---OUTPUT : 0--- | + +
++Final Output: 000
+- State 2: + +
++
- q0 |0> ---OUTPUT : 1--- |
+- q1 |1> ---OUTPUT : 1--- |
+- q2 |0> ---OUTPUT : 1--- | + +
++Final Output: 111
+- State 3: + +
++
- q0 |0> ---OUTPUT : 0--- |
+- q1 |0> ---OUTPUT : 0--- |
+- q2 |1> ---OUTPUT : 1--- | + +
++Final Output: 100
+- State 4: + +
++
- q0 |0> ---OUTPUT : 1--- |
+- q1 |1> ---OUTPUT : 1--- |
+- q2 |1> ---OUTPUT : 0--- | + +
++Final Output: 011
+
+ +I hope this helps. Please specify if you are still having trouble in understanding.
+",9183,,9183,,11/26/2019 12:43,11/26/2019 12:43,,,,1,,,,CC BY-SA 4.0 +8951,2,,8949,11/26/2019 12:26,,5,,"Note that $H | 0 \rangle = | + \rangle = \frac{1}{\sqrt{2}}(| 0 \rangle + | 1 \rangle)$. +So, after the two Hadamard gates the state will be +$$ +| 0 \rangle \otimes H| 0 \rangle \otimes H| 0 \rangle = \frac{1}{2} | 0 \rangle \otimes (| 0 \rangle + | 1 \rangle)\otimes (| 0 \rangle + | 1 \rangle) = +$$ +$$ += \frac{1}{2} (| 000 \rangle + | 001 \rangle + | 010 \rangle + | 011 \rangle) +$$ +Now after the application of those two CNOT gates the state will be +$$ +\frac{1}{2} (| 000 \rangle + | 001 \rangle + | 111 \rangle + | 110 \rangle) +$$ +The last histogram confirms this (in the 00000 representation the state of q[0] is the far right symbol)
+",5870,,,,,11/26/2019 12:26,,,,0,,,,CC BY-SA 4.0 +8952,2,,8930,11/26/2019 12:44,,4,,"I think it helps here to write things explicitly.
+ +Suppose $\mathcal E(\rho)=\operatorname{Tr}_E[U(\rho\otimes|\mathbf e_0\rangle\!\langle\mathbf e_0|)U^\dagger]$.
+ +Pick a basis for the environment in which $|\mathbf e_0\rangle$ is the first element. Note that here $U$ is a unitary matrix in a bipartite system. The operator before taking the partial trace has matrix elements +$$ + [U(\rho\otimes|\mathbf e_0\rangle\!\langle\mathbf e_0|)U^\dagger]_{ij,k\ell} = + \sum_{\alpha,\gamma} U_{ij,\alpha 0} \rho_{\alpha\gamma} (U^\dagger)_{\gamma0,k\ell} = + \sum_{\alpha,\gamma} U_{ij,\alpha0}\bar U_{k\ell,\gamma0} \rho_{\alpha\gamma}. +$$ +Now notice that the partial trace amounts here to make $j=\ell$ and sum over $j$ (because in this notation the indices $i,k$ refer to the system while $j,\ell$ to the environment), so that we get +$$ + [\mathcal E(\rho)]_{ik} = + \sum_j [U(\rho\otimes|\mathbf e_0\rangle\!\langle\mathbf e_0|)U^\dagger]_{ij,kj} = + \sum_{\alpha\gamma j} U_{ij,\alpha0}\bar U_{kj,\gamma0}\rho_{\alpha\gamma}. +$$ +Notice how this is already essentially an operator sum representation: defining $(E_{j})_{i\alpha}\equiv U_{ij,\alpha0}$, we get +$$[\mathcal E(\rho)]_{ik}=\sum_j (E_j)_{i\alpha} (\bar E_j)_{k\gamma}\rho_{\alpha\gamma} = \left[\sum_j E_j \rho E^\dagger_j\right]_{ik}.$$
+",55,,55,,11/26/2019 13:44,11/26/2019 13:44,,,,3,,,,CC BY-SA 4.0 +8953,1,,,11/26/2019 14:04,,2,277,"Suppose I share three Bell states among two participants Alice and Bob and Charlie in the following manner: +$$ |\psi\rangle=\left(\dfrac{|0\rangle_1|0\rangle_2+ |1\rangle_1|1\rangle_2}{\sqrt{2}}\right)\left(\dfrac{|0\rangle_3|0\rangle_4+ |1\rangle_3|1\rangle_4}{\sqrt{2}}\right)\left(\dfrac{|0\rangle_5|0\rangle_6+ |1\rangle_5|1\rangle_6}{\sqrt{2}}\right) $$ +I want to find out the density matrix for $A$ whos has qubits $(1,4)$ the others have say $(2,3)$ and $(5,6)$. So I first calculate $|\psi\rangle\langle\psi|$ and then take the trace over the particles $(2356)$, Since this is a long computation, we can just notice that the terms whose inner product will be involved are $$\langle0000|\rho|0000\rangle,\langle0100|\rho|0100\rangle, \langle1000|\rho|1000\rangle,\langle1100|\rho|1100\rangle,\langle0011|\rho|0011\rangle,\langle0111|\rho|0111\rangle,\langle1011|\rho|1011\rangle,\langle1111|\rho|1111\rangle,$$ the result I get on calculating this is $$\dfrac{2\left(|0\rangle_1|0\rangle_4\langle0|_1\langle0|_4+|0\rangle_1|1\rangle_4\langle0|_1\langle1|_4+|1\rangle_1|0\rangle_4\langle1|_1\langle0|_4+|1\rangle_1|1\rangle_4\langle1|_1\langle1|_4\right)}{8}=\dfrac{\mathbb{I}\otimes \mathbb{I}}{4} $$ Is this correct? What does this density matrix say about the information that the players have about each others particles?
+",6070,,55,,11/24/2020 14:22,11/24/2020 14:22,Does partial tracing a system with three shared Bell states give the identity?,,2,0,,,,CC BY-SA 4.0 +8954,1,,,11/26/2019 14:40,,3,69," In Boson Sampling as first proposed by Aaronson and Arkhipov in arxiv.org/abs/1011.3245, the interferometer is made up of phase shifters and beamsplitters. As these gates are universal, drawing the interferometer at random (just like in Google's random circuit sampling) gives rise to an approximately Haar-random $m \times m$ unitary $U$ acting on the single photon subspace of the $m$-mode Fock states.
+ +I wonder whether one could also perform BosonSampling with a single beamsplitter. If I understand correctly, a later paper by Aaronson and Bouland arxiv.org/abs/1310.6718 shows that a single non-trivial beamsplitter, say a 50:50 beamsplitter, is universal on the single-photon subspace omitting any extra phaseshifters.
+ +My question is thus to confirm whether I could equally well just draw a sufficiently long (how long?) sequence of 50:50 beamsplitters and make up the interferometer in BosonSampling just out of these?
+ +This claim to me seems very suprising, as I would intuitively think that one needs phaseshifters to get all unitaries, thus I would like to confirm this.
+",5322,,,,,11/26/2019 14:40,Boson Sampling with a single beamsplitter,,0,0,,,,CC BY-SA 4.0 +8955,2,,8953,11/26/2019 15:25,,3,," The result is correct. You can see it in the other way. You have three two-qubit subsystems $A = \{1,2\}$, $B = \{3,4\}$ and $C = \{5,6\}$. The whole state is the product state on those three subsystems, i.e. the whole density matrix is $\rho_A \otimes \rho_B \otimes \rho_C$. Product state means there are absolutely no correlations between the states on subsystems. Hence you can fully ignore the $C$ subsystem if you are interested only in the state on $D = \{1,4\}$. Also since $\rho_{AB} = \rho_{A} \otimes \rho_{B}$ then it must be $\rho_D = \rho_1 \otimes \rho_4$.
+",5870,,,,,11/26/2019 15:25,,,,1,,,,CC BY-SA 4.0 +8956,2,,8936,11/26/2019 19:08,,3,,"This operation leaves all computational basis states unchanged, except for the $|0111\dots111\rangle$ and $|1000\dots000\rangle$ states, which it exchanges.
+ +The first thing to do is to make those two states differ in only one bit position. This can be done by applying CNOT operations controlled by one of the differing bit positions targeting all other differing bit positions. We'll do a CNOT from the leftmost bit to all other bits, resulting in:
+ +$|0111\dots111\rangle \rightarrow |0111\dots111\rangle$
+ +$|1000\dots000\rangle \rightarrow |1111\dots111\rangle$
+ +Now our states differ in only one bit position. The operation that swaps these two states while affecting no others is a CC..CCNOT controlled by all of the bit positions where the bits are the same (with a control type matching that bit) and targeting the differing bit position.
+ +We then repeat the CNOTs from earlier in order to return to the original basis.
+ +The final circuit looks like this:
+ + + +Note that this circuit may be upside down, depending on your bit ordering convention.
+ +We can check it has the right matrix by using Quirk's output display and the state channel duality:
+ + +",119,,,,,11/26/2019 19:08,,,,0,,,,CC BY-SA 4.0 +8957,1,8959,,11/26/2019 19:25,,2,56,"I am implementing a simulation of Simon's Algorithm, and am at the part of applying the second n-qbit Hadamard transformation, $H^{\otimes n}$, to the first of the two n-qbit registers, leaving the second unchanged. I am wondering if I can implement this step as applying the operation $H^{\otimes n} \otimes I$ (Kronecker product) to the combined state of the two registers. I want to do this because after the oracle, the two registers are entangled and cannot be represented as a tensor product of the states of each register (is my understanding correct here?).
+ +So I am wondering if the following is true
+ +$$(H^{\otimes n} \otimes I)|x⟩|y⟩ = H^{\otimes n}|x⟩ \otimes I|y⟩ = H^{\otimes n}|x⟩ \otimes |y⟩$$
+ +or more generally is the following true of the kronecker/tensor product?
+ +$$(A \otimes B) |x⟩|y⟩ = A|x⟩ \otimes B|y⟩$$
+",7960,,26,,11/26/2019 20:00,11/26/2019 20:00,Simon's Algorithm - How to simulate second Hadamard operation on first register?,,1,0,,,,CC BY-SA 4.0 +8958,1,8968,,11/26/2019 19:32,,6,918," Is there any paper or article about the performance of the noise model using
+ +basic_device_noise_model()
? For example, like the noise model in the code below.+ +device = IBMQ.get_backend('ibmq_16_melbourne') +properties = device.properties() +noise_model = noise.device.basic_device_noise_model(properties) +
I used that model to test some short-depth circuits and the results are pretty good actually. But I do not think IBM provide any paper or similar thing in the documentation or tutorial about this part. I wonder how they valid their model.
+",9095,,55,,11/24/2020 14:22,11/24/2020 14:22,How good is basic_device_noise_model() simulating the noise in the quantum computer?,,1,0,,,,CC BY-SA 4.0 +8959,2,,8957,11/26/2019 19:59,,1,," Yes.
+ +The tensor product of two linear maps $S: V \to X$ and $T: W \to Y$ is the linear map
+ +$$S \otimes T: V \otimes W \to X \otimes Y \ni (v \otimes w) \mapsto S(v) \otimes T(w).$$
+",26,,,,,11/26/2019 19:59,,,,0,,,,CC BY-SA 4.0 +8960,1,,,11/26/2019 21:29,,3,156,"The question:
+ +I have a Hilbert space $\mathcal{H}=\mathcal{H}_A\otimes \mathcal{H}_B$, and a codespace $\mathcal{H}_{code}\subset \mathcal{H}$, so that $\mathcal{H}=\mathcal{H}_{code}\oplus\mathcal{H}_\perp$. I know that for all $\psi,\phi\in \mathcal{H}_{code}$, and for all $\mathcal{O}_A=\mathcal{O}_A\otimes \mathcal{I}_B$, we have
+ +$$\langle\phi|[\mathcal{O}_A,\mathcal{O}]|\psi\rangle =0$$
+ +I would like to know what I can conclude about the operator $\mathcal{O}$ from this.
+ +Some thoughts:
+ +Without the projection into the codespace, we could conclude that $\mathcal{O}=\mathcal{O}_B$. With the projection, the most general thing I can think to write down that satisfies the constraint is
+ +$$\mathcal{O}=\mathcal{O}_B + \Pi_\perp \mathcal{O}'\Pi_\perp$$
+ +for any operator $\mathcal{O}'$, where $\Pi_\perp$ projects onto $\mathcal{H}_\perp$. There may be a more general expression, however.
+ +The most related statements I have found occur in the context of operator algebra quantum error correction. For instance (see for instance Preskill and Pastawski, theorem 1) the condition to correct a noise channel $\mathcal{N}(\cdot)=\sum_k N_k(\cdot )N_k^\dagger$ with respect to an algebra $\mathcal{A}$ is that
+ +$$[X,\Pi N_k^\dagger N_l \Pi]=0$$
+ +for all $X\in \mathcal{A}$ and all Kraus operators $N_l,N_k$. This looks like my condition if I took $\mathcal{O}_A$ to be a logical operator. This has lead me to study von Neumann algebras and the theory of operator algebra quantum error correction, but so far this has not been fruitful in answering my original question.
+",8468,,26,,11/27/2019 2:06,12/2/2019 14:22,Implications of commuting within the code space,,1,1,,,,CC BY-SA 4.0 +8961,1,,,11/27/2019 5:10,,4,247," Question
+ +How would a quantum computer calculate a definite integral (without resorting to approximations) of a function?
+ +Motivation
+ +According to a post of mine (in the context of classical field theory) seems to make the following premises:
+ ++
+ +- One can always infer the value of a field at a point.
+- There can exist a Robinson Boundary Condition.
+- This (Klien-Gordon) field obeys Lorentz transformations.
+The conclusion seems to be:
+ +++ +Using classical calculations and the Robin boundary condition I show + that one calculate the anti-derivative of a function within time $2X$ + (I can compute an integral below)
+ +$$\frac{2 \alpha}{\beta} e^{ \frac{\alpha}{\beta}X} \int_0^{X} e^{- + \frac{\alpha}{\beta}\tau} \tilde f_0(\tau) d \tau$$
+ +where $f_0$ is an arbitrary function whose integral above converges.
+Note: It is unclear to me how a quantum computer would stimulate a classical field in a way which would tell you the definite integral?
+",5045,,55,,11/24/2020 14:22,11/24/2020 14:22,Using quantum computers to calculate definite integrals?,,0,7,,,,CC BY-SA 4.0 +8962,1,,,11/27/2019 5:52,,0,69," This answer states that:
+ +++ +Once it is submitted, your job will be in queue. You will have to request by GET this job ID to get the answer from the backend. + The GET URL is: https://quantumexperience.ng.bluemix.net/api/Jobs/execution_id. + You will get another JSON answer (put it in a
+r_json
variable). If it has theqasms
item, see ifr_json['qasms'][0]
has aresult
item and you will get the result of the submission.But when I download it with python, I got a HTML but not JSON. +When I open this URL in Chrome, I just enter https://quantum-computing.ibm.com/
+ +The question I meet is there are too many circuit need to run (19200 circuit). But One task can take 64 circuit. (When I try 96 circuit, it fail) So I have to create 300 tasks. Download these result one by one is not easy, so I want a URL. +If someone can tell me how to download 300 results quickly or how to run more circuit in One task. It also really helpful. Thank you very much.
+",8901,,55,,11/27/2019 10:45,11/27/2019 10:45,What is the URL of the result?,,0,4,,,,CC BY-SA 4.0 +8963,1,,,11/27/2019 10:41,,1,60," Suppose I prepare a Bell state $|\beta_{00}\rangle$, and distribute the product state $|\beta_{00}\rangle_{12}|\beta_{00}\rangle_{34}|\beta_{00}\rangle_{56}$ without telling them which state I prepared, with $A$ having qubits $1$ and $4$, $B$ having $2,6$, C having $3,5$.
+ +Now I calculate the individual density matrices for $A, B, C$ which comes out to be $\dfrac{\mathbb{I}\otimes\mathbb{I}}{4}$ for each implying no one has the information about the complete state he/she has since the density matrix is completely mixed. My first question is, is this correct?
+ +Now, say I want to calculate the entropy of the entire system, and then the entropy for each subsystem $A, B, C$. The entropy of each system can be seen to be $2$ by looking at the eigenvalues of the partial density matrices of $A, B, C$. Suppose I now tell them what state I shared, will the entropy of the entire system and the subsystem change? What if $A$ measures his particles $1,4$, then will the entropy change?
+",6070,,55,,11/24/2020 14:22,11/24/2020 14:22,Entropy of a shared state as measured by the individual parties,,1,3,,,,CC BY-SA 4.0 +8964,2,,8953,11/27/2019 11:10,,2,," ++ +What does this density matrix say about the information that the players have about each others particles?
+Nothing, if no further assumptions are made on the initial state. If $A$ and $B$ share a state $\rho$, a reduced state $\rho^A$ doesn't say anything about the information that $A$ has about $B$'s state. +Indeed, $B$ can have any state as far as $A$ knows: any shared state of the form $\rho^A\otimes \sigma$ is compatible with $A$'s knowledge, for any state $\sigma$.
+ +If on the other hand Alice knows that the initial state is pure, then knowing that their share of the state is $\rho^A$, $A$ can infer the entropy of $B$'s state, because $S(\rho^A)=S(\rho^B)$. Nothing else can be said though, as any local operation applied to $B$ will not change $A$'s outcomes.
+",55,,,,,11/27/2019 11:10,,,,4,,,,CC BY-SA 4.0 +8965,2,,8963,11/27/2019 11:27,,1,,"The entropy of a system depends on your state of knowledge about it. If you know that a state is pure, then its entropy is zero. If you ""tell $A,B,C$ that the overall shared state is pure"", then they know as much and will, therefore, say that the entropy of the overall state is $0$ (note that this is essentially a tautological statement). However, for them measure that the overall state is indeed pure, they need to be able to do nonlocal measurements. If they can only do local measurements, then as far as they are concerned their state is indistinguishable from $\rho^A\otimes\rho^B\otimes \rho^C$.
+ +Stated differently, you can think of the entropy of a system as a property of the way it's being measured. If $A$ measures only their state, they will associate to the measured state an entropy $S(\rho^A)$, and this regardless of whatever it's been done by the other parties. Even if you give $A$ full knowledge about the shared state, $A$ still will only be able to measure the entropy $S(\rho^A)$ with only their share of the state.
+",55,,,,,11/27/2019 11:27,,,,2,,,,CC BY-SA 4.0 +8966,1,8967,,11/27/2019 14:17,,0,128,"I have successfully run
+ +bit_flip_error
in Qiskit by functionpauli_error
, but I can not find how to implement akraus_error
.+ +
pauli_error
works as follows:+ +pauli_error([('X', p_reset), ('I', 1 - p_reset)]) +
+",9275,,26,,11/28/2019 4:34,11/28/2019 4:34,How can I implement a kraus_error in qiskit?,
kraus_error
?,1,1,,,,CC BY-SA 4.0 +8967,2,,8966,11/27/2019 15:00,,1,," I believe you can implement it a similar way you implemented the
+",6180,,,,,11/27/2019 15:00,,,,2,,,,CC BY-SA 4.0 +8968,2,,8958,11/27/2019 16:52,,14,,"pauli_error
, just with different parameter input. You need to pass in a(list[matrix]): Kraus matrices
. Thekraus_error
method is defined here. You should be able to import it from the same module you importpauli_error
from:qiskit.providers.aer.noise.errors.standard_errors
There is no specific paper for this, though information on the model can be found in the Qiskit Aer API documentation and is based on the research of IBMQ quantum computing group. As examples you can read some of the following papers for more information about errors in IBMQ devices:
+ ++
+ +- arXiv:1410.6419 -- The Methods section at the end has a summary of gate calibration and readout error characterization
+- arXiv:1603.04821 -- Described types of errors which occur in the way IBMQ devices implement the CNOT gate
+TL,DR
+ +This noise model is a greatly simplified approximate error model and you should not expect it to exactly reproduce errors from a real device.
+ +This is because the model is derived from a very small set of parameters which are obtained from device calibration experiments. For example: For gates errors are derived from a single
+ +gate_error
parameter along with the gate length and the $T_1$ and $T_2$ relaxation time constants for the qubits involved. General 1 and 2 qubit error maps are described by 4x4 matrix and 16x16 complex matrices (CPTP Choi-matrix), which require a lot more than the given parameters to specify in general.More details
+ +To summarize the documentation the basic noise model consists of:
+ ++
+ +- Single qubit readout errors
+- Single qubit gate errors on u1, u2, u3 gatese
+- Two-qubit gate errors on cx.
+I'll go into more detail below for each case
+ +Readout Errors
+ +Readout errors are based on two parameters:
+ ++
+ +- The probability of recording an outcome as 0 given it was actually 1
+- The probability of recording an outcome as 1 given it was actually 0
+This assumes readout error are not correlated between qubits for multi-qubit measurements. It also means that measure errors are purely classical (no back action on qubit state), which is accurate for the case where measurements occur at the end of a circuit (which they must currently for actual devices). In practice these errors are quite a good approximation for the readout errors of IBMQ devices.
+ +Gate errors
+ +The 1 and 2-qubit gate errors are derived from following parameters:
+ ++
+ +- The length of the specific gate
+- The $T_1$, $T_2$ relaxation time values for each qubit in the gate
+- A
+gate_error
parameter obtained from 1 or 2-qubit randomized benchmarkingThe
+ +gate_error
represents the overall error of the gate as is defined as $1 - F$ where $F$ is the average gate fidelity.The gate error model assumes this error is described by an error channel $\cal{E} = \cal{E}_{\text{depol}} \circ \cal{E}_{\text{relax}}$ where $\cal{E}_{\text{depol}}$ is a n-qubit depolarizing-error channel and $\cal{E}_{\text{relax}}$ is a tensor product of 1-qubit thermal relaxation error channels on each qubit.
+ +The main limitations/approximations of this model are:
+ ++
+ +- It approximates all non-relaxation gate errors as depolarizing errors (so there are no coherent errors)
+- Errors are only applied to gates, so it does not automatically include relaxation errors on idle qubits
+- It does not include any non-local errors such as cross-talk
+The thermal relaxation error channel used is very standard and a good model for relaxation errors during gates, so if gate error is completely due to $T_1$ relaxation (we call this $T_1$-limited) the model is very good. If gate error is only partially due to to relaxation then it becomes much more approximate.
+ +In practice this model is quite good for 1-qubit gate errors where error rates are quite low and close to being $T_1$-limited, but it will not be for CNOT gates which are not $T_1$ limited. CNOT gates also tend to have higher levels of cross-talk errors which are not captured in this model.
+ +Another limitation is if you circuit has a lot of idle qubits (qubits not participating in a gate during any point in time) it will underestimate $T_1$ relaxation errors unless you add idle (
+ +""id""
) gates to those qubits. This is partially a limitation of thee quantum circuit format (since it has no notion of gate scheduling) and is something I hope to address in future updates to Qiskit Aer.References
+ +Sources: The Qiskit Aer API documentation and source code, and myself (I wrote the code in question).
+",8650,,,,,11/27/2019 16:52,,,,2,,,,CC BY-SA 4.0 +8969,1,,,11/27/2019 17:15,,3,631,"I was reading a paper titled ""Using a Recurrent Neural Network to Reconstruct Quantum Dynamics of a Superconducting Qubit from Physical Observations"" and was confused about a stochastic master equation governing the evolution of the single-qubit system. According to the paper, they are denoting the non-unitary evolution of a superconducting qubit. The equation in question is the following: +$$ +d \rho_{t}=\underbrace{\left(i\left[H_{R}, \rho_{t}\right]+\mathcal{L}\left[\sqrt{\frac{\gamma}{2}} \sigma_{Z}\right] \rho_{t}\right)}_{\text {dissipative evolution }} d t+\underbrace{\sqrt{\eta} \mathcal{H}\left[\sqrt{\frac{\gamma}{2}} \sigma_{Z}\right] \rho_{t}}_{\text {backaction }} d w_{t} +$$ +In this case, $H_{\mathrm{R}}=\frac{\hbar \Omega_{R}}{2} \sigma_{X}$, ""describes a microwave drive at the qubit transition frequency which induces unitary evolution of the qubit state characterized by the Rabi frequency $\Omega_R$."" I understand and was able to implement (in MATLAB) the first half of the dissipative evolution, $i[H_R,p_T]$, as this is fairly simple; however, what do the $\mathcal{L}$ and $\mathcal{H}$ mean? The paper describes $\mathcal{L}$ as ""the Lindblad superoperator describing the qubit dephasing induced by the measurement of strength $\gamma$""; however I have little idea as to what this means. What exactly does this mean and, if possible, what are methods of encoding this computationally (in something like MATLAB or python)
+",9254,,13968,,7/13/2021 9:32,7/23/2021 3:39,"What is ""Lindblad Superoperator"" in Stochastic Master Equation",,1,6,,,,CC BY-SA 4.0 +8970,2,,8947,11/27/2019 21:01,,1,," I think this should help:
+ ++ +circuit.measure([0,1,2,3], [0,1,2,3,4,5]) +
for 4 qubits.
+ +The secret number = '1001' for the circuit below:
+ +NOTE the xor gates ""cx"" in qbit 0 and 3 are because it is 1 on the first and last bit of the secret number.
+ + + +And after that simulate (to get the answer):
+ + + +I hope I've helped.
+",9277,,45,,11/29/2019 0:39,11/29/2019 0:39,,,,0,,,,CC BY-SA 4.0 +8971,2,,8945,11/27/2019 21:59,,0,,"One can perhaps guess the answer without full calculation. Noting that ""tracing"" intuitively means losing information, then, if you A is maximally entangled with B, then you lose information about B (or A) then you end up with no information about A. That is basically how qubits lose information to the environment (here B is like an environment for A).
+",9070,,,,,11/27/2019 21:59,,,,0,,,,CC BY-SA 4.0 +8972,1,,,11/27/2019 22:32,,3,1112,"I tried to follow the web instructions to load Qiskit, including VC++ 2017 Redistributable, but I get many errors upon installation. The gist seems to be that VC++ 2017 wasn't found. Some results coped below - any suggestions?
+ ++",9278,,55,,7/7/2020 12:50,7/7/2020 12:50,Qiskit installation failing: VC++ 2017 not found,========================================================= +. +. +. + Building wheel for qiskit-aer (setup.py) ... error + ERROR: Command errored out with exit status 1: +. +. +. +. + -------------------------------------------------------------------------------- + -- Trying ""Ninja (Visual Studio 15 2017 Win64 v141)"" generator + -------------------------------- + --------------------------- + ---------------------- + ----------------- + ------------ + ------- + -- + Not searching for unused variables given on the command line. + CMake Error: CMake was unable to find a build program corresponding to ""Ninja"". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. +. +. +. +. + ---------------------------------------- + ERROR: Failed building wheel for qiskit-aer + Running setup.py clean for qiskit-aer + Building wheel for qiskit-terra (setup.py) ... error + ERROR: Command errored out with exit status 1: +. +. +. +. + scikit-build could not get a working generator for your system. Aborting build. + +Building windows wheels for Python 3.8 requires Microsoft Visual Studio 2017. +Get it with ""Visual Studio 2017"": + + https://visualstudio.microsoft.com/vs/ +
,2,9,,,,CC BY-SA 4.0 +8973,1,,,11/28/2019 0:47,,2,76," After reading some with regard to the quantum computing gates and the comparison to classic gates it seems that the quantum computer, at least for the time being, is not viewed as a programmable element of a ""hardware circuit"" but more as a hardware device that combines functions, as in what is termed in ""classical computing"" ASSP - application-specific signal processors. Is this view right?
+",9261,,26,,11/28/2019 12:15,11/28/2019 12:15,Are quantum gates analogous to ASSPs in classical computing?,,2,3,,,,CC BY-SA 4.0 +8974,1,,,11/28/2019 2:34,,0,87," Just need some clarification: Results derived as the output of ""running"" a ""quantum circuit"" constructed from ""quantum gates"" are distributed in a certain way, based on the design, and the multiple possible outputs have a distribution with the desired one having the highest probability of occurrence. By using more qubits the ""signal to noise"" ratio may be improved (by using the appropriate implementation of the ""quantum circuit"").
+ +Is my interpretation right or I am missing some key components?
+",9261,,26,,11/28/2019 4:01,11/28/2019 8:36,Is this interpretation of quantum circuits right?,,1,6,,,,CC BY-SA 4.0 +8976,1,8985,,11/28/2019 5:29,,4,116," I am trying to prove that the $|S_{n}\rangle$ is $n$-lateral rotationally invariant, where $|S_{n}\rangle$ is defined as
+ +$$|S_{n}\rangle=\sum_{S \in P_{n}^{n}} (-)^{\tau(S)}|S\rangle\equiv\sum_{S \in P_{n}^{n}} (-)^{\tau(S)}|s_{0}s_{1}.....s_{n-1}\rangle.$$
+ +A $n$ dimensional qudit state on Hilbert space $H_{n}$ is the superposition of its computational basis $\{|i\rangle\}, i\in\{0,1,2,...,n-1\}$. Here, $|S_n\rangle$ is a state of $n$ such particles on $H_{n}^{\otimes n}$.
+ +Consider now another basis $|i'\rangle$ connected with the computational +basis by a unitary transformation $U$, where +$$|i\rangle=\sum_{j} U_{ji}|i'\rangle.$$
+ +Then, in this new basis, the state $|S_{n}\rangle$ takes the same form up to a global phase factor $\phi$. That is,
+ +$$|S_{n}\rangle=e^{i\phi}\sum_{M \in P_{n}^{n}} (-)^{\tau(M)}|M'\rangle \equiv e^{i\phi}\sum_{M \in P_{n}^{n}} (-)^{\tau(M)}|m_{0}'m_{1}'...m_{n-1}'\rangle.$$
+ +Here $P_{n}^{n} = \{x_{0}x_{1}x_{2}...x_{n-1}|x_{0},x_{1},x_{2},...,x_{n-1 }\in Z_{n}, \forall j \neq k, x_{j} \neq x_{k}\}$ and the phase factor is given by +$$e^{i\phi} = \det(U).$$
+ +
+ +Proof
+ +$$|S_{n}\rangle=\sum_{S \in P_{n}^{n}} (-)^{\tau(S)}\sum_{m_{0}=0}^{n-1}U_{m_{0},s_{0}}|m_{0}'\rangle\otimes...\otimes\sum_{m_{n-1}=0}^{n-1}U_{m_{n-1},s_{n-1}}|m_{n-1}'\rangle$$
+ +$$=\left[\sum_{M \in P_{n}^{n}} + \sum_{M \not\in P_{n}^{n}}\right]\left[\sum_{S \in P_{n}^{n}} (-)^{\tau(S)}U_{m_{0},s_{0}}U_{m_{1},s_{1}}...U_{m_{n-1},s_{n-1}}\right]|M\rangle$$
+ +$$=\left[\sum_{M \in P_{n}^{n}} + \sum_{M \not\in P_{n}^{n}}\right]det(U_{m_{j}, s_{i}})|M\rangle$$
+ +.... continued
+ +Here how $\left[\sum_{S \in P_{n}^{n}} (-)^{\tau(S)}U_{m_{0},s_{0}}U_{m_{1},s_{1}}...U_{m_{n-1},s_{n-1}}\right]= det(U_{m_{j}, s_{i}})$?
+ +Please provide a reference if you have any. I have a basic idea about unitary transformations and their matrix representations.
+ +$\tau(S)$, named inverse number, is defined as the number of transpositions of pairs of elements of $S$ that must be composed to place the elements in canonical order, $012 · · · n − 1$.
+",8620,,55,,11/28/2019 12:10,11/28/2019 17:00,Prove that the state $\sum_{S\in P_n}(-)^{\tau(S)}|S\rangle$ is invariant up to a phase when changing the basis,,2,4,,,,CC BY-SA 4.0 +8977,1,,,11/28/2019 6:14,,11,181," We know that solving a hidden subgroup problem over a non-commutative group is a long standing problem in quantum computing even for groups like $D_{2n}$ (alternatively can be written as $\mathbb{Z}_n \rtimes \mathbb{Z}_2$) for general $n$. What are some families $n$ for which this can be done?
+",8132,,8132,,12/3/2019 10:24,12/3/2019 10:24,Status of hidden shift and hidden subgroup problems,,0,4,,,,CC BY-SA 4.0 +8978,1,,,11/28/2019 6:24,,4,873," There are many different physical implementations of qubits: NMR, spin qubit, N color center in diamond, superconducting qubit, trapped ions, photonics quantum computing, topological qubit, etc. However, superconducting qubits is currently the most popular approach, adopted by IBM, Google, Rigetti, Intel, etc.
+ +What are the advantages of superconducting qubits over other implementations, such as trapped ions? As far as I know, trapped ions qubits have higher gate fidelity and it doesn't require low temperature. Is scalability the main advantage of superconducting qubits over other implementations?
+",7474,,55,,11/28/2019 12:23,12/2/2019 10:07,Why are superconducting qubits the most popular approach to build a quantum computer?,,1,6,,,,CC BY-SA 4.0 +8979,1,,,11/28/2019 7:11,,3,166," What are the infrastructures needed to build a cloud quantum computing service like IBM Q Experience?
+ +It seems this is not a trivial task. IQX has been running for more than 3 years and yet it is taking ages for Google to come up with one.
+",7474,,,,,11/28/2019 16:31,How to put a quantum computer on the cloud?,,1,1,,,,CC BY-SA 4.0 +8980,2,,8974,11/28/2019 8:36,,2,," Yes, when you run an algorithm, often specified as a sequence of gates, you get different results according to some probability distribution.
+ +Assuming we are talking about an error-free computation (this is where, in this field, we use the terminology ""noise"" which is distinct from the ""noise"" of ""signal to noise ratio""), then most algorithms that you will currently find are designed in such a way that as the size of the input increases (and you therefore use more qubits), the success probability tends to 1 (increasing signal to noise ratio, to use your terminology). However, for a fixed input, you cannot always just throw more qubits at the problem and somehow magically expect to improve the probability of the correct outcome. (That said, some algorithms such as phase estimation do work like that.)
+ +Instead, what you can do is exactly what you'd do with probabilistic classical computation: repeat the computation many times and perform a majority vote for the answer. You could do this in parallel, using more qubits, but you can also do it sequentially, and not use any extra qubits at all.
+",1837,,,,,11/28/2019 8:36,,,,1,,,,CC BY-SA 4.0 +8981,2,,8973,11/28/2019 8:36,,1,,"++ +(...) depending on what you attempt to compute you ""design"" your circuit - this is what is called ASSP (Application Specific Signal Processor) where the input is Signal which are processed by the Circuit (processor) to create the processed output - the measure gate. [Source]
+Reading the question more carefully and after your clarification in the comments, I think it has some merit. It is indeed the case that quantum gates are not fully programmable in most architectures; the gate array (quantum circuit) has to be designed according to the specific algorithm and specific problem we're trying to solve (what you call ASSP), which certainly is a nuisance.
+ +However, note that in Google's latest architectures like the Sycamore, the gates are indeed fully programmable (at least, that's their claim), as is expected of a general-purpose quantum computer. I'm not sure what your impression of ""programming"" quantum gates is, but it's like manipulating a sequence of laser or microwave pulses on qubits in ion-trap and superconducting architectures respectively. See Peter Shor's answer for a nice explanation.
+",26,,26,,11/28/2019 12:12,11/28/2019 12:12,,,,0,,,,CC BY-SA 4.0 +8982,2,,8973,11/28/2019 9:21,,1,,"Today many people believe that programming means coding on some language like python; this is not true. The early classical computers were programmed by inserting junctions which connect logical elements of an electronic scheme, and this is also programming.
+ +I believe modern programmable quantum computers are programmed like that: a programmer is given a certain number of gates, and allowed ways to connect the gates; his task is to connect the gates to implement some algorithm.
+",2105,,,,,11/28/2019 9:21,,,,2,,,,CC BY-SA 4.0 +8983,2,,8976,11/28/2019 14:55,,2,,"Let unitary operator $U$ acts as a permutation $\boldsymbol{\sigma} = (\sigma_1, \sigma_2,..,\sigma_n) $ on the standard basis. That is +$$ +U |i \rangle = | \sigma_i \rangle +$$ +for every $i \in \{0,1,..,n-1\}$.
+ +
+Now if ${\boldsymbol{\rho}} = (\rho_1, \rho_2,..,\rho_n)$ is some permutation, then +$$ +U^{\otimes n} | \boldsymbol{\rho}\rangle = U^{\otimes n} | \rho_1 \rho_2..\rho_n\rangle = | \sigma_{\rho_1} \sigma_{\rho_2}..\sigma_{\rho_n}\rangle = | (\sigma\rho)_1 (\sigma\rho)_2 ..(\sigma\rho)_n \rangle = | \boldsymbol{\sigma\rho}\rangle +$$ +Here $\boldsymbol{\sigma\rho}$ is the composition of permutations $\boldsymbol{\sigma}$ and $\boldsymbol{\rho}$.
+Now note that +$$(-1)^{\tau(\boldsymbol{\sigma\rho})} = (-1)^{\tau(\boldsymbol{\sigma})}(-1)^{\tau(\boldsymbol{\rho})} +$$ +Finally +$$ +U^{\otimes n} | S_n \rangle += U^{\otimes n} \sum_{\rho \in Sym_n}(-1)^{\tau(\boldsymbol{\rho})}| \boldsymbol{\rho}\rangle += \sum_{\rho \in Sym_n}(-1)^{\tau(\boldsymbol{\rho})}| \boldsymbol{\sigma\rho} \rangle += +$$ +$$ +=(-1)^{\tau(\boldsymbol{\sigma})} \sum_{\rho \in Sym_n}(-1)^{\tau(\boldsymbol{\sigma\rho})}| \boldsymbol{\sigma\rho} \rangle += (-1)^{\tau(\boldsymbol{\sigma})} | S_n \rangle = \text{det}(U)| S_n \rangle +$$For the proof for every unitary $U$ see the DaftWullie's answer.
+",5870,,5870,,11/28/2019 17:00,11/28/2019 17:00,,,,0,,,,CC BY-SA 4.0 +8984,2,,8979,11/28/2019 15:14,,2,,"To have a cloud computing quantum service you need to automate all layers and communication between layers in the quantum system stack: +
+ +Source: ""The engineering challenges in quantum computing"" by Almudever et al.
+ +I am sure Google would be able to do this, but for now they are not focusing on this. This gives them the advantage to put all their efforts into proof of concept experiments such as the quantum supremacy demo.
+",9282,,26,,11/28/2019 16:31,11/28/2019 16:31,,,,4,,,,CC BY-SA 4.0 +8985,2,,8976,11/28/2019 16:17,,3,,"Let $\rho$ and $\sigma$ be two permutations, i.e. lists of length $d$ containing some ordering of the elements 0 to $d-1$.
+ +What we want to calculate is $\langle \rho|U^{\otimes d}|S\rangle$. If we can show that this is $(-1)^{\tau(\rho)}$ up to a global phase, then we know not only that those elements come through the calculation correctly, but by normalisation, it must be that all states not of the form $|\rho\rangle$ have 0 amplitude.
+ +Now, +$$\langle \rho|U^{\otimes d}|S\rangle=\sum_{\sigma}(-1)^{\tau(\sigma)}\prod_{i=0}^{d-1}U_{\rho_i,\sigma_i}$$ +Let us change the order that we do the product, so the first element we take as $\rho_i=0$, then $\rho_i=1$ etc. So, this expression becomes +$$ +\sum_{\sigma}(-1)^{\tau(\sigma)}\prod_{i=0}^{d-1}U_{i,(\rho^{-1}\sigma)_i}. +$$ +Next, we change the order that we take the sum over permutations (since the set of objects we're summing over is unchanged by the permutation $\rho^{-1}$). +$$ +\sum_{\sigma}(-1)^{\tau(\rho\sigma)}\prod_{i=0}^{d-1}U_{i,\sigma_i}. +$$ +Next, we use $\tau(\rho\sigma)=\tau(\rho)\tau(\sigma)$, so we have +$$ +(-1)^{\tau(\rho)}\left(\sum_{\sigma}(-1)^{\tau(\sigma)}\prod_{i=0}^{d-1}U_{i,\sigma_i}\right). +$$ +The term in brackets is a standard way of writing $\text{det}(U)$. See, for example, Wikipedia. Just to complete the argument in terms of what we had to prove, $U$ is unitary, so its determinant has modulus 1, i.e. $\text{det}(U)$ just contributes a global phase.
+",1837,,,,,11/28/2019 16:17,,,,0,,,,CC BY-SA 4.0 +8986,1,,,11/28/2019 16:57,,1,55,"I saw a video in which a guy from IBM was explaining (very generally) quantum computing, it's difference with classical computing etc. +The talk was not technical at all, it was intended for a broad audience.
+ +At some point he told that, if we need to represent our position on the planet with only one bit, we could only tell for example if we are on the North or South hemisphere, but with a qubit we could tell exactly where we where.
+ +He did this example to explain the difference in how much information can a bit and a qubit contain and to give a little idea of what a superposition is (I think).
+ +Now, my question:
+ +From what I know a qubit has more than one state, but when I read it I can only have one or zero, so why this example was made? From what I can understand a qubit can hold more information but I can't read it, so basically it's useless.
+",9285,,55,,11/24/2020 14:22,11/24/2020 14:22,Clarification on the information content of a qubit,,0,2,,11/28/2019 17:31,,CC BY-SA 4.0 +8987,1,,,11/28/2019 21:06,,2,247," When I access IBM Q backend with qiskit code, an error occurs.
+ ++ +from qiskit import IBMQ + +qt = 'xxxxxxxxx' + +IBMQ.save_account(qt) +IBMQ.load_accounts() +
The error message is as follows:
+ ++ +--------------------------------------------------------------------------- +JSONDecodeError Traceback (most recent call last) +/usr/local/oss/anaconda3/lib/python3.6/site-packages/qiskit/providers/ibmq/api/utils.py in obtain_token(self, config) + 135 response.raise_for_status() +--> 136 self.data_credentials = response.json() + 137 except (requests.HTTPError, ValueError) as ex: + +/usr/local/oss/anaconda3/lib/python3.6/site-packages/requests/models.py in json(self, **kwargs) + 896 pass +--> 897 return complexjson.loads(self.text, **kwargs) + 898 + +/usr/local/oss/anaconda3/lib/python3.6/json/__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) + 353 parse_constant is None and object_pairs_hook is None and not kw): +--> 354 return _default_decoder.decode(s) + 355 if cls is None: + +/usr/local/oss/anaconda3/lib/python3.6/json/decoder.py in decode(self, s, _w) + 338 """""" +--> 339 obj, end = self.raw_decode(s, idx=_w(s, 0).end()) + 340 end = _w(s, end).end() + +/usr/local/oss/anaconda3/lib/python3.6/json/decoder.py in raw_decode(self, s, idx) + 356 except StopIteration as err: +--> 357 raise JSONDecodeError(""Expecting value"", s, err.value) from None + 358 return obj, end + +JSONDecodeError: Expecting value: line 1 column 1 (char 0) + +During handling of the above exception, another exception occurred: + +ApiError Traceback (most recent call last) +/usr/local/oss/anaconda3/lib/python3.6/site-packages/qiskit/providers/ibmq/ibmqsingleprovider.py in _authenticate(cls, credentials) + 94 +---> 95 def _discover_remote_backends(self): + 96 """"""Return the remote backends available. + +/usr/local/oss/anaconda3/lib/python3.6/site-packages/qiskit/providers/ibmq/api/ibmqconnector.py in __init__(self, token, config, verify) + 103 self.req = Request(token, config=config, verify=verify) +--> 104 + 105 def _check_backend(self, backend_name): + +/usr/local/oss/anaconda3/lib/python3.6/site-packages/qiskit/providers/ibmq/api/utils.py in __init__(self, token, config, verify, retries, timeout_interval) + 216 proxy_urls=self.proxy_urls, +--> 217 ntlm_credentials=self.ntlm_credentials) + 218 + +/usr/local/oss/anaconda3/lib/python3.6/site-packages/qiskit/providers/ibmq/api/utils.py in __init__(self, token, config, verify, proxy_urls, ntlm_credentials) + 67 if token: +---> 68 self.obtain_token(config=self.config) + 69 else: + +/usr/local/oss/anaconda3/lib/python3.6/site-packages/qiskit/providers/ibmq/api/utils.py in obtain_token(self, config) + 137 except (requests.HTTPError, ValueError) as ex: +--> 138 raise ApiError('error during login: %s' % str(ex)) + 139 + +ApiError: error during login: Expecting value: line 1 column 1 (char 0) + +The above exception was the direct cause of the following exception: + +ConnectionError Traceback (most recent call last) +<ipython-input-9-2e30fdf423aa> in <module> + 11 IBMQ.stored_accounts() + 12 +---> 13 IBMQ.load_accounts() + 14 #IBMQ.enable_account(qt) + +/usr/local/oss/anaconda3/lib/python3.6/site-packages/qiskit/providers/ibmq/ibmqprovider.py in load_accounts(self, **kwargs) + 197 + 198 def disable_accounts(self, **kwargs): +--> 199 """"""Disable accounts in the current session, subject to optional filtering. + 200 + 201 The filter kwargs can be `token`, `url`, `hub`, `group`, `project`. + +/usr/local/oss/anaconda3/lib/python3.6/site-packages/qiskit/providers/ibmq/ibmqprovider.py in _append_account(self, credentials) + 277 """""" + 278 return all(getattr(credentials, key_, None) == value_ for +--> 279 key_, value_ in filter_dict.items()) + +/usr/local/oss/anaconda3/lib/python3.6/site-packages/qiskit/providers/ibmq/ibmqsingleprovider.py in __init__(self, credentials, ibmq_provider) + 50 self.credentials = credentials + 51 self._api = self._authenticate(self.credentials) +---> 52 self._ibm_provider = ibmq_provider + 53 + 54 # Populate the list of remote backends. + +/usr/local/oss/anaconda3/lib/python3.6/site-packages/qiskit/providers/ibmq/ibmqsingleprovider.py in _authenticate(cls, credentials) + 101 """""" + 102 ret = OrderedDict() +--> 103 configs_list = self._api.available_backends() + 104 for raw_config in configs_list: + 105 try: + +ConnectionError: Couldn't connect to IBMQ server: error during login: Expecting value: line 1 column 1 (char 0) +
How can I solve this problem ?
+",9288,,26,,11/29/2019 13:57,7/10/2020 6:22,Couldn't connect to IBMQ server,,1,0,,,,CC BY-SA 4.0 +8988,2,,8987,11/29/2019 0:47,,2,," You added an ""s"" in the final.
+ +IBMQ.load_accounts()
+ +The right way is:
+ +IBMQ.load_account()
+ +I hope I could have helped.
+",9277,,9277,,11/29/2019 1:14,11/29/2019 1:14,,,,0,,,,CC BY-SA 4.0 +8989,1,,,11/29/2019 4:49,,1,103,"I don't understand this ""trapped ion (qubit implemented by the internal state of trapped ions)""
+ +One qubit implemented by the internal state of trapped ions (plural)?
+ +""Consider an ion trap. The ions represent qubits by using one electronic state as a |0⟩ and another as a |1⟩""
+ +What are these ions states physically?
+",8491,,26,,11/29/2019 13:53,11/29/2019 13:53,How can one trapped ion physically represent quantum states?,,1,1,,,,CC BY-SA 4.0 +8990,2,,8989,11/29/2019 10:29,,2,," The ion states are the different energy states of the ion. These different energy states can be denoted with the total +spin of the ion and the phonon levels of the ion.
+ +If we look at a Helium atom which has two electrons the total spin can be S = 0 if the electrons are in the following spin state: +$$ +\frac{1}{\sqrt{2}}(\uparrow \downarrow-\downarrow \uparrow) +$$ +or the total spin can be S=1 if the electrons are in one of the following three states +$$ +\downarrow \downarrow +$$ +$$ +\frac{1}{\sqrt{2}}(\uparrow \downarrow+\downarrow \uparrow) +$$ +$$ +\uparrow \uparrow +$$ +The phonon levels represent motional states of the atom.
+ +Often two ion energy states with a different total spin and 0 phonons are chosen as the qubit $|0\rangle$ and $|1\rangle$ state.
+",9282,,,,,11/29/2019 10:29,,,,0,,,,CC BY-SA 4.0 +8993,1,,,11/29/2019 19:45,,2,84,"I'm picturing the control equipment on the inside of an ISS wall with the part that needs being cold being on the outer side.
+ +I imagine this has been considered and if so, was the idea rejected for some particular reason?
+ +Note: It this is off topic please let me know and I'll delete it and post it on a hardware forum.
+",9298,,,,,4/29/2020 3:06,Mightn't the cost of a quantum computer be lowered by building it on earth sans cooler and then using it in the frigid vacuum of space?,,1,5,0,,,CC BY-SA 4.0 +8994,1,,,11/29/2019 20:01,,4,105," Where does QEC fit in the larger picture of the execution of a fault tolerant quantum algorithm?
+ +For QEC, there is an initial preparation of the qubit state and the ancillary qubits; then a ""noisy channel""; then a check and error correcting. It seems the algorithm would be the noisy channel, but then the final checking and correcting stage would project the state back to its original state negating any the algorithm did. I'm missing something essential here.
+",8420,,26,,11/30/2019 11:30,12/7/2019 7:04,Where does error correction go in a quantum algorithm?,,2,0,,,,CC BY-SA 4.0 +8995,2,,2203,11/30/2019 4:56,,3,," Content wise very similar course but different name Quantum Information Science I (three parts - part 1, 2, and 3) and Quantum Information Science II were $49 per course as verified certified learning outcome - a series of 3 courses + 1 more extra course on edX. Now the course has been taken down; at least no more new enrollments, and MITx Pro is offering it for \$2250 + \$2250 = \$4500. This is 20 times higher for the same course.
+ +I see there would be a number of other MOOCs coming soon. One such is from St Petersberg State University - Introduction to Quantum Computing, but the English version is very poor in quality of content compared to the Russian version on Coursera. However, there is a course from TU Delft on edX, and also one from Keio University at FutureLearn. These options could be looked at; same content but at lower price.
+ +PS: I am coming up with a course on Udemy and also maybe on Coursera with IBM Qiskit open network free version. Stay tuned for it.
+ +Edit-2: Adding edX course links cited above.
+ ++
+",9302,,9302,,1/3/2020 4:07,1/3/2020 4:07,,,,1,,,,CC BY-SA 4.0 +8996,1,9032,,11/30/2019 5:15,,1,151,"- +
Quantum Information Science I
+ ++
- 1.1) Quantum Information Science I, Part 1 https://www.edx.org/course/quantum-information-science-i-part-1
+- 1.2) Quantum Information Science I, Part 2 https://www.edx.org/course/quantum-information-science-i-part-2
+- 1.3) [Quantum Information Science I, Part 3 https://www.edx.org/course/quantum-information-science-i-part-3
+- Quantum Information Science II: Advanced quantum algorithms and information theory +https://www.edx.org/course/quantum-information-science-ii-advanced-quantum-al
+Has anyone used or considered color-space and color superposition for Qutrit work?
+ +A classical color-sphere has black and white at its poles, a grey scale as its axis, pure spectral colors as a color-wheel around its equator, and every possible mixed color inside or on the surface of this color space. This is a qutrit-like space analogous to a Bloch Sphere as a qubit space.
+ + + +Research validating superposition of colors as a Qubit (if not a Qutrit) Computing basis-
+ +https://physics.aps.org/articles/v9/135
+",9301,,9301,,12/2/2019 0:30,12/2/2019 14:59,Color-Space as Effective and Intuitive Qutrit Physical Realization?,,1,2,,12/6/2019 23:49,,CC BY-SA 4.0 +8998,1,,,11/30/2019 7:19,,-1,104," Suppose Alice needs to transmit a bit of information about something which happened just before $t = 0$ to Bob who is light years away from Alice. Entangled pairs of qubits, $\left|00\right> + \left|11\right>$ (after normalising) is being created at the midpoint of Alice and Bob and shared. There exists a time $t = -T$ such that the half entangled pair created at $t = -T$ reaches Alice and Bob at $t = 0$. Assume that there is a setup with Bob which creates some sort of interference of the qubits he receives. Now, if the required bit to transmit is 0, Alice does nothing. However, if the required bit to transmit is 1, Alice does a measurement of the qubits (half the entangled pairs) which she receives from time $t = 0$. It means that if Alice gets a 0, the corresponding qubit which Bob has is 0 (similarly with 1). Now, this means that Alice has information of Bob's qubit and the interference stops at $t = 0$. If Bob keeps seeing interference after $t = 0$, it means that the bit was 0. If Bob sees that the interference stops at $t = 0$, the bit was 1. It looks like information got transmitted faster that the speed of light. Can someone please explain why this is wrong?
+",8602,,55,,11/24/2020 14:22,11/24/2020 14:22,Does this setup violate relativity?,,2,0,,,,CC BY-SA 4.0 +8999,2,,8998,11/30/2019 7:43,,2,," Bob does not ""see"" the interference in the sense you assume. To ""see"" the interference (actually the states of his qubits) Bob needs to measure the qubits, and the measurement gives Bob no information whether Alice measured her qubits or not.
+",2105,,,,,11/30/2019 7:43,,,,0,,,,CC BY-SA 4.0 +9000,2,,8998,11/30/2019 15:18,,2,,"""Assume that there is a setup with Bob which creates some sort of interference of the qubits he receives.""
+ +I think you need to be more specific on this point. From Bob's perspective his qubit is simply a mixed state in the computational basis +$$\rho_B=\frac{1}{2}|0\rangle\langle 0|+\frac{1}{2}|1\rangle\langle1|$$ +so he will not be able to perceive any interference effects.
+",5238,,26,,11/30/2019 16:20,11/30/2019 16:20,,,,0,,,,CC BY-SA 4.0 +9001,1,,,11/30/2019 16:29,,4,120,"Could you please give a direction/reference towards realising the following using any set of realisable quantum gates
+ +$$\boxed{|S_{n}\rangle = \frac{1} {\sqrt{n!}} \sum_{S\in P_n^{n}} ( \,-1) \,^{\Gamma(S)}|s_{0}\rangle |s_{1}\rangle ....|s_{n-1}\rangle}$$
+ +Here $P_n^{n}$ is the set of all permutations of $Z_n := \{0,1,··· ,n−1\}$, $S$ is a permutation (or sequence) in the form $S = s_0 s_1 ···s_{n−1}$. $\Gamma(S)$, named inverse number, is defined as the number of transpositions of pairs of elements of $S$ that must be composed to place the elements in canonical order, $012 · · · n−1$.
+",9304,,,,,4/27/2020 13:04,How to generate the following $n$-level $n$-particle singlet state?,,0,5,,,,CC BY-SA 4.0 +9002,1,,,11/30/2019 17:47,,-2,185," Please, be patient with my question
+ +I already read that there is a heuristic that makes superposition a fact of reality. In addition, this superposition, when observed, it has a state of 0 or 1. Furthermore, quantum programming is done on our workstation and executed on remote quantum hardware. Finally, the use of Hadamard gates was able to create a superposition. Therefore, I'm curious to know if the superposition really is real or is it an assumption?
+ +Edit note: I started this question with Toffoli. However, my question is about Hadamard gate.
+",5986,,5986,,12/1/2019 15:45,12/1/2019 15:45,Is quantum superposition state a truth or an assumption?,,2,2,,,,CC BY-SA 4.0 +9003,2,,8960,11/30/2019 18:09,,2,," I have some ideas
+ +1) Since $[\mathcal{O}^\dagger_A, \mathcal{O}] = - [\mathcal{O}_A, \mathcal{O}^\dagger]^\dagger$ and $\mathcal{O} = (\mathcal{O}+\mathcal{O}^\dagger)/2 + (\mathcal{O}-\mathcal{O}^\dagger)/2$ you can solve it only for self-adjoint operators $\mathcal{O}=\mathcal{O}^\dagger$. And even more, you can consider only real self-adjoint operators $\mathcal{O} = \mathcal{O}^\dagger = \mathcal{O}^T$.
+ +2) You can rewrite your equation as +$$ +\text{Tr}\big( \mathcal{O} \cdot [E_{\psi\phi}, \mathcal{O}_A]\big) = 0,~~ E_{\psi\phi} = |\psi\rangle\langle \phi| +$$ +hence it must be +$$ +\text{Tr}\big( \mathcal{O} \cdot [\Pi X \Pi, \mathcal{O}_A]\big) = 0 +$$ +for every operator $X$ on $\mathcal{H}$.
+ +
+Also the last equation means that $\mathcal{O}^\dagger$ is orthogonal to the subspace $\mathrm{span}\{[\Pi X \Pi, \mathcal{O}_A]\}$ in the operator space with the Hilbert-Schmidt inner product on it.Update
+ +Using the last characterization it's not hard to show that there is a counterexample to your guess of a general formula. Let $|\phi\rangle = |v\rangle_A|w\rangle_B$ and $\mathcal{H}_{code} = \{\lambda |\phi\rangle, \lambda \in \mathbb{C}\}$, i.e. it's 1-dimensional and generated by a product state. In this case +$$ +\Pi X \Pi = \chi |\phi\rangle\langle\phi| = \chi |v\rangle\langle v| \otimes |w\rangle\langle w| +$$ +So +$$ +[\Pi X \Pi, \mathcal{O}_A \otimes I_B] = [\chi |v\rangle\langle v|, \mathcal{O}_A ] \otimes |w\rangle\langle w| +$$ +The last expression is not equal to zero only if $[\chi |v\rangle\langle v|, \mathcal{O}_A ] \neq 0$.
+ +It's easy to see that if $[M,E_{11}]=0$, where $M$ is some $n \times n$ matrix and $E_{11}$ is a matrix with a single non-zero element in the $(1,1)$ position, then it must be $m_{12}=m_{13}=...=m_{1n}=0, m_{21}=m_{31}=...=m_{n1}=0$ (and vice versa). So dimension of the subspace $\text{span}\{[M,E_{11}]\}$ equals to $2(n-1)$.
+ +Let $d_A = \text{dim}\mathcal{H}_A$, $d_B = \text{dim}\mathcal{H}_B$. We have that +$$ +\text{dim} \big( \text{span} \{ [\Pi X \Pi, \mathcal{O}_A \otimes I_B] \} \big) = 2(d_A-1) +$$ +So dimension of the subspace of solutions $\mathcal{O}$ must be $d_A^2d_B^2 - 2(d_A-1)$
+",5870,,5870,,12/2/2019 14:22,12/2/2019 14:22,,,,0,,,,CC BY-SA 4.0 +9004,2,,9002,11/30/2019 18:37,,4,,"
+But your general formula gives no more than $d_B^2 + (d_Ad_B-1)^2$ dimensional subspace. If $d_B=2$ and $d_A>2$ it's just not enough.Whether or not quantum superposition is a ""truth"", is a philosophical question. Quantum theory is simply an axiomatic mathematical model of the universe that happens to give correct experimental predictions (at least, for a fairly broad range) for several physical phenomena. It certainly might be possible to come up with a different mathematical model of the universe (though, the prospects look bleak) that would not require quantum superposition to explain such physical phenomena. In that sense, you can definitely call it an assumption. Every axiomatic system begins with assumptions (i.e., the axioms) after all!
+ +If you're wondering which basic axiom of quantum mechanics implies quantum superposition, it's this:
+ +++ +Each physical system is associated with a (topologically) separable complex Hilbert space $H$ with inner product $\langle \phi|\psi\rangle$. Rays (that is, subspaces of complex dimension 1) in $H$ are associated with quantum states of the system.
+If you've taken some introductory courses in linear algebra you should be aware that the Hilbert space is a vector space whose elements can be written as a linear superposition of its basis elements. Quantum superposition is just that; a quantum state can be written in terms of linear superpositions of the other (basis) quantum states.
+",26,,26,,11/30/2019 22:16,11/30/2019 22:16,,,,5,,,,CC BY-SA 4.0 +9006,2,,8993,12/1/2019 3:00,,1,,"Space-based cryogenic cost must become cheaper than Earth-based cryogenic cost and cheaper than classical computation emulating quantum computation. Earth application IO datalink and general space operations cost must fall as well. Mass space colonization will help.
+",9301,,,,,12/1/2019 3:00,,,,1,,,,CC BY-SA 4.0 +9007,2,,9002,12/1/2019 3:02,,3,,"[Can't comment and so, writing an answer]
+ +As @Sanchayan aptly pointed the theoretical/mathematical arguments which could indicate that superposition is not just an assumption.
+ +A couple more thoughts:
+ ++
+",8852,,,,,12/1/2019 3:02,,,,1,,,,CC BY-SA 4.0 +9009,1,9010,,12/1/2019 9:25,,4,66,"- +
You're right in observing that the superposition collapses to 0 or 1 when observed and that's expected due to the collapse of the wave function. A quick way to check if superposition exists could be to see if it's symptoms are observable - interference (destructive/constructive) as an example. You could verify this by running Grover's search algorithm. You'd see how select amplitudes are amplified while others are diminished. We could make a case here that this extends support for superposition being real.
- +
It's unclear what you mean by ""quantum programming is done on our workstation and executed on remote quantum hardware"". When we write a quantum program on our workstation, it's just a blueprint of an ""experiment"" that we would like the quantum hardware to perform. Once that information is received by the hardware, it sets up the experiment (initializing qubits), manipulates the qubits (using gates - which might result in superposition, entanglement and/or interference in due course) and finally measures the outcome (collapse of the superposition) and then reports it to our workstation.
- +
When you mention, ""the use of Toffoli gates was able to create a superposition"", is that a question? Technically, any state which is not a pure basis state (|0> and |1>) could be termed as a superposition since then it would be a free point on the bloch sphere apart from the poles.
I am a beginner at QC. I was going through the basics of multi-qubits I encountered a state $|2\rangle|3\rangle$.
+ +I want clarification on the following points:
+ ++
+ +- Can I write $|2\rangle$ as $|10\rangle = |1\rangle|0\rangle$ always?
+- If $|2\rangle = |10\rangle = |1\rangle|0\rangle$, Can I write $|2\rangle|3\rangle = |10\rangle|11\rangle = |1011\rangle$?
+Assume $|0\rangle$, $|1\rangle$ in computational basis. +$|0\rangle = \begin{bmatrix} + 1 \\ +0 +\end{bmatrix}$, +$|1\rangle = \begin{bmatrix} + 0 \\ +1 +\end{bmatrix}$
+",8620,,8620,,12/1/2019 9:51,12/1/2019 9:53,How should I interpret $|2\rangle|3\rangle$?,,1,2,,,,CC BY-SA 4.0 +9010,2,,9009,12/1/2019 9:53,,3,," Your interpretation is right.
+ +1) $|2\rangle$ is $|10\rangle$, or vector $\begin{bmatrix}0\\0\\1\\0\end{bmatrix}$ in Hilbert space representing two q-bits system.
+ +2)Yes, it is possible as well. The first two q-bits in in state $|10\rangle$ and last two q-bits in state $|11\rangle$, hence the state of all four q-bits is $|1011\rangle$, or $|11\rangle$ (eleven!) in decimal but I would recommend to avoid writing decimal numbers in this case as they can be confused with binary numbers easily.
+",9006,,,,,12/1/2019 9:53,,,,0,,,,CC BY-SA 4.0 +9011,1,9016,,12/1/2019 12:57,,2,803,"How do I measure the first qubit of an entangled vector, say
+",9292,,55,,12/3/2019 12:07,12/6/2019 14:47,How to measure one of the qubits in a two-qubit register?,
+\begin{pmatrix} + 1 \\ + -1 \\ + 0 \\ + 0 \\ + \end{pmatrix} +is what I get on the end of Deutsch's algorithm. If I get it right, I should now measure the first qubit in this 2-qubit register. How can I do it?,1,2,,,,CC BY-SA 4.0 +9012,1,,,12/1/2019 13:35,,3,514," Consider the modified version of the Traveling Salesman Problem where you are searching for a path of length less than some $k$. We can solve this problem using Grover's search where we encode each one of the possible paths as a quantum state and then search for the ones that have length less than $k$.
+The oracle for this problem is supposed to add the weights of the edges in the given path, check if the total weight is less than $k$ and output 1 if it is the case. How can one construct an oracle for this problem? Is there a practical implementation? How and where to encode the weights of the edges?
+",7986,,8757,,8/4/2020 7:03,8/4/2020 7:03,Grover's search for solving TSP,,0,3,,,,CC BY-SA 4.0 +9013,2,,8820,12/1/2019 14:10,,2,," The required fidelity $F$ is a function of the Cartesian product of the single $n$-qubit state space: $CP^{2^n-1}$ and $n$ copies of a single qubit state space: $CP^{1} \cong S^2$. The statistics of $F$ is computed for a sample space drawn uniformly from the state space regarded as a probability space with respect to its Fubini-Study measure.
+ +An explicit expression of $F$ is given in coordinates, and the assumption of the average: $<F> = \frac{1}{2^n}$ is validated by a direct integration.
+ +Next, the probability density function of $F$ is computed again by a direct integration (and found to be a beta distribution with parameters $\alpha = 1$, $\beta = 2^n-1$).
+ +The computation results are compared to a numerical experiment with $n=4$.
+ +Finally, the required probability is explicitly computed from the density function.
+ +We can parametrize the complex projective space $CP^{N-1}$, almost everywhere with the coordinates $ \mathbb{C}^{N-1} \ni \mathbf{\zeta} = \{[\zeta_1, . . ., \zeta_{N-1}]^t\}$. A random $N$-dimensional normalized vector corresponding to the point $\mathbf{\zeta}$ is given by (as a column vector): +$$|\psi(\mathbf{\zeta}, \mathbf{\bar{\zeta}})\rangle = \frac{[1, \zeta _1,.,.,., \zeta _{N-1}]^t}{\sqrt{1+\mathbf{\zeta}^{\dagger} \mathbf{\zeta} }}$$
+ +(We will eventually take $N=2^n$ or $N=2$). The Fubini-Study volume element is given by: +$$d{\mu}_{CP^{N-1}}(\mathbf{\zeta}, \mathbf{\bar{\zeta}}) = \frac{(N-1)!}{\pi^{N-1}}\frac{\prod_{k=1}^{N-1} d\zeta_k d\bar{\zeta}_k}{(1+\mathbf{\zeta}^{\dagger} \mathbf{\zeta})^N}$$ +(The prefactor serves for normalizing the volume to a unit mass).
+ +The following integral identities are valid: +$$\int_{CP^{N-1}} \frac{\zeta_k } {(1+\mathbf{\zeta}^{\dagger} \mathbf{\zeta})^N} d{\mu}_{CP^{N-1}}(\mathbf{\zeta}, \mathbf{\bar{\zeta})} = 0$$ +$$\int_{CP^{N-1}} \frac{\bar{\zeta}_k } {(1+\mathbf{\zeta}^{\dagger} \mathbf{\zeta})^N} d{\mu}_{CP^{N-1}}(\mathbf{\zeta}, \mathbf{\bar{\zeta})} = 0$$ +$$\int_{CP^{N-1}} \frac{1} {(1+\mathbf{\zeta}^{\dagger} \mathbf{\zeta})^N} d{\mu}_{CP^{N-1}}(\mathbf{\zeta}, \mathbf{\bar{\zeta})} = \frac{1}{N}$$ +$$\int_{CP^{N-1}} \frac{\zeta_k\bar{\zeta}_l } {(1+\mathbf{\zeta}^{\dagger} \mathbf{\zeta})^N} d{\mu}_{CP^{N-1}}(\mathbf{\zeta}, \mathbf{\bar{\zeta})} = \frac{1}{N}\delta_{kl}$$
+ +The Fubini-Study volume element is invariant with respect to the following unitary transformation realized non-linearly on the coordinates: +Let $U \in U(N)$ be given in the following block form: +$$U = \begin{bmatrix} +a & \mathbf{b}^t\\ +\mathbf{c} & D +\end{bmatrix}$$ +($a$ is a scalar, $b$ and $c$ are $N-1$ dimensional column vectors and $D$ is an $N-1\times N-1$ matrix). +$$\begin{bmatrix} 1\\ \mathbf{\zeta} \end{bmatrix} \rightarrow \begin{bmatrix} 1\\ \mathbf{\zeta}' \end{bmatrix} = (a + \mathbf{b}^t \zeta)\, U \begin{bmatrix} 1\\ \mathbf{\zeta} \end{bmatrix}$$ +The first factor is a multiplier (cocycle).
+ +Similarly, the $k$-th single qubit complex projective line can be parametrized almost everywhere by: +$$|\alpha_k(z_k, \bar{z}_k)\rangle = \frac{[1, z_k]^t}{\sqrt{1+\bar{z_k} z_k }}$$ +And the corresponding volume element: +$$d{\mu}_{CP^{1}}(z_k, \bar{z}_k) = \frac{1}{\pi}\frac{dz_k d\bar{z_k}}{(1+\bar{z_k} z_k)^2}$$ +Denoting by $f$ the natural mapping from the power set of $\mathbb{Z}_{n} = \{0, .,.,., n-1\}$ to $\mathbb{Z}_{2^n}$: +$$f(x) = \sum_{k \in x} 2^k$$ +and using the shorthand notation: +$$z^{ f(x) } = \prod_{ k\in x } z_k$$ +(with the convention $\zeta_0 = z_0 = 1$) +Tensoring the single qubit vectors and performing the inner product, we get: +$$F(\mathbf{\zeta}, z_0, ., ., . z_{n-1}, \mathbf{\bar{\zeta}}, \bar{z}_0, ., ., . \bar{z}_{n-1})= \frac{|\sum_{x \in \mathcal{P}(\mathbb{Z}_{n})} \zeta_{f(x)} \bar{z}^{f(x)} |^2}{(1+\mathbf{\zeta}^{\dagger} \mathbf{\zeta}) \prod_{k \in \mathbb{Z}_{n}} (1+\bar{z_k} z_k)}$$ +The average of $F$ is computed by means of the following integral: +$$<F> = \int_{CP^{2^n-1}} d{\mu}_{CP^{N-1}}(\mathbf{\zeta}, \mathbf{\bar{\zeta}}) \prod_{k=0}^{N-1} d{\mu}_{CP^{1}}(z_k, \bar{z}_k) F(\mathbf{\zeta}, z_0, ., ., . z_{n-1}, \mathbf{\bar{\zeta}}, \bar{z}_0, ., ., . \bar{z}_{n-1})$$ +Expanding the numerator of $F$, we get a quadratic polynomial in $\mathbf{\zeta}, \mathbf{\bar{\zeta}}$. Using the integration formulas, only $2^n$ terms survive, each contributing $\frac{1}{2^n}$. Thus, we are left with: +$$<F> = \frac{1}{2^n} \prod_{k=0}^{N-1} d{\mu}_{CP^{1}}(z_k, \bar{z}_k) \frac{\sum_{x \in \mathcal{P}(\mathbb{Z}_{n})} z^{f(x)} \bar{z}^{f(x)} }{ \prod_{k \in \mathbb{Z}_{n}} (1+\bar{z_k} z_k)}$$ +The numerator factors to the denominator, and we are left with a product of $2^n$ normalized volumes of $CP^1$, i.e. $1$, +Thus + $$<F> = \frac{1}{2^n}$$ +Given the explicit expression of the function $F$ on a probability space; its probability density function can be written as: +$$p_F(y) = \int_{CP^{2^n-1}} d{\mu}_{CP^{N-1}}(\mathbf{\zeta}, \mathbf{\bar{\zeta}}) \prod_{k=0}^{N-1} d{\mu}_{CP^{1}}(z_k, \bar{z}_k) \delta(F(\mathbf{\zeta}, z_0, ., ., . z_{n-1}, \mathbf{\bar{\zeta}}, \bar{z}_0, ., ., . \bar{z}_{n-1}) – y)$$ +We observe that the numerator of $F$ can be written as: +$$\begin{bmatrix}1 & \bar{\mathbf{\zeta}}\end{bmatrix} +\begin{bmatrix}1 \\ \mathbf{z}\end{bmatrix} +\begin{bmatrix}1 & \bar{\mathbf{z}}\end{bmatrix} +\begin{bmatrix}1 \\ \mathbf{\zeta}\end{bmatrix}$$ +The interior matrix (depending on $\mathbf{z}$ only) is of unit rank; thus it can be diagonalized by a unitary transformation to a matrix of the form:
+ +$$ \mathrm{diag }\begin{bmatrix} 1+ \mathbf{z}^{\dagger} \mathbf{z}, & 0, & 0, & ... \end{bmatrix}$$ +(Please notice that the scalar cocycles cancel between the numerator and the denominator and the Fubini-Study measure is invariant under the transformation).
+ +As mentioned above, the nonvanishing first element just factors out to the denominator depending on $z$. Thus, we are left with $n$ integrations on the normalized volumes of $CP^1$ giving an overall result of $1$ with respect to the $z$ integration. As for the $\zeta$ dependent terms, we are left with only one term of $\begin{bmatrix}1 & \bar{\mathbf{\zeta}}\end{bmatrix} \begin{bmatrix}1 \\ \mathbf{\zeta}\end{bmatrix}$, which can be taken the first, i.e., $1$, thus the delta function term becomes: +$$\delta(\frac{1}{(1+\mathbf{\zeta}^{\dagger} \mathbf{\zeta})}-y)$$ +Performing the standard manipulations on the delta function, we obtain: +$$\frac{1}{2y^{\frac{3}{2}}(1-y)^{\frac{1}{2}}}\delta(\sqrt{\mathbf{\zeta}^{\dagger} \mathbf{\zeta}}-\sqrt{\frac{1-y}{y}})$$ +The constraint is a spherical surface of dimension $2N-3$ inside $CP^{N-1}$ and radius $\sqrt{\frac{1-y}{y}}$ +Using the surface area formula for a $n-1$ sphere of unit radius: +$$S_{n-1} = \frac{n \pi^{\frac{n}{2}}}{\Gamma(\frac{n}{2}+1)}$$ +We arrive at: +$$ p_F(y) = \frac{1}{2y^{\frac{3}{2}}(1-y)^{\frac{1}{2}}} \frac{(2N-2) \pi^{N-1}}{\Gamma(N)} \left(\sqrt{\frac{1-y}{y}}\right)^{2N-3} \frac{(N-1)!}{\pi^{N-1}} y^N = (N-1)(1-y)^{N-2}$$ +Which is just the beta distribution, with the parameters $\alpha = 1$, $\beta = 2^n-1$).
+ +Thus, for the $n$ qubit case, we have: +$$ p_F(y) = = (2^n-1)(1-y)^{2^n-2}$$ +A numerical experiment was performed with $n=4$ with $10^6$ draws. The following figure compares the computed probability density function to the experiment's histogram:
+ + + +From the probability density function, we get asymptotically for n>>1 and $\epsilon>>\frac{1}{2^n}$: +$$\mathrm{Pr}(y>\frac{1}{2^n}+\epsilon) = e^{-2^n\epsilon}$$
+",4263,,4263,,12/1/2019 15:36,12/1/2019 15:36,,,,2,,,,CC BY-SA 4.0 +9014,1,9026,,12/1/2019 15:08,,8,1566,"I would like to do a quantum tomography on two qubit states.
+Recently, I successfully did so for one qubit based on Nielsen-Chuang. They advise to use this formula for one qubit density operator estimation:
+\begin{equation} +\rho = \frac{\text{tr}(\rho)I+\text{tr}(X\rho)X+\text{tr}(Y\rho)Y+\text{tr}(Z\rho)Z}{2}, +\end{equation}
+where for example $\text{tr}(X\rho)$ can be estimated as a sum of eigenvalues corresponding to eigenvectors of an observable $X$ divided by the total number of observations. Or in other words, a quantum state is measured in the $X$ basis, and the eigenvalues $\pm1$ are assigned to the respective outcomes of the measurement. Similarly, this is done for observables $Y$ and $Z$. Clearly $\text{tr}(\rho)=1$.
+After that, Nielsen and Chuang proposed the generalization of quantum state tomography for more qubits. The density operator is estimated by this formula: +\begin{equation} +\rho=\sum_{\vec{v}}\frac{\text{tr}(\sigma_{v_1}\otimes\sigma_{v_2}...\otimes\sigma_{v_n}\rho)\sigma_{v_1}\otimes\sigma_{v_2}...\otimes\sigma_{v_n}}{2^n} +\end{equation}
+where sigmas are Pauli matrices $X$, $Y$, $Z$ and identity matrix $I$. Vector $\vec{v}; v_{i}\in \{0,1,2,3\}$; specifies which Pauli matrices are combined in Kronecker product.
+In the case of two qubits, observables in the estimator above are Kronecker products of two Pauli matrices. I realized that their eigenvector as very often Bell states. For example, observable $Z \otimes Z$ is an exception as it has eigenvectors corresponding to the basis of $\mathbb{C}^2$.
+My questions are:
++
+",9006,,55,,6/17/2021 8:52,11/3/2021 12:20,How to perform quantum state tomography on two qubits?,- +
In case eigenvectors of a observable coresponds to Bell states, I would measure a quantum state in Bell basis. Am I right?
+- +
How to measure in case an observable is in shape $I\otimes \sigma$ or $\sigma\otimes I$, where $\sigma$ is some Pauli matrix? Does it mean that I should measure only one q-bit?
+,1,0,,,,CC BY-SA 4.0 +9015,1,,,12/1/2019 15:13,,8,281," Just like other classical and quantum key distribution protocols, BB84 is vulnerable to "man"-in-the-middle attacks, where Eve pretends to be Bob to Alice, and Eve pretends to be Alice to Bob. The countermeasure against this potential "man"-in-the-middle attack is to implement authentication and data integrity checks on the Alice-Bob classical channel. [1] [2] [4] [5]
+My question is: what authentication protocol should we use for BB84 and other QKD protocols?
+I can think of the following candidates:
++
+- +
We could use pre-shared keys as suggested in [1]. But that feels problematic to me for two reasons.
+1.1. The whole point of having a key distribution protocol is to avoid the need for pre-shared keys. If the pre-shared key is ever leaked, authentication and hence the QKD protocol itself is compromised.
+1.2. A client can only connect to a server if the client and server already have agreed on a pre-shared key. In many use cases (e.g. web browser connecting to a web server) this is a very unreasonable requirement.
+- +
Start with a pre-shared key for the first key agreement. But during that first key agreement, generate some extra key bits that are used for authentication during the next key agreement, etc. This is suggested in [3] and [6]. However, if one of the devices loses its state (e.g. due to a power cycle or field replacement after a failure) we have to revert back to the first pre-shared key. Thus, the first pre-shared key will always be a vector of attack.
+- +
In classical key distribution protocols problem, both 1.1 and 1.2 are solved by using authentication protocols such as RSA or DSA that rely on PKI and on the use of certificates and trusted CAs. However, we cannot use RSA or DSA for QKD authentication because both RSA and DSA are quantum-unsafe (they assume discrete logs are hard).
+- +
Use post quantum crypto (PQC) algorithms to authenticate the QKD session. But if you trust PQC, then why not use it for everything instead of using QKD; PQC is easier to deploy since it not require any quantum photon sources or quantum photon detectors.
+So, to reiterate my question in another way, is there an authentication protocol that achieves both of the following goals?
+A. It allows a client to authenticate any server without assuming that the client and server have a pre-shared key.
+B. It is quantum-safe.
+
++ +References: + +
+ +[1] [Is quantum key distribution safe against MITM attacks too?](https://crypto.stackexchange.com/questions/2719/is-quantum-key-distribution-safe-against-mitm-attacks-too#2721) + +
+ +[2] Van Meter, Rodney. Quantum Networking (Networks and Telecommunications). Wiley. Kindle Edition. Section 5.2: ""A true man-in-the-middle attack is foiled by (and explains the need for) authentication and data integrity checks on the classical channel."" + +
+ +[3] Reis, André. Quantum Key Distribution Post Processing - A study on the Information Reconciliation Cascade Protocol. Section 1.1 footnote: ""Specially important, those [extra key] bits can be used to generate Message Authentication Codes for future QKD executions to extend the length of the shared key"" + +
+ +[4] Reis, André. Quantum Key Distribution Post Processing - A study on the Information Reconciliation Cascade Protocol. Section 2.2: ""the classical phase uses a public classical authenticated channel (using Digital Signatures or Message Authentication Codes)"" + +
+ +[5] ETSI GS QKD 002 V1.1.1 ""Quantum Key Distribution; Use Cases"". Section 4.1.2: ""Quantum key distribution, too, requires authentication of the parties to rule out man-in-the-middle attacks. This is done by public discussion on the classical channel which uses a message authentication primitive to guarantee message integrity."" + +
+ +[6] ETSI GS QKD 002 V1.1.1 ""Quantum Key Distribution; Use Cases"". Section 4.1.3: ""In QKD, a small fraction of the continuously generated key can be used for information theoretically secure message +authentication, but when a link is taken into operation, a pre-distributed initial secret is necessary to authenticate the +public channel before the first quantum keys become available. This is comparable to digital signature schemes, where +the public key (mostly in the form of identity certificates) of the sender, or the public key of a trusted third party, when +transitive trust relations are applied, must be pre-distributed (e.g. with the web browser). Insofar the necessity of a +pre-distributed secret constitutes no principal disadvantage of information theoretically secure authentication schemes, +as opposed to signature based or MAC based authentication systems, as this is claimed e.g. in [i.21]."" + +",4733,,4733,,11/25/2021 12:59,12/30/2021 9:15,What authentication protocol to use for BB84 and other QKD protocols?,
,0,0,,,,CC BY-SA 4.0 +9016,2,,9011,12/1/2019 15:53,,4,," To measure, observe that you are simply projecting a quantum state onto some basis set of vectors. First, I will note that this state is not normalized. Let us first define the following quantum state.
+ +$$|\psi_i\rangle = \begin{pmatrix}1\\-1\\0\\0\end{pmatrix}.$$
+ +Then, calculating the corresponding probability yields: +$$|\langle \psi_i|\psi_i\rangle|^2 = (1)(1) + (-1)(-1) = 2.$$
+ +So to normalize this state, we will simply divide by $\sqrt{2}$. Thus, we obtain the state: +$$|\psi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix}1\\-1\\0\\0\end{pmatrix}.$$ +We now wish to measure this state in the standard basis, and so we wish to project the state onto the set of basis vectors: +$$|00\rangle = \begin{pmatrix}1\\0\\0\\0\end{pmatrix}, |01\rangle = \begin{pmatrix}0\\1\\0\\0\end{pmatrix},|10\rangle = \begin{pmatrix}0\\0\\1\\0\end{pmatrix},|11\rangle = \begin{pmatrix}0\\0\\0\\1\end{pmatrix}$$.
+ +We will now calculate the probability amplitude of the state collapsing to each of those states. That is, we wish to calculate: +$$\langle00|\psi\rangle\\=\frac{1}{\sqrt{2}}\begin{pmatrix}1&0&0&0\end{pmatrix}\begin{pmatrix}1\\-1\\0\\0\end{pmatrix}\\=\frac{1}{\sqrt{2}}.$$
+ +$$\langle01|\psi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix}0&1&0&0\end{pmatrix}\begin{pmatrix}1\\-1\\0\\0\end{pmatrix}\\=-\frac{1}{\sqrt{2}}.$$
+ +And although it is trivial to see that the amplitudes of the two remaining states will be zero, I will include the calculations for completeness: +$$\langle10|\psi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix}0&0&1&0\end{pmatrix}\begin{pmatrix}1\\-1\\0\\0\end{pmatrix}\\=0.$$
+ +$$\langle11|\psi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix}0&0&0&1\end{pmatrix}\begin{pmatrix}1\\-1\\0\\0\end{pmatrix}\\=0.$$
+ +And so we see that the probability of obtaining the $|00\rangle$ and $|01\rangle$ states are 0.5 each, and so measurement of the first qubit must yield the $|0\rangle$ state. To see what would happen if you measured the second qubit, simply sample the $|00\rangle$ and $|01\rangle$ states once according to the aforementioned probabilities.
+ +Edit: In response to a comment left on this answer, I have added the following note. +If you have the state:
+ +$$|\psi\rangle = \alpha_0|0\rangle + ... + \alpha_N|N\rangle,$$
+ +then the probability amplitude of obtaining a component of the state, $|\psi_i\rangle$, is given by $\langle \psi_i|\psi\rangle$. Consequently, the probability of measuring a value associated with $|\psi_i\rangle$ is given by $|\langle \psi_i|\psi\rangle|^2$.
+",5157,,5157,,12/6/2019 14:47,12/6/2019 14:47,,,,4,,,,CC BY-SA 4.0 +9017,1,,,12/1/2019 17:45,,0,52,"I came across a ""new"" type of quantum computer - photonic quantum computing. Is this type of technology of interest here? You may read about an example here. I wonder how many types of quantum computers are now researched? Any good summary of these technologies?
+",9261,,26,,12/1/2019 17:54,12/1/2019 17:54,How many types of quantum computers are currently being researched?,,0,7,,12/2/2019 1:22,,CC BY-SA 4.0 +9018,1,9019,,12/1/2019 18:06,,1,315," I am struggling with the density matrix for diagonally polarized photons. Can I think of diagonally polarized photons as a mixture of vertically and horizontally polarized photons?
+",9314,,26,,12/1/2019 18:18,12/1/2019 18:18,Density matrix for a diagonally polarized photon,