Update Cheat sheet authored by Sander de Snoo's avatar Sander de Snoo
...@@ -106,7 +106,7 @@ phase_param = pulse.rf_params["SD1"].phase ...@@ -106,7 +106,7 @@ phase_param = pulse.rf_params["SD1"].phase
rf_amplitude_param = pulse.rf_params["SD1"].source_amplitude rf_amplitude_param = pulse.rf_params["SD1"].source_amplitude
``` ```
# Sequence # Sequence and measurement parameter
```Python ```Python
sequence = pulse.mk_sequence([segment1, segment2]) sequence = pulse.mk_sequence([segment1, segment2])
...@@ -114,8 +114,19 @@ sequence.n_rep = 500 ...@@ -114,8 +114,19 @@ sequence.n_rep = 500
sequence.set_acquisition(sample_rate=1e6) # for time traces sequence.set_acquisition(sample_rate=1e6) # for time traces
m_param = sequence.get_measurement_param(iq_mode="I+Q") m_param = sequence.get_measurement_param(iq_mode="I+Q")
``` ```
Values for `iq_mode`: "I", "Q", "I+Q", "amplitude", "phase", "amplitude+phase", "complex". Values for `iq_mode`: "I", "Q", "I+Q", "amplitude", "phase", "amplitude+phase", "Complex".
```Python
m_param.add_derived_param("m1_diff", lambda d: d["m1"]-d["m_ref"], unit="mV")
threshold = 32.8
m_param.add_derived_param("m1_state",
lambda d:(d["m1_diff"] > threshold).astype(int),
unit="|..>")
m_param.add_qubit_register("reg123", ["read_q1", "read_q2", "read_q3"])
m_param.reorder_variables(["q123", "m1_fraction", "m2_fraction", ...])
```
# Utils # Utils
```Python ```Python
... ...
......