# Tag Info

7

You can think of the circuit operation as follows. Remembering that for Hadamard matrix: $H \times H = \mathbb{I}$, your circuit looks like the following: $$H \otimes \mathbb{I} \otimes \mathbb{I}(CCNOT(H|0\rangle \otimes H|0\rangle \otimes |0\rangle ))$$ Let's focus on the inner-most part first: $$H|0\rangle \otimes H|0\rangle \otimes |0\rangle \\ =\frac{... 7 Short answer: Yes, this should be possible. However, the details have to be filled out. The key is to relate this to magic monotones. There has been some development since the 2016 Bravyi-Gosset paper. I think one can use an argumentation based on stabiliser / Clifford extent and the results in the BBCCGH paper from 2019. Similarly, one can also argue for ... 7 ibmq_qasm_simulator performs the simulation on a classic computer on that resides on the cloud, whereas qasm_simulator does it locally on your computer and consumes your CPU. 6 Welcome to Quantum Computing StackExchange. To see why it would require 2^n complex numbers instead of 2n to represent a general entangled n-qubit state, let's assume we have a 3-qubit system, (\alpha_1, \beta_1), (\alpha_2, \beta_2), (\alpha_3, \beta_3) Where (\alpha_i, \beta_i) denotes the representation of the i^{th} qubit in a classical ... 5 Thanks for your question! If you're interested in running multiple shots of a quantum operation, Q# allow for doing that with conventional programming techniques such as a for loop: open Microsoft.Quantum.Arrays; open Microsoft.Quantum.Measurement; operation SampleRandomBit() : Result { using (q = Qubit()) { return MResetX(q); } } operation ... 5 When you evolve a pure state under the action of a gate U, it evolves from$$ |\psi\rangle\rightarrow U|\psi\rangle. $$However, a density matrix such as \rho=|\psi\rangle\langle\psi| evolves differently. You must calculate$$ \rho\rightarrow U\rho U^\dagger. $$So, in this case, you must calculate$$ \left(\begin{array}{cc} 0 & 1 \\ 1 & 0 \end{...

5

Expanding on Mark S's answer with some math: Let's take Aaronson's example, where you are applying the following unitary $U$ twice to a qbit initialized to $|0\rangle$: $$U = \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{-1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \end{bmatrix}$$ The conventional (Schrödinger) picture would represent ...

5

