All Questions
Tagged with textbook-and-exercises programming
19
questions
1
vote
1
answer
38
views
Is qiskit.pulse.SamplePulse deprecated?
I'm currently following along the book "Learn Quantum Computing with Python and IBM Quantum Experience" by Rodert Loredo and I am at chapter 8 - Generating pulse schedules on hardware. The ...
5
votes
1
answer
405
views
Is there a tutorial for error mitigation in qiskit that does not use the deprecated ignis?
Working through the qiskit text I have come accross measurement error mitigation a few times (Measurement Error Mitigation, Lab 3: Quantum Measurment,...]. In the online textbook the coding indicates ...
0
votes
1
answer
234
views
How to initialize my circuit with two random complex numbers?
Working through Lab 3 in the Qiskit text, I have been attempting to initialize my one qubit circuit with two random numbers. My first attempt, as directed, is using ...
3
votes
1
answer
588
views
Jupyter Notebook not rendering latex code
Working through the Qiskit text and came across this bit of coding on the density matrix page:
psi_AB.draw('latex', prefix='|\\psi_{AB}\\rangle = ')
which is ...
1
vote
2
answers
105
views
How is the ket of a quantum state calculated in this code?
For the following code
qc = QuantumCircuit(2)
qc.h(1)
qc.cx(1,0)
ket = Statevector(qc)
ket.draw()
the output will be the following:
...
2
votes
1
answer
831
views
Solving modified version of Simon's Algorithm with multiple secret strings
I am stuck on the following question.
Let $S$ be the $span${s1, s2, ... , sk} such that $S$ is a $k$-dimensional subspace of {0, 1}n. Let 𝑓:{0,1}𝑛→{0,1}𝑛 be a function so that $f(x) = f(y)$ if ...
1
vote
2
answers
276
views
From the $n$-qubit state $|ψ_0⟩$, how do we find an orthonormal basis $\{|ψ_i⟩\}$ that includes $|ψ_0⟩$ via the Gram-Schmidt process?
From the n-qubit pure state $|\psi_0\rangle$, how do we find an orthonormal basis $\{|\psi_i\rangle\},i\in[0,2n−1]$ that includes the state $|\psi_0\rangle$ using the Gram-Schmidt process?
Is there ...
0
votes
2
answers
380
views
Given this code fragment, what is the probability that a measurement would result in $|0\rangle$?
Trying to understand below probability how it occured?
qc = QuantumCircuit(1)
qc.ry(3 * math.pi/4, 0)
A. 0.8536
B. 0.5
C. 0.1464
D. 1.0
And the answer is C. But I ...
1
vote
0
answers
90
views
Solving Particle in Box problem using Qiskit
I am new to quantum computing, I would like to ask how can I solve simple particle in box problem using qiskit which allows to compute the bound states in finite quantum well.
Finite quantum well
2
votes
0
answers
234
views
from hello_qiskit import run_puzzle results in error
I am working my way through the beta version of the Qiskit textbook.
Everything was going fine until I got to the Visualizing Entanglement section and had some exercises to complete.
All of the ...
2
votes
1
answer
191
views
Qiskit noise model question (from textbook)
I'm reading the chapter Introduction to Quantum Error Correction using Repetition Codes and a code example demonstrates how to add depolarizing and pauli error. I have several questions.
Is it not ...
4
votes
1
answer
844
views
PyTorch and Qiskit example from the Qiskit textbook seems broken
After executing the proceeding code blocks, when I try to copy the same code from Qiskit textbook on my jupyter notebook, I get the error as
...
3
votes
1
answer
2k
views
Expectation value of operator - python
I am suposed to solve following problem:
Calculate the probability $P_n(x > X)$ that a particle in then n-th eigenstate is found at a position with an x-value larger than X. Here it is convenient ...
2
votes
0
answers
137
views
Wrong Expectation value when implementing a VQE for the Heisenberg Hamiltonian
I tried to implement an extended Heisenberg-Hamiltonian as an extra exercise further than my homework.
My Hamiltonian is the following: $H = \sum_{NN} \sigma_x\sigma_x + \sigma_z\sigma_z$
I try to ...
1
vote
1
answer
229
views
Why is local qasm simulation taking so long for VQE?
I've successfully run the $LiH$ VQE simulation detailed in Simulating Molecules using VQE using the statevector_simulator, however when attempting to run the same ...