Primitives | Coding with Qiskit 1.x | Programming on Quantum Computers

  Рет қаралды 13,666

Qiskit

Qiskit

Күн бұрын

Join us in Episode 4 of "Coding with Qiskit 1.x" as Derek Wang dives deeper into Qiskit Primitives. The Estimator and Sampler primitives, for computing expectation values and sampling of quantum states, simplify interactions with quantum hardware. We'll use practical examples inspired by a pioneering IBM Quantum study featured in Nature.
Whether you're a quantum novice or enthusiast, this tutorial is for you. Like, subscribe, and tune in to expand your quantum programming toolkit!
Qiskit Resources:
GitHub notebook for this episode: github.com/der...
How Can I Find the Expectation Value of an Operator?: • Video
Expectation Values Explained: • What is an Expectation...
Nature Paper "Evidence for the utility of quantum computing before fault tolerance": nature.com/art...
Install Qiskit: qisk.it/cwq-in...
Introduction to Primitives: docs.quantum.i...
IBM Quantum Documentation - Primitives: docs.quantum.i...
IBM Quantum: quantum.ibm.com/
#ibmquantum #learnquantum #qiskit

Пікірлер: 40
@Eduardfp
@Eduardfp 6 ай бұрын
These episodes are terrific! Please, keep uploading them!!
@LokPendergraph-mp8gw
@LokPendergraph-mp8gw 6 ай бұрын
I recently started learning quantum computing programming. When I installed Qiskit 1.0.2 on my laptop, I found that it couldn't import the aer module (assuming I had already installed the aer module correctly). What's going on? I just want it to display simulation images
@JH333ful
@JH333ful 26 күн бұрын
Great video. Thanks. (Explanations and clarity are brilliant)
@enriquantum
@enriquantum 3 ай бұрын
Congratulations Derek for this excelent explanation! Regards from Argentina
@jackburgess9389
@jackburgess9389 26 күн бұрын
I ran into an error at 29:58 with the backend argument in Sampler. A fix for this is to write sampler = Sampler(backend) instead of sampler = Sampler(backend=backend)
@malagueta7807
@malagueta7807 5 ай бұрын
Muito obrigado pela oportunidade de aprender com os melhores do mundo. KZbin OBRIGADO , IBM OBRIGADO ,PROFESSOR DEREK WANG obrigado, pelo material de estudo jamais teria condição financeira para pagar por esta aula!DEUS os ABENÇOE.(BRASIL )
@dlcrdz00
@dlcrdz00 4 ай бұрын
Please bear with me as my eyes gloss over trying to keep up with the subject matter. Some of this stuff I never heard of...haha I need to start from the beginner phase.
@Destabilizator
@Destabilizator 3 ай бұрын
IBM provides whole Quantum Learning, along with option to get certifications 🙂
@chisomodaka3616
@chisomodaka3616 6 ай бұрын
Hi Derek, this is amazing!!! I have one issue that I may need to get your insight into. At the moment I am trying to simulate strongly correlated (you may say maximally entangled) "physics" using the Sachdev-Ye-Kitaev (SYK) model on IBM QP. However, I noticed that in your Ising Model, the Hamiltonian was simulated sequentially (i.e. using trotter steps). In this case, I can not adopt a similar "sequential" approach for the SYK model - since I need to simulate the dynamical evolution of the Hamiltonian. So my question is... is there any way to simulate a dynamically evolving Hamiltonian on IBM QP? Or could there be an approach to mimic maximally entangled systems? Your feedback will be greatly appreciated
@DerekWangIBM
@DerekWangIBM 6 ай бұрын
By "dynamical evolution of the Hamiltonian" do you mean that the Hamiltonian is time-dependent?
@chisomodaka3616
@chisomodaka3616 6 ай бұрын
@@DerekWangIBM Yes that's right, the Hamiltonian evolves in time.
@DerekWangIBM
@DerekWangIBM 6 ай бұрын
@@chisomodaka3616 You should be able to apply Trotterization just as before, except now the gates would change at each Trotter layer. However, whether this approach is the most efficient for extracting your desired observable, it depends on the problem.
@chisomodaka3616
@chisomodaka3616 6 ай бұрын
@@DerekWangIBMThanks for your insights. Changing the gates at each step makes a lot more sense. Will look into it 👍🏻
@bst0518
@bst0518 27 күн бұрын
That bed looks cozy. How much was it?
@tomasfernandezpena8854
@tomasfernandezpena8854 5 ай бұрын
Nice videos! I have a question. In the qc_list in step 1 of Sampler, all the quantum circuits are identical because they all have the same num_trotter_steps. Maybe the correct way to create then is using in generate_1d_tfim_circuit the value trotter_step+1 instead of num_trotter_steps, isn't it?
@dipanjanbera5493
@dipanjanbera5493 6 ай бұрын
Hello sir in the last estimation technique, in post processing and plotting I got a value error of “x and y must have same first dimension, but you have shapes (1,) and (9,)” And I have another question that - any job id can I use which is already completed in ibm platform in post processing technique ?
@Destabilizator
@Destabilizator 3 ай бұрын
Instead of manually inverting the circuit, why cannot we simply do qc_inversed = qc.inverse() # Invert the circuit qc.compose(qc_inversed, inplace=True) # Connect original and inversed, qc will be modified qc.draw(output='mpl', fold=-1) (now this results in a bit of mess in the barriers, but that's still easier to solve than inversing all the functions) Is it because it doesn't really know how to invert our custom gates?
@zenwith4eyes
@zenwith4eyes 2 ай бұрын
yes we can can always use the inverse method to invert the circuit but the inverse method returns the unitary matrix for that gate so in case the unitary and inverse unitary matrix isn't the same (might be the case for phase shift gates) it might generate an undesired output so its better to manually invert the gates .In this case the unitary and the inverse unitary matrix is the same it doesn't really make any difference just a bit of mess while visualizing:)
@johnabruce
@johnabruce 6 ай бұрын
It there any way to take a measurement and not retain the results of that measurement? Example QC would be H-M-H-M but do not retain the first M (measurement) in the results returned? It is a weird case. I know generally the measurement is retained and I can't find a way around it. Can you help or point to documentation or a community forum?
@LokPendergraph-mp8gw
@LokPendergraph-mp8gw 6 ай бұрын
I recently started learning quantum computing programming. When I installed Qiskit 1.0.2 on my laptop, I found that it couldn't import the aer module (assuming I had already installed the aer module correctly). What's going on? I just want it to display simulation images
@johnabruce
@johnabruce 6 ай бұрын
@@LokPendergraph-mp8gw Try from qiskit_aer import AerSimulator.
@DerekWangIBM
@DerekWangIBM 6 ай бұрын
If you don't want the information from the first M in your classical register, you could overwrite it when you collect the bit from the second M--just send that second bit to the same spot of the classical register. Another way you could "not know" the first M is the collect the information and then use qiskit.result.marginalize_counts() over the index of the first bit.
@DerekWangIBM
@DerekWangIBM 6 ай бұрын
@@LokPendergraph-mp8gw Did you first `pip install qiskit-aer` and see that you could import it? So assuming you did, then do you mean after installing Qiskit 1.0.2, you lost access to Qiskit Aer?
@johnabruce
@johnabruce 6 ай бұрын
@@DerekWangIBM Thanks, that is what I did. I overwrote it. GPT4 suggested the same thing.
@constantinr418
@constantinr418 3 ай бұрын
Thank you so much. How do you get the LaTeX code to appear when you qc.draw ?
@constantinr418
@constantinr418 3 ай бұрын
what I meant is that in my case, instead of |a> for example, as LaTex would produce, I get |a angle, which is the LaTeX code itself. I copied exactly the code Derek wrote, but my display results for all labels are different. I do have a working LaTeX distribution on my machine.
@hwcphysics
@hwcphysics 5 ай бұрын
Outstanding sir
@마루나라-n7s
@마루나라-n7s 6 ай бұрын
I got a totally different result even though I used the same backend and the code. When using sampler, my result fluctuates twice from 1 to 0.4 and for estimator, it is almost stable not going down as the angle increases. Could that be possible? or maybe my code is wrong? But anyway, I love the episodes. Can you also show us about the new sessions that have been announced recently?
@DerekWangIBM
@DerekWangIBM 6 ай бұрын
Glad the episodes are helpful. Devices are regularly calibrated, so performance can differ from run to run. You could explore the different error suppression and mitigation methods.
@NormanWasHere452
@NormanWasHere452 4 ай бұрын
I have same results. Essentially random fluctuations between 0.4 and 1.
@birincimammadzada
@birincimammadzada 6 ай бұрын
thank you. Please hire me as an intern at IBM :)
@LokPendergraph-mp8gw
@LokPendergraph-mp8gw 6 ай бұрын
I recently started learning quantum computing programming. When I installed Qiskit 1.0.2 on my laptop, I found that it couldn't import the aer module (assuming I had already installed the aer module correctly). What's going on? I just want it to display simulation images
@hwcphysics
@hwcphysics 5 ай бұрын
Thanks sir
@wanderer3005
@wanderer3005 6 ай бұрын
Пиздец как сложно
@HrvojeKalic
@HrvojeKalic 6 ай бұрын
For some reason, my "Survival probability..." plot is very different. All "2Q gate Depth" values are above 0.8. Only at Depth 20, the value drop below 0.3 Is this a normal behavior? I also used ibm_brisbane backend. edit: The estimator program returned an even stranger plot. values are < 0.0 for Rx angle < 0.35
@DerekWangIBM
@DerekWangIBM 6 ай бұрын
As I mention to a user in another comment, devices are regularly calibrated, so performance can differ from run to run. You could explore the different error suppression and mitigation methods.
@sebastiandipanjan.7335
@sebastiandipanjan.7335 6 ай бұрын
Hello sir in the last estimation technique, in post processing and plotting I got a value error of "x and y must have same first dimension, but you have shapes (1,) and (9,)" And I have another question that any job id can I use which is already completed in ibm platform in post processing technique ?
@DerekWangIBM
@DerekWangIBM 6 ай бұрын
For the first issue, it looks like your input for x in the plotting function needs 9 elements. For the second, do you mean can you run a circuit without error mitigation first, and then later decide to add error mitigation? Perhaps in some cases, but many error mitigation methods require additional circuits to be executed at runtime to be effective (for instance, readout mitigation requires calibration circuits), so generally, you should apply error mitigation at runtime.
@Destabilizator
@Destabilizator 3 ай бұрын
@@DerekWangIBM I think he meant to just load results of some completed job and plot it, so he doesn't have to run (and wait for) his own. Is it possible to load data from other (someone elses?) job if you know the job ID?
They Chose Kindness Over Abuse in Their Team #shorts
00:20
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
СОБАКА ВЕРНУЛА ТАБАЛАПКИ😱#shorts
00:25
INNA SERG
Рет қаралды 3,9 МЛН
Your Guide to 100+ Qubits: Quantum Computing in Practice
23:15
How To Code A Quantum Computer
20:42
Lukas's Lab
Рет қаралды 665 М.
Day 309 - study scikit-learn's MOOC (Ensemble of models) with me
3:31:52
The Map of Quantum Computing - Quantum Computing Explained
33:28
Domain of Science
Рет қаралды 1,7 МЛН
MVA RL class - class 4, FQI to DQN
2:54:48
Emmanuel Rachelson
Рет қаралды 121
CompTIA Network+ Certification Video Course
3:46:51
PowerCert Animated Videos
Рет қаралды 8 МЛН
Kubernetes 101 workshop - complete hands-on
3:56:03
Kubesimplify
Рет қаралды 1,7 МЛН