If you have an ideal quantum circuit, you can easily get its superoperator representation using qiskit.quantum_info.SuperOp as follows, qc = QuantumCircuit(1) qc.x(0) super_op = SuperOp(qc) array_to_latex(super_op) The output will be  \left[\begin{matrix} 0 & 0 & 0 & 1\\ 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 0\\ 1 & 0 ...

4

Initially perhaps it is best to compare and contrast a couple of different approaches to simulating the output of a random quantum circuit $U$ of about $m=1000$ gates acting on, say, $n=53$ qubits initialized to $\vert 0^{53}\rangle$, as in Sycamore. Suppose we execute our circuit $U$ on the $53$ qubits of Sycamore, and we sample to get an output string $b\... 4 If you have$n$bits you can combine them in$2^n$different bit string (this come from combinatorics). Now take$n$qubits. As any qubit can in superposition of two state, i.e. 0 and 1,$n$qubits can be in superposition representing all$2^n$possible bit strings. The notion that$n$qubits can hold$2^n$classical bits is unfortunately misleading because ... 4 I think stim is the right tool for the job here, because it gives you access to the stabilizer generators and also it defines stim.PauliString which you can use to represent the stabilizers and more easily implement the manipulations being described in the paper. Ultimately, it will be up to you to translate what the paper wants into a specific combination ... 4 Output format: Use a bit packed output format that has 8 results per byte instead of 1. In the python bindings, this means calling sample_bit_packed instead of sample. From the command line, this means specifying --out_format=b8. You're paying ~5x performance if you're using a non-bit packed output. From the command line, for detection events, you can also ... 4 I do not know what the state-of-the-art for this problem is, but here is my attempt at it. First, I doubt whether the required unitary$U$can be found for every matrix$A$. The most glaring issue occurs when$b\in\ker A$. In this case,$|Ab\rangle$is ill-defined, so it is not clear what$U|b\rangle$should be approximately equal to. A slightly more subtle ... 4 I agree that the Bravyi et al. paper is not easy to understand and they should have made some reference implementation available. Without going into details, I don't think it is likely to get an improvement. For Grover alone, you need to do$O(2^{n/2})$steps and in each step, you basically do a rotation. This rotation is very unlikely to be Clifford, thus ... 3 The diffusion operator is a multi controlled not operation (modulo some hadamards). It's not a Clifford operation. Also any useful oracle you'd use with Grover's algorithm won't be Clifford operations either, since any Clifford oracle accepts 0%, 50%, or 100% of all inputs which makes search trivial. 3 There is a lot of proposition how to use quantum computers in finance, see this question. Your are right that you can simulate Hamiltonians on a quantum computer easier than on classical computer. However, in some cases it is difficult to construct respective quantum circuit. On the other hand, circuits for so-called Ising Hamiltonians used for solution of ... 3 The Job Status: job incurred error with pulse can be the result of a timing problem in the execution of different pulses, but in your code the PulseSimulator() class must get backends provided by Terra such as FakeArmonk(), FakeParis()..etc. For example: from qiskit.test.mock import FakeArmonk backend=FakeArmonk() backend_pulse_simulator = PulseSimulator.... 3 In the first case, when the details of the physical process do not matter, you can choose any quantum channel type that can achieve your target average fidelity. Depolarizing channel may be a good choice. In the second case, you need to know what class of physical processes are acceptable. For example, if you are modeling energy decay, amplitude damping ... 3 Your implementation is really close - on the website, here's the diagram that they used: So, I think you reversed the angles - it should be$-\pi/2, -\pi/4, -\pi/2$. (Also: there's a QFT inverse that Quirk has, so you can verify that the first half of your circuit is correct). 3 There is no way to disable multiprocessing in TensorFlow Quantum without also affecting TensorFlow. That being said, there are still some workarounds to your problem that might be worth trying. It might help to take a look at changing the inter and intra op parallelism in tensorflow . If you are finding that TFQ isn't making full use of multiprocessing you ... 3 Why not just use initial_layout method? For instance, from qiskit import IBMQ, QuantumCircuit from qiskit.aqua import QuantumInstance circuit = QuantumCircuit(2,2) circuit.h(0) circuit.x(1) quantum_instance = QuantumInstance(backend= provider.get_backend('ibmq_santiago'), shots = 8192, ... 3 I think this page from the IBM Quantum services could answer your question about how to simulate differently and gain in the number of qubits : https://quantum-computing.ibm.com/services/docs/services/manage/simulator/#simulators-overview You have a list of all simulators available in the cloud, and as you can see depending on the method you can go from 30 ... 3 Liu and Winter (http://arxiv.org/abs/2010.13817) have shown that any "reasonable" magic monotone is asymptotically bounded by$n$. Moreover, Haar-random pure states cluster around that value (deviation is exponentially suppressed in$n$). By a standard argument (as in Beverland et al.),$\Omega(n)$magic implies that we need$\Omega(n)$copies of ... 3 I wonder if there are explicit examples where the T-count scales stronger with n. [...] maybe superlinear or even exponential. Here's an existence proof of an$n$qubit magic state with a T count of$\Theta(2^{n/4})$, based on caching QROM reads. It takes$\Theta(2^{n/4})$T gates to prepare the cached-QROM state, and also you can consume the cached-QROM ... 3 Cirq does have some methods for generating random circuits, such as cirq.testing.random_circuit and cirq.random_rotations_between_grid_interaction_layers_circuit. That being said, in my experience, generic random circuit methods almost never do quite exactly what I need. I suspect that, for thesis-level work, you will need much more careful control over the ... 2 Let me plug my pet project: https://attilakun.net/bloch It allows you to enter arbitrary 2x2 matrices and visualize how the quantum state is affected by them. In the below example the red arc shows how the H matrix transforms the$|0\rangle$state (yellow arrow) into$|+\rangle\$: Also, it's open source if you want to play around with the code: https://...

2

The qiskit-aer and qiskit-aer-gpu are mutually exclusive packages. They contain the same code except that the qiskit-aer-gpu package built with CUDA support enabled. If you install both packages at the same time the contents of the 2 packages will interfere with each other. I would recommend creating a new conda environment and installing qiskit-terra and ...

2

Note that OpenFermion interoperates with cirq to provide many features that are not specific to quantum chemistry. You can add noise to your circuits like this noisy = ideal.with_noise(cirq.depolarize(p=0.01)) where ideal and noisy are instances of cirq.Circuit. Alternatively, you can use a simulator such as cirq.DensityMatrixSimulator which allows you to ...

2

Instead of accessing results._final_simulator_state.density_matrix, which has a leading underscore implying you shouldn't be using it or relying on it to stay stable, use results.final_density_matrix. Making that substitution seems to result in the code working. Separately, I think the fact that what you did doesn't work is a bug. It seems that the method ...

2

Your calculations section looks correct but I think your spreadsheet is incorrect. For example if you do 16 bytes * (2^21) that's 33554432 bytes or.0336 GB or 33.6 MB. Things go quickly though for a 32 qubit simulation 16 bytes * (2^32) is 68.72 GB. You can also look at the aer source code it's using this calculation for the required memory for a statevector:...

Only top voted, non community-wiki answers of a minimum length are eligible