All Questions
75 questions
20
votes
3
answers
2k
views
What would a very simple quantum program look like?
After reading the "first programmable quantum photonic chip". I was wondering just what software for a computer that uses quantum entanglement would be like.
Is there any example of code for specific ...
13
votes
2
answers
738
views
Hamiltonian simulation with complex coefficients
As part of a variational algorithm, I would like to construct a quantum circuit (ideally with pyQuil) that simulates a Hamiltonian of the form:
$H = 0.3 \cdot Z_3Z_4 + 0.12\cdot Z_1Z_3 + [...] +
- ...
9
votes
2
answers
302
views
Can we perform quantum mechanical simulations using a quantum computer?
I'm a computer science major who's really keen on physics and quantum mechanics. I have started learning about Q# and D-Wave, but I just wanted to know if it's possible to test quantum mechanical ...
8
votes
2
answers
282
views
How does one obtain amplitude information in Q#?
Is it possible to obtain amplitude information (in lexicographic ordering) for a particular qubit register in Q#?
For example, in the following code:
...
7
votes
1
answer
619
views
'Best practices' for making Stim run as fast as possible?
I'm currently testing out an error-correction surface code circuit in Stim.
I've tried a 19x19 surface code over 10k rounds of syndrome extraction sampled 256 times, and this takes about 165 seconds. ...
7
votes
1
answer
221
views
Q# Simulation Behavior
I am attempting to run a series of tests on a Q# program I'm running on the local simulator, but I'm not seeing any way to use >1 shot and collect the results of those shots at once, as in ...
6
votes
1
answer
201
views
Trying to understand this measurement of a simple quantum circuit
It's a newbie question, I know. But I was just wondering if someone could help me understand why this simple circuit results with the measurement shown. I've just didn't get the last step. It's not ...
5
votes
1
answer
692
views
How can noise on a device be simulated using measured noise parameters?
The real devices used as backends for Qiskit have calibration data that quantifies errors ($T_1$ and $T_2$, gate fidelities, etc). This can be accessed by, for example
...
5
votes
1
answer
364
views
What is the superop simulator in Qiskit for?
I'm trying to understand what the use case of a superop simulator would be. My understanding is that density matrix is generally more resource intensive than state vector, but it has additional ...
5
votes
1
answer
3k
views
Difference between Aer.get_backend('aer_simulator') and AerSimulator()
In Qiskit, there are several ways to choose simulator: one is
from qiskit import Aer
backend = Aer.get_backend('aer_simulator')
result = backend.run(circ).result()
...
5
votes
1
answer
139
views
Is a black-box gate whose output is conditional on the value of an input amplitude possible?
Suppose we have a qubit in the state $|q\rangle = a |0\rangle + b |1\rangle$, and another ancilla qubit $= |0\rangle$.
I wish to have the following black-box gate:
...
5
votes
1
answer
531
views
Introspecting quantum circuit execution on Qiskit Aer simulators
Is there any way to get information from intermediate points in the execution of a quantum circuit. This is not possible on real quantum hardware but would be very useful on the Aer simulators for ...
5
votes
1
answer
1k
views
Qiskit BasicAer & Aer
While I'm simulating grover's algorithm, I found that with BasicAer backend it works well but with Aer it is not. What is the difference between ...
5
votes
2
answers
1k
views
Finding the maximum number of Q# simulatable qubits
I'm new to Q# and I was curious on how one would find the number of Q# simulatable qubits for a specific machine. I know Microsoft has an approximation of 16GB ~ 30 qubits but I wanted a better ...
4
votes
1
answer
2k
views
What is difference between qasm_simulator and ibmq_qasm_simulator?
There are many ways how to simulate a quantum circuit on IBM Q. However, in partiuclar I am interested in a difference between qasm_simulator and ...
4
votes
1
answer
565
views
How to import a generic stabilizer code in stim
I just started using stim to simulate the performance of quantum error correcting codes. I hope this is the right place to ask questions about the subject. The
example code
with the repetition code ...
4
votes
2
answers
441
views
Statevector Simulation of QAOA always finds exact solution
My question is simple: does applying QAOA with a statevector simulation always result in a perfect solution?
I'm trying to calculate the best $\gamma$ & $\beta$ that solve certain problems but my ...
4
votes
1
answer
323
views
How to order results after multi-circuit qiskit.execute parallel run?
I'm kinda new to qiskit and I find really fascinating its parallelization capabilities, then I'm trying to creating all the needed circuits for my application at once and transpile, assemble and ...
4
votes
1
answer
983
views
Plotting Bloch sphere in QuTiP
Is there anyone who reproduced the Bloch sphere given in the paper QuTiP: An open-source Python framework for the dynamics of open quantum systems by J. R. Johansson, P. D. Nation, Franco Nori? I am ...
4
votes
0
answers
68
views
Why the pulse scheduler produces a different output from the original circuit?
As part of a larger code, I have to convert a quantum circuit into a Pulse scheduler. The problem is that the scheduler output is incompatible with the circuit output. In particular, the difference ...
4
votes
0
answers
290
views
Any simulator packages for quantum annealing/adiabatic quantum computation?
Are there any simulator packages for quantum annealing/adiabatic quantum computation, like Qiskit Aer but for quantum annealing?
There seems to be only classical heuristics in D-Wave Ocean package, ...
4
votes
0
answers
76
views
Simulating a Quantum Network over a real Classical Network Using Simulaqron
I'm trying to simulate a quantum network over a real classical network using the Simulaqron framework. I know the documentations says this is possible but I am having trouble finding examples of how ...
3
votes
2
answers
480
views
How to run an approximate simulation, and why
I'm looking at the Qiskit getting started documentation, https://qiskit.org/documentation/getting_started.html. They create a quantum circuit and run an approximate simulation on it 1000 times:
Why ...
3
votes
2
answers
1k
views
How can I specify the qubits on quantum computers that I want to use?
Suppose I have the following 2-qubit quantum circuit:
...
3
votes
2
answers
120
views
What is the best approach for classically simulating quantum devices?
Now I'm focusing on quantum simulation (especially on classical supercomputers), but I saw there exist so many simulators. Is there any criteria to judge which is the best?
https://www.quantiki.org/...
3
votes
1
answer
1k
views
Qiskit "statevector_gpu" method not available
I am trying to use the statevector_gpu simulation method in Qiskit Aer (see this page). I installed qiskit-aer-gpu according to ...
3
votes
1
answer
420
views
How to turn off multiprocessing in TensorFlow Quantum
Some background: I'm currently running the same training algorithm with a classical neural network and a quantum circuit, respectively. The NN is implemented in Keras with a TensorFlow backend, the ...
3
votes
1
answer
85
views
noisy circuit by openfermion
I am working on designing quantum error mitigation algorithms for simulating chemical systems. Therefore, a necessary component is to add noisy to the ideal circuit when using a quantum simulator. But ...
3
votes
1
answer
418
views
Job fails when using PulseSimulator: Job Status: job incurred error
I'm trying to simulate a basic circuit using the PulseSimulator in Qiskit. The following Qiskit Pulse code works when I run it on the real device, but not when ...
3
votes
1
answer
277
views
For CNOT gate with control qubit set to 1, the measured state of the second qubit unexpectedly depends on the measurement
I have the following circuit in qiskit. It is a simple CNOT operation with the control qubit set to 1, by running the control qubit through an X-gate.
However, when I measure the 2nd qubit, I get the ...
3
votes
1
answer
215
views
Why does running my circuit on Quantum Hardware produce such unexpected results?
I am using Jupyter Notebook with Qiskit.
I have created a program that can add two 3-bit numbers together. When I simulate this program on a qasm_simulator it works as expected and I can add any two 3-...
3
votes
1
answer
155
views
Single-shot error correction for the surface code with measurement errors
I am trying to implement a single-shot error correction for the surface code with data + measurement errors (both with prob. p), using the (build-in) BP+OSD decoder. I am mostly following these papers:...
3
votes
1
answer
251
views
Get the gates after fusion optimization in Qiskit statevector simulator
I tried to obtain the gates after fusion in Qiskit-aer statevector simulator. What I can find now is that it provides a backend option saying fusion_verbose (bool): Output gates generated in fusion ...
3
votes
0
answers
34
views
How to have seperate registers from scrach?
I am very new to quantum computing, so this might be a really simple question. I am coding a quantum computer simulator in python from scrach and I'm not sure how to make registers work.
I would just ...
3
votes
0
answers
131
views
What are reasonable noise/dephasing parameters for QuEST to emulate state-of-the-art quantum computers?
The QuEST code allows for simulation of quantum computers taking dephasing and depolarizing noise into account via one and two qubit dephasing and depolarization. What are realistic parameters for ...
2
votes
3
answers
477
views
GPU Access for qiskit-aer-gpu from Ubuntu VM
I have NVIDIA GeForce GT740 Graphics card installed on my host machine with Windows 10 OS. I have to simulate a cluster environment in order to run qiskit codes in parallel fashion. Before actual ...
2
votes
1
answer
188
views
Why running time of qasm simulator is significantly smaller in comparison with quantum machines?
I ran a 3-qubit measurement circuit on QASM simulator as well as on IBM Q Melbourne, Santiago and Vigo machines. The running time on the simulator is in few milliseconds (400-800) while in the case of ...
2
votes
1
answer
807
views
How can I print out the probability of a certain state in histogram?
This is a simulation I did in my program. I'm hoping to print out the probability of the state $|0001\rangle$ (which is $0.052$), and store this number in a letter (a). How can I do this? Thanks!!
2
votes
1
answer
1k
views
Using Qiskit's AerSimulator with an AMD GPU
I have an AMD 6700S that I want to use for Qiskit simulations. The test case below is calculating the QFT.
If I set my code up like this:
...
2
votes
1
answer
98
views
Efficient Representation of Qubits on a Digital Simulator
I was wondering about quantum simulators recently, and I was thinking about how a qubit could be represented on a digital machine. This Stack Overflow post seems to say that one will need at least $a2^...
2
votes
1
answer
233
views
Qiskit BasicAer simulator options
I usually use Qiskit "Aer" to simulate quantum circuit with several methods such as statevector, density_matrix, ...
2
votes
2
answers
1k
views
How to fix “QiskitChemistryError:PySCF is not installed”
I’m trying to simulate LiH using VQE. But I keep getting the error
QiskitChemistryError:PySCF is not installed
And I tried several ways to see whether my driver for the molecule was typed wrong. But ...
2
votes
1
answer
416
views
Strange Behaviour of MeSolve, McSolve
I'm using Qutip to plot some basic two level dynamics using hamiltonians with a temporal envelope defined as the sum of two error functions, designed to make it more representative of experimental ...
2
votes
1
answer
182
views
Monty Hall Problem in Quantum Computing [closed]
Is it possible to make a quantum Monty Hall problem where the quantum computer wins the game always?
2
votes
1
answer
131
views
ProjectQ - In which part of the controlled gate object are the control bits scored
I've been trying to decompose the ProjectQ objects and I could manage to decompose non-controlled gates and daggered gates. But I noticed that
the object of a controlled version of a gate is the ...
2
votes
0
answers
76
views
QuTip - Is there a way to simulate more than one inital state in one simulation?
I'm trying to use QuTip for a simulation of a qutrit system and I want to see how my system evolves under different initial states. Is there a way to do it using QuTip without running the simulation ...
2
votes
0
answers
215
views
How accurate are Qiskit’s unitary and Statevector simulators for very large circuits?
Background: I wrote a code that takes a Qiskit circuit C as an input and outputs a random circuit C’ such that C and C’ have the same unitaries. I tested my code using Qiskit’s Statevector simulator ...
2
votes
0
answers
111
views
Length / transpilation issues with Grover's algorithm
I would like to discuss the discrepancies between what we see in the simulator versus what we see in the actual running of the code on any IBMQ machine for any qubits at 5 or above. I am doing a final ...
1
vote
2
answers
2k
views
Entanglement Swapping Circuit
I implemented 2 versions of the entanglement swapping circuit in IBM Q. One is using classical measurement to control X, Z gates. Another is just us C-NOT and Controlled-Z. They should be equivalent. ...
1
vote
1
answer
2k
views
Memory Requirements for Qiskit Aer Simulator
I'm trying to work out how much memory is used for simulations of different sizes using the Aer simulator.
Here are my calculations:
$$ \text{Number of Qubits} = n $$
$$ \text{Number of Amplitudes} = ...