3
votes
Why is the Qiskit transpiler not resolving the equivalence $I = R_y(-\theta) R_y(\theta)$?
It was a bug, now fixed in release 0.40.0.
In the release notes, you can read:
Fixed an issue with the transpile() function when run with optimization_level=3 and no backend, basis_gates, or target ...
- 1,189
1
vote
Problem with qiskit only accepting ${\rm tr}(\rho^2)=1.$ while performing state tomography
You can convert the density matrix to a StateVector using to_statevector() method and set a suitable value for ...
- 6,471
1
vote
Accepted
Bernstein-Vazirani algorithm to find whether the secret has a one at a specific location
You have to separate out the implementation of the black box from the rest of the circuit. If we implement this ourselves when we're not actually given a black box, we have to create the circuit for ...
- 50.3k
1
vote
How to get the density matrix from a stabilizer table in qiskit
If your input state is $|000\rangle$, then you can easily get the output as a Statevector as follows:
...
- 6,471
1
vote
Accepted
How to get the density matrix from a stabilizer table in qiskit
EDIT: you can build the desired DensityMatrix starting from an empty $n$-qubits circuit (in the state $| \psi \rangle = | 0 \rangle^{\otimes n}$) and then use the <...
- 726
1
vote
hhl algorithm output
Interesting! It appears your (mapped to integer) eigenvalues are $\{1.0, 2.0, 4.0, 4.0\}$. We know that for the rotations controlled by the clock register $c$, this relationship must hold:
$$
\theta(...
- 543
1
vote
How to get exact measurement probabilities when having intermediate measurements with Qiskit?
To do what you want in Qiskit, you could replace each measurement operation in your circuit by a simple call to the Statevector.probabilities(qargs) method, where ...
- 726
1
vote
How to get exact measurement probabilities when having intermediate measurements with Qiskit?
You can use save_probabilities() function to save the measurement outcome probabilities anywhere in your quantum circuit when using ...
- 6,471
1
vote
How to get exact measurement probabilities when having intermediate measurements with Qiskit?
Alternatively, you can use Quirk for small circuits. Especially it's chance and amplitude displays are useful for visualizing measurement probabilities.
- 445
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
qiskit × 1824programming × 866
ibm-q-experience × 336
quantum-gate × 245
circuit-construction × 131
quantum-state × 125
vqe × 105
quantum-circuit × 99
algorithm × 98
measurement × 75
simulation × 75
ibm × 59
noise × 55
grovers-algorithm × 50
error-correction × 47
qaoa × 43
optimization × 42
textbook-and-exercises × 39
hhl-algorithm × 38
qasm × 35
hamiltonian-simulation × 33
error-mitigation × 30
quantum-enhanced-machine-learning × 29
chemistry × 28
phase-estimation × 26