Single Measurement

81 views
Skip to first unread message

weiting wang

unread,
Feb 18, 2016, 8:54:18 AM2/18/16
to QuTiP: Quantum Toolbox in Python
Hi,
I want to simulate single measurement on a quantum state.
In another word, If I single measure (|g>+|e>)/sqrt(2), I will get either |g> or |e> otherwise the expectation 0.5 of |g> and 0.5 of |e>.
I want to get the expectation by myself after a lot of single measurement.
How can I real single measurement.
Thank you very much !

Andrew Dawes

unread,
Feb 18, 2016, 10:55:56 AM2/18/16
to qu...@googlegroups.com
There is not a builtin way to do this but you can generate s dataset with given probabilities that match the state. This notebook has an example of what I mean:


Andy



Sent from my phone using voice-recognition software and/or clumsy thumbs, please forgive any typos.
--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew M.C. Dawes

unread,
Feb 18, 2016, 3:29:30 PM2/18/16
to qu...@googlegroups.com
Just because I had been wanting to work this up for my class anyway, here is a sample notebook that defines a function called: simulateData that does what you want (I believe):


Hope it works for you and for anyone else using QuTiP to teach (it’s great for this by the way!)

Andy

liuk...@gmail.com

unread,
Feb 18, 2016, 8:48:02 PM2/18/16
to QuTiP: Quantum Toolbox in Python, wang...@mails.tsinghua.edu.cn
Hi,
I want to simulate single measurement on a quantum state.
In another word, if I single measure on a superposition (|g>+|e>)/sqrt(2), I will get either |g> or |e>. I don't want to get an expectation.
After a lot of single measurement, I get the probability of |g> .
How can I real this function?
Thank you very much.

Alex Pitchford

unread,
Feb 18, 2016, 8:55:25 PM2/18/16
to QuTiP: Quantum Toolbox in Python
Very nice notebook.
Also very pleased to hear you promoting QuTiP as teaching aid.
 
Thank you
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+unsubscribe@googlegroups.com.

weiting wang

unread,
Feb 18, 2016, 9:16:49 PM2/18/16
to QuTiP: Quantum Toolbox in Python
Thank you very much!
I will learn the notebook and hope to communicate with you later.
Weiting 

在 2016年2月18日星期四 UTC+8下午9:54:18,weiting wang写道:

Andrew Dawes

unread,
Feb 18, 2016, 9:55:00 PM2/18/16
to qu...@googlegroups.com
Thanks, and feel free to browse or share the whole repo:


It follows a specific text but should provide a reasonable overview of how to do lots of basic stuff in QuTiP (kind of a student-level precursor to the existing qutip notebooks).

Best
Andy

Sent from my phone using voice-recognition software and/or clumsy thumbs, please forgive any typos.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.

Alex Pitchford

unread,
Feb 18, 2016, 11:57:03 PM2/18/16
to qu...@googlegroups.com
Andrew,

I could link your notebooks from the QuTiP tutorials page if you like?
btw have you seen to 'binder' service for interactively hosting notebooks.
You can link to the QuTiP one from the github now.

Alex

To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew M.C. Dawes

unread,
Feb 19, 2016, 12:03:47 AM2/19/16
to qu...@googlegroups.com
On Feb 18, 2016, at 8:57 PM, Alex Pitchford <alex.pi...@gmail.com> wrote:

Andrew,

I could link your notebooks from the QuTiP tutorials page if you like?
Sure, I have made them fairly “publication ready” in terms of being tidy and self-explanatory

btw have you seen to 'binder' service for interactively hosting notebooks.
You can link to the QuTiP one from the github now.
I did play around with it but I didn’t fully appreciate what it can do until seeing all of the QuTiP demos. Binder may actually be a great way to host stuff for a course where students could individually work through a notebook at their own pace without needing a full python stack.

Thanks!
Andy

Alex Pitchford

unread,
Feb 19, 2016, 4:02:23 AM2/19/16
to qu...@googlegroups.com
Yes, when I saw the binder, I did think that the educational use would be great. Save students having any excuse about not be able to get the library working :) Not sure if they can save individual checkpoints though? Maybe they don't need to for the homework

 

Chris Granade

unread,
Feb 20, 2016, 11:36:51 AM2/20/16
to QuTiP: Quantum Toolbox in Python
Wow, those lectures look great!  I'm really happy to see QuTiP get used in education, thanks for sharing your notebooks!
--Chris

Reply all
Reply to author
Forward
0 new messages