The Stack Overflow podcast is back! Listen to an interview with our new CEO.

# Tag Info

9

Apart from the formal result about #P-hardness, there's something worth touching on, about the nature of strong simulation itself. I'll comment first on strong simulation, and then specifically on the quantum case. 1. Strong simulation even of classical randomised computation is hard Strong simulation is a very powerful concept — not only in the fact ...

8

To my mind, this theorem is not very well stated in this form, if taken out of context. Where it says "phase gates", this may be misleading. It means specifically just $S=\sqrt{Z}$ and not what I think of as a phase gate, which can have an arbitrary phase (but they have very specifically introduced their terminology about 3 pages earlier). This is a key ...

8

There are two questions here. The first asks how you might actually implement this in code, and the second asks what's the point if you know which oracle you're passing in. Implementation Probably the best way is to create a function IsBlackBoxConstant which takes the oracle as input, then runs the Deutsch Oracle program to determine whether it is constant....

6

There isn't much of a difference. If you read the labels, the values are roughly the same but for some reason are presented in a different order. Any differences for a given value are due to noise and decoherence.

5

This doesn't really answer the question as it's not an online simulator. It might still be relevant though as it is a way to produce this sort of gifs if one has access to the software. It is relatively easy to do this sort of things using Wolfram Mathematica. As a quick and dirty example, if we just define a couple of relevant helper functions: pauliX = ...

5

Cirq uses numpy's pseudo random number generator to pick measurement results, e.g. here is code from XmonStepper.simulate_measurement: def simulate_measurement(self, index: int) -> bool: [...] prob_one = np.sum(self._pool.map(_one_prob_per_shard, args)) result = bool(np.random.random() <= prob_one) [...] Cirq ...

4

This can be done using the 'Aer' component of Qiskit. The properties information can be turned into a noise model using from qiskit.providers.aer import noise properties = device.properties() noise_model = noise.device.basic_device_noise_model(properties) basis_gates = noise_model.basis_gates This can then be supplied to the execute() method, as is ...

4

I made those GIFs using the screen recorder ScreenToGif. ScreenToGif is not very good at compressing while maintaing quality, so I found it worked better to disable all optimizations while recording, try to preserve all detail, then post-process using GIMP's "Optimize (for GIF)" filter. GIMP is also handy for e.g. adding the text labels you see in the ...

4

When using a simulator, it doesn't really matter what kind of qubit you refer to. You can even mix-and-match the types. The type of qubit only becomes relevant when you intend to run on a device, because devices have qubits at specific locations. For example, if you wanted to run on Bristlecone, you would limit yourself to GridQubit instances that actually ...

4

One of the simulators in Microsoft Quantum Development Kit is Toffoli simulator which seems to do exactly what you want. It supports a limited set of primitive gates (X, CNOT and Toffoli gates, as well as other gates when their effect is X or identity), measurements in the computational basis and DumpMachine to output the state of the simulator. It is a ...

3

I used this last time I needed to look up something about Bloch sphere. It's not perfect, since it doesn't allow entering the exact values of angles, let alone 2x2 matrices, but it has the benefit of being available online. This one looks promising in that it allows to enter matrices (and is also online), but I haven't tried it.

3

If you are looking for a more complete implementation of a quantum variational algorithm in the context of Cirq, I would recommend looking at the second example in the OpenFermion-Cirq notebook found here. It uses a custom ansatz for hydrogen in a minimal basis, but makes a bit more explicit all the required pieces. Another good example, perhaps without ...

3

Could someone please provide me with some reference to what he is saying? Here is a reference to a discussion of this and related questions: Quant. Inf. Comp. 10, 3-4 pp. pp0258-0271 (2010), or https://arxiv.org/abs/0811.0898

3

Thanks for pointing this out. This is a bug that occurs when only a subset of the qubits are measured. It's being fixed. Until then, workarounds are: Use Aer instead of BasicAer (always the best thing to do when possible). Use LegacySimulators instead of BasicAer (this will give a deprecation warning). Install Qiskit from the master branch, where the issue ...

