-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Initial T2 experiment #2725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial T2 experiment #2725
Conversation
- Creates initial draft experiment to measure T2 and T2* - This experiment sets up a qubit on the Bloch sphere equator, evolves the system (optionally performing a spin echo half way), then measures the system in two bases to determine an approximate length of the Bloch vector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! A few comments but this seems sound as is
return T2DecayResult(x_basis_tabulation, y_basis_tabulation) | ||
|
||
|
||
class T2DecayResult: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool! Are there plans for some kind of abstract class that provides expectations with respect to specific runs/sweeps? This seems like a special case of that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mpharrigan is working on a framework to do something like this. Matt, are you presenting your proposed observation / expectation idea during any of the upcoming cirq cyncs? (you should).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been pushed to the back burner because of some other projects, but I should have some code to share soon!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going over the design doc with the public cirq community might be good to get feedback before you do too much coding though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, looking forward to it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits
@@ -0,0 +1,336 @@ | |||
# Copyright 2019 The Cirq Developers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2020 copyright
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
# Evolve the state for half the given amount of delay time | ||
# Then measure the state in both X and Y bases. | ||
|
||
# TODO: Should be 0.5 * delay_var |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File issue for this TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just changed it now instead.
@@ -0,0 +1,276 @@ | |||
# Copyright 2019 The Cirq Developers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2020 copyright
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
_T2_COLUMNS = ['delay_ns', 0, 1] | ||
|
||
|
||
def t2_decay(sampler: work.Sampler, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just two global comments on the experiment:
- The way Ramsey is done here does not necessarily produce an accurate measure of the dephasing rate T2*. The reason is that the microwave drive could be slightly off-resonant with the qubit, in which case the qubit will simply precess around the equator of the Bloch sphere at a given rate. This will manifest as fast decay on short time scales and be confused with true dephasing (i.e. inhomogeneous noise). Typically in the lab, we would intentionally detune the drive from the qubit frequency to produce Ramsey fringes such that you get a damped sinusoidal decay. This is difficult to do in Cirq. However, we have another way to do similar things:
Instead of fixing the phase of second pi/2 pulse, I would vary it over a small range (say -pi/4 to pi/4). For each value, do the Ramsey experiment for variable durations. The results would be a 2D map of phase vs wait time. This data can be post-processed to get true T2* by selecting the highest <sigma_z> for each pulse duration to produce the decay curve. The idea here is that by shifting the rotation axis we compensate out the dc precession of the qubit due to frequency detuning.
- For spin echo, you might consider giving the user option which axis to rotate around. Typically the result can be different should one rotate around X or Y, as rotating around the axis where the spin is projected to is least sensitive to over- and under-rotations of the echo pulses themselves (this is known to be spin-locking in NMR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on offline comments:
-
We have agreed that estimating Bloch vector size should be sufficient. Adding the detuning as specified in this comment seems to give confusing results, and I am not sure if it is doing what is intended. For now, we will not include this functionality.
-
This comment will be included for CPMG in a follow-up PR and not for Spin Echo.
@XiaoMiQC mentioned offline to go ahead and commit this, since he has no time to review. I can go ahead and make further revisions as necessary after committing if anyone has additional comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, maybe we need an issue to track CPMG?
Added #3001 |
* Initial T2 experiment - Creates initial draft experiment to measure T2 and T2* - This experiment sets up a qubit on the Bloch sphere equator, evolves the system (optionally performing a spin echo half way), then measures the system in two bases to determine an approximate length of the Bloch vector.
Creates initial draft experiment to measure T2 and T2*
This experiment sets up a qubit on the Bloch sphere equator,
evolves the system (optionally performing a spin echo half way),
then measures the system in two bases to determine an approximate
length of the Bloch vector.