New answers tagged

0 votes

Qiskit - How to get statevector for each shot?

To your first question, you see the statevector of the last shot performed. The answer by Egretta Thula will get you the ...
user avatar
0 votes
Accepted

Qiskit - How to get statevector for each shot?

You can use save_statevector simulator instruction. To save the statevector for each shot, set pershot value to ...
user avatar
1 vote
Accepted

Why does having two classical registers sometimes only yeild one bit?

This happens because your convert the bit-strings to integers. output.append(int(entry)) Hence, the leading zeros are removed. If you want to keep the bit-string ...
user avatar
2 votes
Accepted

Calculating the probability of a result after measurement using Ry, Rz, and Rx matrices

$Ry$ gate is described by following matrix $$ Ry(\theta) = \begin{pmatrix} \cos(\theta/2) & -\sin(\theta/2) \\ \sin(\theta/2) & \cos(\theta/2) \end{pmatrix}. $$ If your qubit was in state $...
user avatar
0 votes

Calculating the probability of a result after measurement using Ry, Rz, and Rx matrices

The way I guess the probability and know the correct answer is to imagine a Bloch sphere, and imagine how the gate effect the arrow of the bloch sphere. also can look at these two cheat sheet from ...
user avatar
  • 423
0 votes

Get probabilistic state of a quantum circuit using Ry gate

this is how you do it without using vqe or qml, of course, you also can increase shots for accuracy. ...
user avatar
  • 423
3 votes
Accepted

In what contexts are different notations used for indicating measurement outcomes?

It's an interesting question as to how to the bijection between the measurement eigenvalues $\{+1,-1\}$ and the bits $\{0,1\}$ or the qubits $\{|0\rangle,|1\rangle\}$ are reflected or intuited in the ...
user avatar
  • 7,017
1 vote

Is quantum non-demolition measurement necessary for quantum computation?

when dealing with 2 qubits in an experiment, the total number of computational basis is 4, so the experiment should run 4 times This is wrong. That would imply using 3000 qubits would running $2^{...
user avatar
  • 22.4k
0 votes

Readout Error in Qiskit: What is a reasonable model?

I think you are looking for this https://github.com/qiskit-community/qiskit-community-tutorials/blob/master/ignis/measurement_error_mitigation.ipynb https://github.com/Qiskit/qiskit-tutorials/blob/...
user avatar
  • 423
1 vote

Does the von Neumann entropy equal the smallest accessible Shannon entropy?

No. Consider the trivial case where $\{\Pi_j\} = \{I\} $. Then $p^\Pi = (1,)$ and $ H(p^\Pi) = 0 $. This holds even if $ S(\rho) > 0 $.
user avatar
  • 111
0 votes

Conditional measurement using classical bit in qiskit

Although QASM allows controlled measurements like if (c == 0) measure q[1] -> c[1];, I am afraid you won't be able to execute it in Qiskit. Conditional ...
user avatar

Top 50 recent answers are included