Recent Questions - Quantum Computing Stack Exchange most recent 30 from quantumcomputing.stackexchange.com 2023-10-04T00:18:16Z https://quantumcomputing.stackexchange.com/feeds https://creativecommons.org/licenses/by-sa/4.0/rdf https://quantumcomputing.stackexchange.com/q/34354 1 QFI of a thermal state Noobgrammer https://quantumcomputing.stackexchange.com/users/26822 2023-10-03T23:58:03Z 2023-10-03T23:59:33Z <p>Let <span class="math-container">$\rho=\frac{1}{Z}\exp(-\beta H)$</span> be the thermal state associated to the Hamiltonian <span class="math-container">$$H=\hbar\omega\sum_i\left( a_i^\dagger a_i+\frac12\right).$$</span></p> <p>I wonder how the quantum Fisher information of such a state computed. Most sources give expressions for pure states, or for mixed states in the form <span class="math-container">$\rho=\sum_kp_k|\psi_k\rangle\langle\psi_k|$</span>. Can anyone point me to some reference that illustrates how to do such calculations?</p> https://quantumcomputing.stackexchange.com/q/34353 0 An unexpected result of the Implementation of a finding minimum values algorithm using a qRAM j__j https://quantumcomputing.stackexchange.com/users/25140 2023-10-03T21:11:58Z 2023-10-03T22:15:21Z <p>Motivated by the article <a href="https://arxiv.org/abs/2301.05122" rel="nofollow noreferrer">Quantum algorithm for finding minimum values in a Quantum Random Access Memory</a>, I'm training to implement a simplified version of the proposed algorithm. But the output isn't what I expected. Please help me find out what I am doing wrong.</p> <p>The algorithm idea is to find the minimum value of a data set checking the most significant qubit.</p> <p>( if the most significant bit is zero, it means that its value is less than the other with the most significant bit equal to one.</p> <p>ex:</p> <p>01 -&gt; most significant qubit = 0,</p> <p>10 -&gt; most significant qubit = 1.</p> <p>it means 01 &lt; 10.</p> <p>)</p> <p>So, using a qRAM to load the data and associate each element to an index, we must use the Grover algorithm to amplify the minimum value index, and then find the minimum value.</p> <p>So, in the simplified version, I want to find the minimum value between &quot;010&quot; and &quot;101&quot;</p> <p><span class="math-container">$|00\rangle_{\text{index}} \rightarrow |010\rangle_{\text{data}}$</span></p> <p><span class="math-container">$|01\rangle_{\text{index}} \rightarrow |101\rangle_{\text{data}}$</span></p> <p>so, the algorithm must to amplify the index <span class="math-container">$|00\rangle_{\text{index}}$</span> that corresponds to the data element <span class="math-container">$|010\rangle_{\text{data}}$</span>. But, in the end, the measurement result is <span class="math-container">$01$</span> that corresponds to the value <span class="math-container">$|101\rangle_{\text{data}}$</span>.</p> <p>The figures below show the algorithm circuit and result.</p> <p><a href="https://i.stack.imgur.com/MagsP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MagsP.png" alt="simplified version circuit" /></a></p> <p><a href="https://i.stack.imgur.com/c7oxH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c7oxH.png" alt="decomposed version" /></a></p> <p><a href="https://i.stack.imgur.com/WyHnJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WyHnJ.png" alt="result" /></a></p> https://quantumcomputing.stackexchange.com/q/34352 0 Why are the results of this Fourier adder circuit wrong? Jackson Walters https://quantumcomputing.stackexchange.com/users/26436 2023-10-03T19:44:19Z 2023-10-03T19:44:19Z <p>I am attempting to implement the adder found in <a href="https://arxiv.org/pdf/quant-ph/0205095.pdf" rel="nofollow noreferrer">this paper</a>.</p> <p><img src="https://i.stack.imgur.com/usThI.png" alt="fourier adder circuit" /></p> <p>Here is the code:</p> <pre><code>#build the phi adder circuit #controlled phase gates are .cp() def phi_add(num_bits): qc = QuantumCircuit(2*num_bits,num_bits) #initialize a register #qc.x(0) qc.x(1) #qc.x(2) #qc.x(3) #initialize b register qc.x(4) qc.x(5) qc.x(6) qc.x(7) #append Fourier transform to second register qc.append(QFT(num_qubits=4),range(num_bits,2*num_bits)) #append phase addition gates for k in range(num_bits): for j in range(num_bits-k): qc.cp(2*np.pi/2**(j+1),control_qubit=num_bits-k-1-j,target_qubit=2*num_bits-k-1) #append inverse Fourier transform to second register qc.append(QFT(num_qubits=4,inverse=True),range(num_bits,2*num_bits)) qc.measure(range(num_bits,2*num_bits), range(num_bits)) return qc </code></pre> <p>Resulting in this diagram:</p> <p><img src="https://i.stack.imgur.com/SglP9.png" alt="Fourier adder circuit diagram" /></p> <p>Which yields results that don't look very good:</p> <p><img src="https://i.stack.imgur.com/mtZAJ.png" alt="Aer simulation results" /></p> https://quantumcomputing.stackexchange.com/q/34350 1 Simplifying quantum circuits Spike Spiegel https://quantumcomputing.stackexchange.com/users/26817 2023-10-03T17:13:26Z 2023-10-03T19:22:31Z <p>I am very new to quantum circuits and am unsure how to simplify them. Say I'm given a very simple circuit:</p> <p><a href="https://i.stack.imgur.com/oiizC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oiizC.png" alt="circuit" /></a></p> <p>and I want to simplify it using basic quantum gates. I'm not looking for an answer, but more just how to go about it. I started by computing the outputs with <span class="math-container">$|0\rangle$</span>, <span class="math-container">$|1\rangle$</span>, <span class="math-container">$|+\rangle$</span> and <span class="math-container">$|-\rangle$</span> states and thought that a simple NOT gate would suffice because <span class="math-container">$|0\rangle \rightarrow |1\rangle$</span>, <span class="math-container">$|1\rangle \rightarrow |0\rangle$</span>, <span class="math-container">$|+\rangle \rightarrow |+\rangle$</span>. However, when it comes to the <span class="math-container">$|-\rangle$</span> state, the output is <span class="math-container">$-|-\rangle$</span>, and I don't know how to account for that when doing the simplification.</p> <p>Very basic question but any help is appreciated.</p> https://quantumcomputing.stackexchange.com/q/34349 0 Can qubits be entangled without being classically corelated? yousef elbrolosy https://quantumcomputing.stackexchange.com/users/12207 2023-10-03T17:00:51Z 2023-10-03T20:36:28Z <p>I have read before that classical correlations between qubits does not guarantee entanglement, but is the opposite also true?</p> <p>Consider a 3 qubit system, prepared as follows: <br /> <br /> <span class="math-container">$1-$</span> A Hadamard gate is applied to qubit 0 <br /> <span class="math-container">$2-$</span> A CNOT gate is applied where the target is qubit 1 and the control is qubit 0 <br /> <span class="math-container">$3-$</span> A Hadamard gate is applied to qubit 2 <br /> <span class="math-container">$4-$</span> A CNOT gate is applied where the target is qubit 1 and the control is qubit 2 <br /> <br /> Is this state entangled? <span class="math-container">$$\frac12 (|000\rangle + |011\rangle + |101\rangle + |110\rangle)$$</span> If it is, how would I know, given that I do not see how the measurement of any one qubit gives me information about the states of the other qubits?</p> https://quantumcomputing.stackexchange.com/q/34345 0 Please teach the construction law of oracle $U_f$ in Grover’s algorithm Ren-Xin Zhao https://quantumcomputing.stackexchange.com/users/19201 2023-10-03T06:42:05Z 2023-10-03T16:20:18Z <p><a href="https://i.stack.imgur.com/Y8f6F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y8f6F.png" alt="![image|690x196](upload://4duiwxn09NE1l4cRcdrgo1OATc8.png)" /></a></p> <p>The framework of Grover's algorithm is shown in Figure from Qiskit. <a href="https://learn.qiskit.org/course/ch-algorithms/grovers-algorithm" rel="nofollow noreferrer">https://learn.qiskit.org/course/ch-algorithms/grovers-algorithm</a></p> <p>But I didn't understand the tutorial's construction rules for <span class="math-container">$U_f$</span>. If there are four qubits, labeled 0001, 0010, 1001, and 1110, how to design <span class="math-container">$U_f$</span>? If there are 5 bits, labeled 00101, 01010, 10101, and 11110, how to design <span class="math-container">$U_f$</span>? Can you summarize in code how Uf imposes CZ gates?</p> <p><a href="https://i.stack.imgur.com/kpJ0P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kpJ0P.png" alt="@CatalinaAlbornoz" /></a></p> <p>Also, what is the difference between a Phase Oracle and a Boolean Oracle<a href="https://i.stack.imgur.com/Y8f6F.png" rel="nofollow noreferrer">1</a>?</p> <p><a href="https://i.stack.imgur.com/Y8f6F.png" rel="nofollow noreferrer">1</a> C. Figgatt, D. Maslov et al., “Complete 3-qubit Grover search on a programmable quantum computer,” Nature Communications, vol. 8, no. 1, pp. 1918, 2017. <a href="https://www.nature.com/articles/s41467-017-01904-7" rel="nofollow noreferrer">https://www.nature.com/articles/s41467-017-01904-7</a></p> https://quantumcomputing.stackexchange.com/q/34342 0 Are unital channels always mixed-unitary? Sudhir Kumar https://quantumcomputing.stackexchange.com/users/26793 2023-10-03T04:15:52Z 2023-10-03T09:36:19Z <p>How to prove mixed unitary of a channel for a multi-qubit system is not Unital. I am trying to prove Problem 8.3 of Nelson and Chuang's book. Here's a snippet of the text:</p> <p><a href="https://i.stack.imgur.com/Vd2cx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vd2cx.png" alt="enter image description here" /></a></p> <p>Shall I need to take two parallel channels to prove this thing, and instead of <span class="math-container">$\rho_{AB}$</span> even I will take <span class="math-container">$I_{AB}$</span>? It's the case of separable. Can someone please help me this how to prove it is not unital for a multi-qubit system.</p> https://quantumcomputing.stackexchange.com/q/34341 1 Error: module 'rustworkx' has no attribute 'visit' when trying to execute a quantum circuit in a real quantum computer from IBM Marcos Quintas Pérez https://quantumcomputing.stackexchange.com/users/22374 2023-10-02T20:54:01Z 2023-10-02T20:58:51Z <p>I am trying to use a real quantum computer from IBM. I have the next code:</p> <pre><code>qc = QuantumCircuit(2,2) qc.h(0) qc.cx(0, 1) qc.ry(np.pi/2, 0) qc.measure(1,0) IBMQ.save_account('MY TOKEN') IBMQ.load_account() provider = IBMQ.get_provider(hub='ibm-q', group='open', project='main') backend = provider.get_backend('ibm_nairobi') mapped_circuit = transpile(qc, backend=backend) qobj = assemble(mapped_circuit, backend=backend, shots=1024) job = backend.run(qobj) result = job.result() counts = result.get_counts() print(counts) </code></pre> <p>Instead of &quot;MY TOKEN&quot; I have wrote my token and that's not the problem. The problem is when my circuit try to execute in the real quantum computer that I get the error <strong>module 'rustworkx' has no attribute 'visit'</strong> in Python</p> https://quantumcomputing.stackexchange.com/q/34339 0 How to find explicit gate decomposition of a circuit implementing a unitary using HamiltonianGate()? Pratham Hullamballi https://quantumcomputing.stackexchange.com/users/21731 2023-10-02T19:30:22Z 2023-10-02T20:06:43Z <p>I'm new to Qiskit. I am trying to construct a gate from HamiltonianGate(), available on Qiskit. The Hamiltonian in question is: <span class="math-container">$$H = - \pi\delta(Z_1 - Z_2) + 2\pi J ~ \mathbf{I}_1 \cdot \mathbf{I}_2$$</span> where <span class="math-container">$\mathbf{I}_1$</span> and <span class="math-container">$\mathbf{I}_2$</span> are Pauli vectors, each for system 1 and system 2, respectively.</p> <p>Although I was able to do so by using <code>HamiltonianGate()</code>, when I try to see my circuit, I end up getting something like this:</p> <p><a href="https://i.stack.imgur.com/jcTcr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jcTcr.png" alt="enter image description here" /></a></p> <p>I was hoping to find explicit gate decomposition of my unitary from <code>HamiltonianGate()</code>, but I'm unable to find a way to do so.</p> <p>Please do let me know how I can proceed from here and obtain the explicit gate decompositions. If this is, for some reason, not possible, then please do let me know why it is so. Also, if given this scenario, any help in simulating the unitary associated with the above Hamiltonian via elementary gates would be very much appreciated!</p> https://quantumcomputing.stackexchange.com/q/34336 1 Does the number of stabilizers bound the number of correctable errors? JRT https://quantumcomputing.stackexchange.com/users/14178 2023-10-02T13:37:44Z 2023-10-02T14:06:05Z <p>Suppose I have a quantum error correcting code with two stabilizers. Does this mean that I can potentially correct at most 3 distinct errors using this code?</p> <p>My reasoning is that for each error, we need a syndrome. With only two stabilizers, we have the syndromes <span class="math-container">$(00, 01, 10, 11)$</span>. The first one is the case of no error so that leaves three more errors.</p> <p>In general, does the number of stabilizer elements bound the number of correctable errors?</p> https://quantumcomputing.stackexchange.com/q/34334 3 Distance of the concatenated quantum error correcting code SiOn https://quantumcomputing.stackexchange.com/users/26725 2023-10-02T05:23:42Z 2023-10-02T09:57:15Z <p>If we have two quantum error correcting qubit <span class="math-container">$[[n_1, 1, d_1]]$</span> and <span class="math-container">$[[n_2,1,d_2]]$</span> codes then the notes of Preskill (<a href="http://theory.caltech.edu/%7Epreskill/ph229/notes/chap7.pdf" rel="nofollow noreferrer">http://theory.caltech.edu/~preskill/ph229/notes/chap7.pdf</a>) says that the concatenation of the codes is a code of distance at least <span class="math-container">$d_1d_2.$</span> Could someone prove it mathematically?</p> <p>By concatenation I mean the code given by the encoding map <span class="math-container">$\phi_2^{\otimes n_1}\circ \phi_1,$</span> where <span class="math-container">$\phi_i$</span> is the encoding map of <span class="math-container">$[[n_i, 1, d_i]]$</span> code.</p> https://quantumcomputing.stackexchange.com/q/34332 0 Are quantum simulation results more accurate than real IBMQ device results? mr coder https://quantumcomputing.stackexchange.com/users/26794 2023-10-02T01:23:12Z 2023-10-02T04:41:39Z <p>Getting two different results from simulation and rel IBMQ device. Which is more accurate?</p> https://quantumcomputing.stackexchange.com/q/34328 0 DeprecationWarning: Back-references to from Bit instances to their containing Registers have been deprecated Evan Camilleri https://quantumcomputing.stackexchange.com/users/20499 2023-10-01T16:44:36Z 2023-10-01T18:23:37Z <p>I have the following code</p> <pre><code>for instruction, qargs, cargs in qc.data: qbit: qiskit.circuit.Qubit = qargs print(qbit.register) print(qbit.index) </code></pre> <p>the last 2 lines give me a warning:</p> <blockquote> <p>DeprecationWarning: Back-references to from Bit instances to their containing Registers have been deprecated. Instead, inspect Registers to find their contained Bits.</p> </blockquote> <p>How can I read them to avoid the warning?</p> https://quantumcomputing.stackexchange.com/q/34326 0 Using Classiq for Grover Search Ron Cohen https://quantumcomputing.stackexchange.com/users/19044 2023-10-01T14:53:20Z 2023-10-01T14:53:20Z <p>I am participating Classiq Bootcamp, <a href="https://www.youtube.com/watch?v=ByADhIk42vw" rel="nofollow noreferrer">First lesson here</a>, and I need to implement Grover Search in a specific result that satisfies <a href="https://docs.google.com/forms/d/e/1FAIpQLSfutepbBo0gw27BYG8xopGrQDnfW5qUXu6fHHxVN566WqP3bg/viewform" rel="nofollow noreferrer">few constrains</a>:</p> <ol> <li><p>The circuit should encompass a minimum of two Grover iterations.</p> </li> <li><p>The oracle must incorporate at least two variables.</p> </li> <li><p>In the obtained measurement results, precisely four unique bitstrings should be observed with a frequency of at least 20%. All other bitstrings should appear with a frequency of less than 5%.</p> </li> </ol> <p>I see that I have to choose a number of iterations, is this the number of Grover Iterations? Should I calculate it according to the expression I choose?</p> <p><a href="https://i.stack.imgur.com/hXWyQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hXWyQ.png" alt="enter image description here" /></a></p> https://quantumcomputing.stackexchange.com/q/34325 0 Can we use entanglement for cascaded measurements yousef elbrolosy https://quantumcomputing.stackexchange.com/users/12207 2023-09-30T23:50:00Z 2023-10-02T18:22:28Z <p>My question is as follows: Suppose we have two entangled states, for example, a GHZ state where <span class="math-container">$|000\rangle$</span> and <span class="math-container">$|111\rangle$</span> are entangled Now, suppose the <span class="math-container">$|111\rangle$</span> state is entangled with another state, say <span class="math-container">$|110\rangle$</span> (correct me if I make wrong assumptions along the way, for example, concerning the states, however, I am asking for the general concept) Wouldn’t measuring one of the qubits tell us the state of the other two qubits, and by knowing the state of the other 2 qubits we now know the state of the 4th and 5th qubit?</p> <p>How would we represent this mathematically if possible?</p> <p>For context (e.g.: there are three entangled qubits and one of these qubits is entangled with another 2 <span class="math-container">$\to$</span> also, would that make them all entangled? )</p> https://quantumcomputing.stackexchange.com/q/34323 0 Can you project on an orthogonal basis for a multipartite system using only local measurements and classical communication? Abelaer https://quantumcomputing.stackexchange.com/users/26773 2023-09-29T18:31:36Z 2023-09-30T15:34:28Z <p>Say Alice possesses one qubit, and Bob two, and that the joint state is <span class="math-container">$|\psi_{A, B_1, B_2}\rangle = \alpha|n_1\rangle + \beta |n_2\rangle$</span>, where <span class="math-container">$|n_1\rangle$</span> and <span class="math-container">$|n_2\rangle$</span> are orthonormal basis states for the combined Hilbert space. If you have access to all qubits, there obviously is a measurement which projects on the basis that includes <span class="math-container">$|n_1\rangle$</span> and <span class="math-container">$|n_2\rangle$</span>.</p> <p>However, what if you only allow Alice and Bob to do local measurements on their qubits? Then, I assume that Bob would need to send at least one classical bit to Alice for a joint measurement to be possible. Do they also need local quantum registers? Can we say anything about when such a joint measurement is possible?</p> <p>Perhaps a concrete example would be: Let's say Alice and Bob share the state <span class="math-container">$|\psi_{A, B_1, B_2}\rangle = \alpha|n_1\rangle + \beta |n_2\rangle$</span>. Is it possible, using only LOCC, to end up in the joint state <span class="math-container">$|n_1\rangle$</span> with probability <span class="math-container">$|\alpha|^2$</span>, and in <span class="math-container">$|n_2\rangle$</span> with probability <span class="math-container">$|\beta|^2$</span>, so that afterwards both parties know what the shared state is?</p> <p>I assume that the precise implementation of such a measurement will depend on the states <span class="math-container">$|n_1\rangle$</span> and <span class="math-container">$|n_2\rangle$</span>, but is there a general rule for when such a joint measurement is possible?</p> <hr /> <p>Crossposted to ph.se: <a href="https://physics.stackexchange.com/questions/782508/can-you-project-on-an-orthogonal-basis-for-a-multipartite-quantum-system-using-o">https://physics.stackexchange.com/questions/782508/can-you-project-on-an-orthogonal-basis-for-a-multipartite-quantum-system-using-o</a></p> https://quantumcomputing.stackexchange.com/q/34312 1 Whether/How can I combine logical error rates of the same circuit from different batches of samples in stim Jiakai Wang https://quantumcomputing.stackexchange.com/users/21800 2023-09-28T20:19:16Z 2023-10-02T18:22:34Z <p>Using one seed to generate one batch of sample and then compute the logical error rate is obviously statistically safe. But in case I want to sample one small batch at a time, how can I configure the measurement sampler(s) to make different batches independent at the stim Python API level? Should I use different seeds, or is there a way to configure the seeds to make it safe?</p> <p>Or, can I just call <code>Circuit.sampler()</code> without providing a seed, since <code>sinter</code> also creates <code>detector_sampler</code> without a seed and sample in small batches?</p> https://quantumcomputing.stackexchange.com/q/34297 1 Exercise 4.16 in the Nielsen & Chuang book Matodo https://quantumcomputing.stackexchange.com/users/26753 2023-09-27T15:41:34Z 2023-10-03T16:28:07Z <p>In the 4.16 exercice in the Quantum Computation and Quantum Information (Michael A. Nielsen &amp; Isaac L. Chuang), I don't understand why the correct answer is <strong>not</strong> this matrix :</p> <p><span class="math-container">$$\left[ {\begin{array}{ccccc} 1/\sqrt{2} &amp; 1/\sqrt{2} &amp; 0 &amp; 0 \\ 1/\sqrt{2} &amp; - 1/\sqrt{2} &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 1 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 1 \\ \end{array} } \right]$$</span></p> <p>Indeed, the Hadamard gate is applied on the first two qubits : <span class="math-container">$$|00\rangle , |01\rangle,$$</span> and nothing is applied to the others, so the previous matrix should be right.</p> <p>On the contrary, the right solution given is : <span class="math-container">$$\left[ {\begin{array}{ccccc} 1/\sqrt{2} &amp; 1/\sqrt{2} &amp; 0 &amp; 0 \\ 1/\sqrt{2} &amp; - 1/\sqrt{2} &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 1/\sqrt{2} &amp; 1/\sqrt{2} \\ 0 &amp; 0 &amp; 1/\sqrt{2} &amp; - 1/\sqrt{2} \\ \end{array} } \right]$$</span> after the calculation of the tensor product <span class="math-container">$$I_1 \otimes H_2.$$</span></p> https://quantumcomputing.stackexchange.com/q/34293 3 4 qubit QFT decomposition in the qiskit textbook pilsungk https://quantumcomputing.stackexchange.com/users/4695 2023-09-27T06:54:37Z 2023-10-03T08:44:47Z <p>I am reading about the quantum Fourier transform (QFT) in the <a href="https://learn.qiskit.org/course/algorithms/phase-estimation#phase-29-0" rel="nofollow noreferrer">qiskit textbook</a>, but got stuck at the last part of it which shows a decomposed version of the 4 qubit QFT circuit.</p> <p><a href="https://i.stack.imgur.com/WgIUs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WgIUs.png" alt="enter image description here" /></a></p> <p>It seems that the decomposition is a bit different than the QFT definition, in that the swap gates are placed differently. I guess some amount of simple optimizations for swap gates has been performed there in the decomposed version, but I can't figure out exactly what has happened. To me, the decomposition should look something like the following.</p> <p><a href="https://i.stack.imgur.com/p1p3n.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p1p3n.jpg" alt="enter image description here" /></a></p> <p>Can someone please explain?</p> https://quantumcomputing.stackexchange.com/q/34290 1 how is logical error rate calculated? unknown https://quantumcomputing.stackexchange.com/users/12265 2023-09-26T17:05:42Z 2023-09-30T04:52:27Z <p>I have a CSS code defined through binary matrices <span class="math-container">$H_X$</span> and <span class="math-container">$H_Z$</span>. I also have the logicals <span class="math-container">$L_X$</span> and <span class="math-container">$L_Z$</span> as binary matrices. I decode <span class="math-container">$H_X$</span> and <span class="math-container">$H_Z$</span> independently as classical codes. The decoder outputs the corrected codewords (from which I can calculate the residual errors). How do I calculate whether the residual error results in a logical error or not? It should be a (simple?) operation involving <span class="math-container">$L_X$</span> and <span class="math-container">$L_Z$</span> but I'm not clear on the details.</p> https://quantumcomputing.stackexchange.com/q/34240 5 Qudits in NISQ Devices: Benefits Beyond Dimensional Advantages? banercat https://quantumcomputing.stackexchange.com/users/21615 2023-09-21T12:18:40Z 2023-09-30T19:21:28Z <p>It's clear from foundational research that qudits can provide an enhanced control of the Hilbert space over qubits, and I've encountered references that highlight improved <a href="https://journals.aps.org/pra/abstract/10.1103/PhysRevA.67.012311" rel="nofollow noreferrer">robustness and noise tolerance</a> in quantum protocols such as QKD when using higher-dimensional systems. Furthermore, the number of controlled-sign gates needed to implement a Toffoli gate can be reduced when using qudits (as illustrated with qutrits, in <a href="https://journals.aps.org/pra/abstract/10.1103/PhysRevA.75.022313" rel="nofollow noreferrer">this paper</a>). This could hint at a more efficient circuit design or even improved error correction capabilities with qudits. Yet, it's also understood that active error correction might not be a primary focus <a href="https://quantum-journal.org/papers/q-2018-08-06-79/" rel="nofollow noreferrer">for NISQ devices</a> due to the limited number of available qubits.</p> <p>However, while the theoretical advantages are insightful, I'm curious about the potential implications and possible benefits when integrating qudits into NISQ devices. Additionally, given that institutions like Fermilab are actively researching or even building qudit-based hardware (as detailed in this <a href="https://arxiv.org/pdf/2204.08605.pdf" rel="nofollow noreferrer">Snowmass paper</a>), there seems to be at least some practical interest in their potential in the NISQ era.</p> <h5>Decoherence and Noise</h5> <p>Are there any indications or studies suggesting that qudits might exhibit inherent advantages in terms of reduced decoherence or susceptibility to certain types of noise on NISQ devices, beyond the specific context of QKD?</p> <h5>Quantum Simulation</h5> <p>One of the promising applications of NISQ devices lies in their potential for <a href="https://www.nature.com/articles/s41586-022-04940-6" rel="nofollow noreferrer">quantum simulation</a>. With qudits' richer state space, is there any evidence to suggest they might facilitate improved or more efficient quantum simulations of complex systems?</p> <h5>Hardware Considerations</h5> <p>I'm aware that creating and manipulating qudits tends to be more challenging than qubits. But is there any existing or emerging hardware architecture where qudits might have an experimental edge, or perhaps a unique synergy, when implemented on NISQ devices?</p> <p>While a <a href="https://physics.stackexchange.com/questions/106325/advantage-of-taking-qutrits-in-place-of-qubits">previous discussion on Physics Stack Exchange</a> touched upon some benefits of qudits, I'm particularly interested in their integration and potential benefits within the NISQ regime, given the practical challenges and opportunities it presents.</p> https://quantumcomputing.stackexchange.com/q/32468 0 Why does the qubit give random results in the circuit with rearranged CNOTs for Steane's seven qubit code in Stim? lassel https://quantumcomputing.stackexchange.com/users/25199 2023-05-06T05:34:00Z 2023-10-03T20:05:20Z <p>The following is a part of the syndrome measurement circuit for Steane's seven qubit code in Stim(For ease of viewing, the TICK is omitted.). Since we are considering the detection of X errors, we use the measurement results of the Z stabilizers' ancilla. Circuit_1 is a circuit that constructs the CNOTs of the Z stabilizer circuit after configuring the CNOTs of the X stabilizer circuit, and since it is a circuit with no errors, the results of DETECTOR in circuit_1 will always be False, which is the desired result. On the other hand, when considering circuit_2, which is a circuit designed to reduce the overall circuit depth by cleverly arranging the order of CNOTs, the CNOT operations are the same as in circuit_1, but the result of qubit 12 becomes random. Why is this happening?</p> <pre><code>circuit_1=stim.Circuit(''' #encode into code state MPP X3*X4*X5*X6 MPP X1*X2*X5*X6 MPP X0*X2*X4*X6 #ancilla of X stabilizers RX 7 8 9 #ancilla of Z stabilizers R 10 11 12 #CNOT of X stabilizers CX 7 6 8 5 CX 7 2 8 1 CX 7 4 8 6 CX 7 0 8 2 9 5 CX 9 6 CX 9 3 CX 9 4 #CNOT of Z stabilizers CX 6 12 CX 3 12 CX 4 12 CX 6 10 5 11 CX 2 10 1 11 CX 4 10 6 11 CX 0 10 2 11 5 12 #measurement of stabilizers MRX 7 8 9 MR 10 11 12 DETECTOR rec[-3] DETECTOR rec[-2] DETECTOR rec[-1] ''') </code></pre> <pre><code>circuit_2=stim.Circuit(''' MPP X3*X4*X5*X6 MPP X1*X2*X5*X6 MPP X0*X2*X4*X6 RX 7 8 9 R 10 11 12 CX 7 6 8 5 CX 7 2 8 1 6 12 CX 7 4 8 6 3 12 CX 7 0 8 2 9 5 4 12 CX 6 10 5 11 CX 9 6 2 10 1 11 CX 9 3 4 10 6 11 CX 9 4 0 10 2 11 5 12 MRX 7 8 9 MR 10 11 12 DETECTOR rec[-3] DETECTOR rec[-2] DETECTOR rec[-1] ''') <span class="math-container">`</span> </code></pre> https://quantumcomputing.stackexchange.com/q/32413 0 SX operator and superposition neilson https://quantumcomputing.stackexchange.com/users/21053 2023-05-03T07:50:08Z 2023-10-03T05:44:21Z <p>I am running some tests using the probabilities we get from statevector to assert values in qiskit. For instance, with two qubits and a hadamard gate on the first one we have:</p> <pre><code>circuit = QuantumCircuit(2) circuit.h(0) trace_out_qubits =  partial_trace = qi.partial_trace(qi.Statevector(circuit), trace_out_qubits) print(partial_trace.probabilities()) plot_bloch_multivector(partial_trace) </code></pre> <p>The output of the print statement is [0.5 0.5] and the bloch sphere looks like this:</p> <p><a href="https://i.stack.imgur.com/iEfeA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iEfeA.png" alt="hadamard gate" /></a></p> <p>If we replace the Hadamard gate with the SX gate, we have:</p> <pre><code>circuit = QuantumCircuit(2) circuit.sx(0) trace_out_qubits =  partial_trace = qi.partial_trace(qi.Statevector(circuit), trace_out_qubits) print(partial_trace.probabilities()) plot_bloch_multivector(partial_trace) </code></pre> <p>The output is also [0.5 0.5], and the bloch sphere looks like this:</p> <p><a href="https://i.stack.imgur.com/6cNxV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6cNxV.png" alt="sx gate" /></a></p> <p>So, it looks like the SX acts similarly to the Hadamard gate but with a rotation of <span class="math-container">$\frac{\pi}{2}$</span>, putting the <span class="math-container">$|0\rangle$</span> in superposition.</p> <p>My doubts:</p> <ol> <li>Are the SX and Hadamard gate equivalent when it comes to superposition?</li> <li>Can we use the SX gate together with the CX gate to entangle two qubits?</li> <li>In case the answers to these two questions are positive, what are all the other operators that put qubits in superposition? Can any operator that puts the vector on the plane XY be a &quot;superposition&quot; operator?</li> </ol> <p>Thank you,</p> https://quantumcomputing.stackexchange.com/q/31580 4 Probabilistic error cancellation: how are we sure (i) the inverse noise *mathematically* exists, (ii) its expansion contains implementable operations Marco Fellous-Asiani https://quantumcomputing.stackexchange.com/users/5008 2023-03-10T16:26:26Z 2023-10-03T18:16:13Z <p>I am currently learning the basics of probabilistic error cancellation.</p> <p>The idea, in summary, is the following:</p> <p>We want to implement a quantum circuit having a noiseless (unitary) implementation <span class="math-container">$\mathcal{U}$</span>, but, because of noise, we can only implement <span class="math-container">$\mathcal{E}=\mathcal{N} \circ \mathcal{U}$</span>, where I assume <span class="math-container">$\mathcal{N}$</span> is a CPTP (Completely Positive Trace Preserving) operation that introduces noise in the computation (the noiseless case corresponds to <span class="math-container">$\mathcal{N}=\mathbb{I}$</span>).</p> <p>The idea behind probabilistic error cancellation is to try to find an inverse to <span class="math-container">$\mathcal{N}$</span> and to apply it. Ideally we then wish to implement the circuit: ( * )</p> <p><span class="math-container">$$\mathcal{N}^{-1} \circ \mathcal{N} \circ \mathcal{U}=\mathcal{U}$$</span></p> <p>Unfortunately, this inverse (if it exists!) will (i) not always correspond to a physical map (i.e. we loose the positivity condition for instance), (ii) will not always be implementable by the hardware.</p> <p>Hence, the &quot;trick&quot; is to perform the following decomposition:</p> <p><span class="math-container">$$\mathcal{N}^{-1}=\sum_{n} \alpha_n \mathcal{B}_n$$</span></p> <p>where the <span class="math-container">$\{\alpha_n\}$</span> are some coefficients and <span class="math-container">$\{\mathcal{B}_n\}$</span> is a family of <strong>physical</strong> maps (i.e. CPTP) that <strong>I can exactly implement on the hardware</strong>. Hence, the <span class="math-container">$\{\mathcal{B}_n\}$</span> is typically a family of noisy maps (because my hardware is noisy).</p> <p>My questions:</p> <p>In order to be applicable, we need:</p> <ul> <li><span class="math-container">$\mathcal{N}^{-1}$</span> exists mathematically (not all maps have an inverse).</li> <li>We can express <span class="math-container">$\mathcal{N}^{-1}$</span> as a linear combination of noisy operations <em>that the hardware can actually do</em>.</li> </ul> <p>If I understood correctly the general idea, how are we sure that these conditions will be satisfied? Am I exactly expressing the limit in the applicability of the method?</p> <p>( * ) I took an example where the noise map of the entire circuit can easily be found which is too complicated in general. However the idea can be generalized by introduced the noise map of each gate and writing a big sum (I skip these details here).</p> https://quantumcomputing.stackexchange.com/q/27758 4 Are there qudit systems, and why are they not as popular as qubit systems? MonteNero https://quantumcomputing.stackexchange.com/users/15947 2022-08-12T21:25:45Z 2023-09-30T16:08:46Z <p>Qudit is a <span class="math-container">$d$</span>-level system that generalizes a qubit. From what I understood qudits are more resource efficient when it comes to spanning the state space. If <span class="math-container">$N$</span> is a dimension of a state space, then we need <span class="math-container">$\log_2 N$</span> qubits. With qudits, we need <span class="math-container">$\log_d N$</span> qudits. Taking the ratio of the two yields <span class="math-container">$\log_2 d$</span> improvement. I guess, this reduction should also reflect in efficiency of construction of algorithms.</p> <p>Moreover, it seems, qudits have their own set of universal gates some of which are very similar to qubit gates. Algorithms like QFT, DJ, QPE can be implemented with qudits as well.</p> <p>Why qudits are not as popular? What is the practical <span class="math-container">$d&gt;2$</span> we could hope for in the future?</p> https://quantumcomputing.stackexchange.com/q/26627 0 What type of attack(individual attack, collective attack, coherent attack) is a PNS attack? James Thomas https://quantumcomputing.stackexchange.com/users/20799 2022-05-30T06:52:59Z 2023-10-03T07:27:48Z <p>While studying the attack method of QKD, I found that intercept and resend attack is an example of an individual attack. What are the examples of collective attack and coherent attack? Specifically, what kind of attack is a Photon Number Splitting (PNS) attack?</p> https://quantumcomputing.stackexchange.com/q/26327 0 Diagonal elements of the transition dipole moment SphericalApproximator https://quantumcomputing.stackexchange.com/users/19355 2022-05-09T21:47:08Z 2023-10-03T00:00:45Z <p>I'm currently doing some work in Quantum Optics and now have a question about the transition dipole moment.</p> <p>We were told in class that the off-diagonal elements of this matrix, namely <span class="math-container">$\langle n|d|m\rangle$</span>, gives us information about allowed and forbidden transitions of our defined system. For example if <span class="math-container">$$\langle 1|d|2\rangle\neq 0$$</span> then we could say that transitions from <span class="math-container">$|1\rangle$</span> to <span class="math-container">$|2\rangle$</span> and vice versa are possible.</p> <p>In my work I've now come across a transition dipole moment for the Hamiltonian of a RF-SQUID qubit with a bias flux of <span class="math-container">$\Phi = \Phi_0/0.4$</span> which looks like the following</p> <p><a href="https://i.stack.imgur.com/wsfh1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wsfh1.png" alt="Transition dipole moment" /></a></p> <p>I have some trouble interpreting the diagonal elements of this matrix since a transition from <span class="math-container">$|1\rangle$</span> to <span class="math-container">$|1\rangle$</span> for example doesn't make much sense to me. I'm kind of more used to matrices of this kind where the diagonal elements are all zero, for example the Harmonic oscillator. Would really appreciate it if someone could shed some light on this.</p> https://quantumcomputing.stackexchange.com/q/26306 1 What does the parameter "targets" in gates stand for in QuTiP? levgor https://quantumcomputing.stackexchange.com/users/20630 2022-05-07T12:30:34Z 2023-09-30T11:00:40Z <p>As far as I understand, &quot;targets&quot; is a basis (of the qubits system) to which gate is applied. For instance, Hadamard gate takes basis of a single qubit system, and CNOT gate takes a basis vector of a 2-qubit system. However, it is possible to enter an arbitrary number of 0 and 1', so I'm afraid I misunderstand what &quot;targets&quot; really are.</p> https://quantumcomputing.stackexchange.com/q/16215 1 Symmetric Universal Quantum Cloning Machine (UQCM) $N \to M$ for unknown states L. Lenzini https://quantumcomputing.stackexchange.com/users/14007 2021-02-25T13:10:50Z 2023-10-02T18:22:24Z <p>Does it exist a schematic diagram of the quantum circuit implementing the symmetric UQCM <span class="math-container">$N \to M$</span> for unknown states? If yes, does anyone know a Qiskit implementation of it?</p> https://quantumcomputing.stackexchange.com/q/6491 8 $n$ qubit vs. a $d=2^n$ qudit states and measurements mavzolej https://quantumcomputing.stackexchange.com/users/6313 2019-06-17T14:32:27Z 2023-09-30T16:39:15Z <p>The pure states of a qudit inhabit the <span class="math-container">$\mathbb{CP}(d-1)$</span> manifold.</p> <p>Is it true that the pure states of <span class="math-container">$n$</span> qubits live on the <span class="math-container">$\mathbb{CP}(2^n-1)$</span> manifold? If the answer to the first question is yes, then how do the sets of measurements on <span class="math-container">$n$</span> qubits and an <span class="math-container">$d=2^n$</span> qudit compare? Intuitively, I feel like the latter should be bigger due to the locality issues. However, if we stick to a particular bases, there seem to be a one-to-one correspondence.</p>