New answers tagged

1

Well, you are right. After CircuitSampler you are getting a DictStateFn with phase information lost (see the docs) in the amplitudes and you have to take the square of them for your histogram plot (not normalize). Besides that, just keep in mind that the number of shots are not stored in the QuantumInstance of CircuitSampler (in the way you are setting them)....


3

Variational Quantum Eigensolver is an algorithm that allow you to find the lowest eigenvalue of an Hermitian matrix, whatever it might be. This Hermitian matrix in the case of quantum chemistry is the Hamiltonian of a molecular system. In fact, it is the electronic Hamiltonian since quantum chemists usually make an approximation known as the Born-Oppenheimer ...


2

A simulator executes just an algorithm on a classical hardware as Martin said. On a real quantum hardware, your circuit is calibrated before actually being executed. In addition, there are other tasks like loading pulses into waveform generator, qubits relaxation...which take time and explain the difference.


1

It's a little difficult to tell without looking at your circuit, but I believe this is because your circuit contains a measurement in it. (edit: if there were no measurements the qasm simulator wouldn't work, so you obviously have a measurement happening in your circuit) The statevector_simulator simply gives you the state generated by your circuit. If you ...


2

If I understand correctly, Statevector_simulator is a perfect simulator. It's going through all the linear algebra, do the actual math, instead of mimicking the quantum computer. Therefore, you won't have the probabilities distribution like qasm_simulator, or like when you run on the quantum hardware. The statevector simulator will output the statevector of ...


3

.get_counts() returns a dictionary with the keys being the measured state and their corresponding values being the number of times that result was measured. To get the number of times that state was measured you can do: print(counts['0001']) To get probability, you need to divide this by the total number of shots. If you're not sure of the number of shots, ...


0

I was able to run PySCF on Windows by first downloading Visual studio installer. After installing it, you have to install desktop development with C++ in there and it'll solve your issue most probably.


1

Typically you would need to install it through pip install pyscf, however I believe pyscf does not support Windows. If you look on their installation guide they give some instructions for installing the library, but on Windows you probably need to either use the ubuntu subsytem for Windows or set up a VM.


0

While it's not always helpful, you can find solutions for most error codes here: https://quantum-computing.ibm.com/docs/manage/errors In your case since you're running with Qiskit Aqua, it automatically re-submitted the job, as indicated by FAILURE: Can not get job id, Resubmit the qobj to get job id. So your VQE calculation should resume once the new job ...


Top 50 recent answers are included