Skip to content

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

Merged
merged 13 commits into from
May 13, 2020
Merged

Initial T2 experiment #2725

merged 13 commits into from
May 13, 2020

Conversation

dstrain115
Copy link
Collaborator

  • 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.
@googlebot googlebot added the cla: yes Makes googlebot stop complaining. label Jan 31, 2020
Copy link
Contributor

@peterse peterse left a 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:
Copy link
Contributor

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

Copy link
Collaborator Author

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).

Copy link
Collaborator

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!

Copy link
Collaborator Author

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!

Copy link
Contributor

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

vtomole
vtomole previously requested changes Feb 4, 2020
Copy link
Collaborator

@vtomole vtomole left a 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2020 copyright

Copy link
Collaborator Author

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
Copy link
Collaborator

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

Copy link
Collaborator Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2020 copyright

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@dstrain115 dstrain115 requested a review from vtomole February 7, 2020 18:22
_T2_COLUMNS = ['delay_ns', 0, 1]


def t2_decay(sampler: work.Sampler,
Copy link
Contributor

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:

  1. 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.

  1. 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).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on offline comments:

  1. 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.

  2. This comment will be included for CPMG in a follow-up PR and not for Spin Echo.

@dstrain115 dstrain115 dismissed vtomole’s stale review April 17, 2020 21:26

Comments have been addressed.

@dstrain115
Copy link
Collaborator Author

@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.

Copy link
Collaborator

@dabacon dabacon left a 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?

@dstrain115
Copy link
Collaborator Author

LGTM, maybe we need an issue to track CPMG?

Added #3001

@dstrain115 dstrain115 merged commit 6bdcb1c into quantumlib:master May 13, 2020
tonybruguier pushed a commit to tonybruguier/Cirq that referenced this pull request Aug 23, 2020
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants