Skip to content
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

David/qubit tracking #581

Merged
merged 15 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions src/qibolab/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ def update(self, updates: dict):
elif par == "sweetspot":
sweetspot = float(value)
self.qubits[qubit].sweetspot = sweetspot
if self.qubits[qubit].flux is not None:
# set sweetspot as the flux offset (IS THIS NEEDED?)
self.qubits[qubit].flux.offset = sweetspot

# qubit_spectroscopy / qubit_spectroscopy_flux / ramsey
elif par == "drive_frequency":
Expand Down Expand Up @@ -201,6 +198,28 @@ def update(self, updates: dict):
elif par == "classifiers_hpars":
self.qubits[qubit].classifiers_hpars = value

# Flux resonator spectroscopy
elif par == "flux_to_bias":
self.qubits[qubit].flux_to_bias = float(value)

elif par == "asymmetry":
self.qubits[qubit].asymmetry = float(value)

elif par == "readout_coupling":
self.qubits[qubit].g = float(value)

elif par == "brf":
self.qubits[qubit].brf = float(value)

elif par == "ssf_brf":
self.qubits[qubit].ssf_brf = float(value)

elif par == "Ec":
self.qubits[qubit].Ec = float(value)

elif par == "Ej":
self.qubits[qubit].Ej = float(value)

stavros11 marked this conversation as resolved.
Show resolved Hide resolved
else:
raise_error(ValueError, f"Unknown parameter {par} for qubit {qubit}")

Expand Down
22 changes: 16 additions & 6 deletions src/qibolab/qubits.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,25 @@ class Qubit:
name: QubitId

bare_resonator_frequency: int = 0
readout_frequency: int = 0 # this is the dressed frequency
readout_frequency: int = 0
""" Readout dressed frequency"""
drive_frequency: int = 0
anharmonicity: int = 0
Ec: int = 0
Ej: int = 0
g: int = 0
sweetspot: float = 0.0
flux_to_bias: float = 0.0
asymmetry: float = 0.0
brf: float = 0.0
andrea-pasquale marked this conversation as resolved.
Show resolved Hide resolved
andrea-pasquale marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

@DavidSarlle what is the final decision for this? Here we are still using brf but in qiboteam/qibolab_platforms_qrc#54 you changed to bare_resonator_frequency_sweetspot.

Copy link
Contributor

Choose a reason for hiding this comment

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

Depending on this I will also update qiboteam/qibocal#538
Personally I think that we should use bare_resonator_frequency_sweetspot.
Also ssf_brf could be renamed to something like ratio_sweetspot_qubit_freq_bare_resonator_freq which is pretty long but at least we know what it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry @stavros11 and @andrea-pasquale I forgot to push the latest changes where I modified the brf name to bare_resonator_frequency_sweetspot.

@andrea-pasquale regarding the ssf_brf, we can modifiy it as you said, but is a very large name for a variable... I have also included the docstrings with the explanation, so I think is better if we keep it as it is...

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, I will not argue for the name of a single variable.
Let's keep ssf_brf and merge this PR.

Copy link
Member

Choose a reason for hiding this comment

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

Great, if everyone agrees, please merge this when the CI passes.

"""Bare resonator frequency at sweetspot"""
ssf_brf: float = 0.0
"""Estimated sweetspot qubit frequency divided by the bare_resonator_frequency"""
Ec: float = 0.0
"""Readout Charge Energy"""
Ej: float = 0.0
"""Readout Josephson Energy"""
g: float = 0.0
"""Readout coupling"""

assigment_fidelity: float = 0.0
sweetspot: float = 0
peak_voltage: float = 0
pi_pulse_amplitude: float = 0
T1: int = 0
Expand All @@ -55,7 +66,6 @@ class Qubit:
state1_voltage: int = 0
mean_gnd_states: List[float] = field(default_factory=lambda: [0, 0])
mean_exc_states: List[float] = field(default_factory=lambda: [0, 0])
resonator_polycoef_flux: List[float] = field(default_factory=list)

# parameters for single shot classification
threshold: Optional[float] = None
Expand Down
5 changes: 0 additions & 5 deletions tests/dummy_qrc/zurich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ characterization:
single_qubit:
0:
readout_frequency: 5_229_200_000 #5_233_200_000
resonator_polycoef_flux: []
drive_frequency: 4_095_830_788 #4_093_830_788
T1: 0.0
T2: 0.0
Expand All @@ -168,7 +167,6 @@ characterization:

1:
readout_frequency: 4_931_000_000
resonator_polycoef_flux: []
drive_frequency: 4_170_000_000
T1: 0.
T2: 0.
Expand All @@ -177,7 +175,6 @@ characterization:
mean_exc_states: [0, 0]
2:
readout_frequency: 6.109e+9 #6_112_000_000
resonator_polycoef_flux: []
drive_frequency: 4_300_587_281 # 4_401_600_000 #4_541_100_000
T1: 0.
T2: 0.
Expand All @@ -190,7 +187,6 @@ characterization:
# alpha: 208 MHz
3:
readout_frequency: 5_783_000_000
resonator_polycoef_flux: []
drive_frequency: 4_100_000_000
T1: 0.
T2: 0.
Expand All @@ -199,7 +195,6 @@ characterization:
mean_exc_states: [0, 0]
4:
readout_frequency: 5_515_000_000
resonator_polycoef_flux: []
drive_frequency: 4_196_800_000
T1: 0.
T2: 0.
Expand Down