3

The Run command on the IBMQ interface is for the actual run on the quantum architecture. The command Simulate implements the quantum circuit on a normal classical architecture but randomizes it to make it look like the actual quantum runs. Note that this could be a perfect measurement if it were to report, but IBM uses the statistics based on its own ...

3

There is no way to build the oracle in a way which would not defeat the point of Deutsch's algorithm - that's why it is an oracle-based algorithm. The only way would be if you would come up with an incredibly hard to compute function (this is, an incredibly long circuit) which would take one input bit $x$ and give one output bit $f(x)$ (but on the way could ...

3

This follows almost exclusively from noise and decoherence. In simulations, the qubits are perfect and will not decohere. Furthermore, noise has no influence on the qubits. In the actual hardware, the qubits are not perfect and hence are subject to decoherence and influences from the outside world. Therefore, measurement results might differ from what ...

3

Let me first answer the general question how to get a reasonably tight Lieb-Robinson (LR) speed when you are facing a generic locally interacting lattice model, and then I'll come back to the 1D XY model in your question, which is very special to be exactly solvable. General Method The method to obtain the tightest bound to date (for a generic short-range ...

2

I don't have an example for Deutsch's algorithm handy, but here and here are two tutorials which walk you through implementing the Deutsch-Jozsa algorithm and the oracles it uses in Q#. The idea for these two algorithms is the same: you have to provide the oracle to the algorithm as an operation implemented elsewhere. This way the algorithm doesn't know ...

2

You have two examples on the IBM Q Experience page about the algorithm. They show an example of a function. This could inspire you for your simulations I hope.

2

Yes, it can because quantum computing is a generalization of classical computing. So the procedure you ask for exists. We can take a universal classical logic gate such as NOR gate, generalize to a reversible quantum version of that NOR gate. Thus a procedure can be as follows: Design classical circuit Rewrite classical circuit using only the chosen ...

2

Is it possible to emulate a quantum network over a classic network? Yes. The following projects are currently available: SimulaQron SimulaQron is a distributed simulation of the end nodes in a future quantum internet with the specific goal to explore application development. The end nodes in a quantum internet are few qubit processors, which may ...

2

I joined the Quantum internet Hackaton with Simulaqron We did simulations for the quantum leader election algorithms Simulaqron is more an abstract simulator on a classical computer or classical network. Most important aspect is entanglement between 2 nodes. This can be done with only command called EPR and creates an entangled pair of qubits on different ...

2

Maybe Quirk would suit your needs? It's an in-browser, graphical quantum-circuit simulator. You can build your circuit with drag-and-drop and it will show the probabilities of measurements. However, there is a limit to the number of qubits you can simulate. I think it is 16 or so.

2

AHusain's answer is absolutely correct, but perhaps lacks some detail. The circuit that you want to implement is Basically, the key is to realise that you want to apply phase $e^{i\alpha}$ to the basis elements $|00\rangle$ and $|11\rangle$, and $e^{-i\alpha}$ otherwise. In other words, you care about the parity of the two bits. If you can compute that ...

2

Another way to think about this: To simulate what goes on in a quantum computer we have to do a lot of matrix math using $(2^N \times 2^N)$ matrices$^1$, and the action of (most) of the clifford gates can be actually be accomplished by applying some non-linear, low complexity matrix operation instead of a matrix multiplication. For example, the Pauli-X gate,...

2

It is important to realize that the depolarizing and dephasing channel (and pretty much any other noise model for that matter) do not represent unitary operations. This means there is no unitary operation (that takes qubit states to qubit states) corresponding to these channels. Rather, channels are more general: they map density operators to density ...

2

To simulate a 3D material, the material's structure will need to be somewhat understood. That way the structure can be mapped to the qubit connectivity. Notice in this tutorial the qubits and their connections to each other are represented in graphs. The 3D material to be simulated can be put into a graph that will then be mapped to the qubit graph and the ...

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