qibocal.protocols.flux_dependence package#

Submodules#

qibocal.protocols.flux_dependence.cryoscope module#

Cryoscope experiment.

class qibocal.protocols.flux_dependence.cryoscope.CryoscopeData(flux_pulse_amplitude: float, fir: int, flux_coefficients: dict[typing.Union[int, str], list[float]] = <factory>, filters: dict[typing.Union[int, str], float] = <factory>, data: dict[tuple[typing.Union[int, str], str], numpy.ndarray[typing.Any, numpy.dtype[dtype([('duration', '<f8'), ('prob_1', '<f8')])]]] = <factory>)[source]#

Bases: Data

Cryoscope acquisition outputs.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property pairs#

Access qubit pairs ordered alphanumerically from data structure.

property params: dict#

Convert non-arrays attributes into dict.

property qubits#

Access qubits from data structure.

register_qubit(dtype, data_keys, data_dict)#

Store output for single qubit.

Parameters:
  • data_keys (tuple) – Keys of Data.data.

  • data_dict (dict) – The keys are the fields of dtype and

  • arrays. (the values are the related) –

save(path: Path)#

Store data to file.

flux_pulse_amplitude: float#

Flux pulse amplitude.

fir: int#

Number of feedforward taps to be optimized after IIR.

flux_coefficients: dict[Union[int, str], list[float]]#

Flux - amplitude relation coefficients obtained from flux_amplitude_frequency routine

filters: dict[Union[int, str], float]#

Check if there are filters already.

data: dict[tuple[typing.Union[int, str], str], numpy.ndarray[typing.Any, numpy.dtype[dtype([('duration', '<f8'), ('prob_1', '<f8')])]]]#
has_filters(qubit: Union[int, str]) bool[source]#

Checking if for qubit there are already filters.

class qibocal.protocols.flux_dependence.cryoscope.CryoscopeResults(fitted_parameters: dict[tuple[typing.Union[int, str], str], list[float]] = <factory>, detuning: dict[typing.Union[int, str], list[float]] = <factory>, amplitude: dict[typing.Union[int, str], list[float]] = <factory>, step_response: dict[typing.Union[int, str], list[float]] = <factory>, exp_amplitude: dict[typing.Union[int, str], list[float]] = <factory>, tau: dict[typing.Union[int, str], list[float]] = <factory>, feedforward_taps: dict[typing.Union[int, str], list[float]] = <factory>, feedforward_taps_iir: dict[typing.Union[int, str], list[float]] = <factory>, feedback_taps: dict[typing.Union[int, str], list[float]] = <factory>)[source]#

Bases: Results

Cryoscope outputs.

fitted_parameters: dict[tuple[Union[int, str], str], list[float]]#

Fitted <X> and <Y> for each qubit.

detuning: dict[Union[int, str], list[float]]#

Expected detuning.

amplitude: dict[Union[int, str], list[float]]#

Flux amplitude computed from detuning.

step_response: dict[Union[int, str], list[float]]#

Waveform normalized to 1.

exp_amplitude: dict[Union[int, str], list[float]]#

A parameters for the exp decay approximation

tau: dict[Union[int, str], list[float]]#

time decay constant in exp decay approximation

feedforward_taps: dict[Union[int, str], list[float]]#

feedforward taps

feedforward_taps_iir: dict[Union[int, str], list[float]]#

feedforward taps for IIR

feedback_taps: dict[Union[int, str], list[float]]#

feedback taps

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

qibocal.protocols.flux_dependence.flux_amplitude_frequency module#

Experiment to compute detuning from flux pulses.

qibocal.protocols.flux_dependence.flux_gate module#

FluxGate experiment, implementation of Z gate using flux pulse.

qibocal.protocols.flux_dependence.qubit_crosstalk module#

qibocal.protocols.flux_dependence.qubit_crosstalk.qubit_crosstalk = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

Qubit crosstalk Routine object

qibocal.protocols.flux_dependence.qubit_flux_dependence module#

class qibocal.protocols.flux_dependence.qubit_flux_dependence.QubitFluxData(resonator_type: str, charging_energy: dict[typing.Union[int, str], float] = <factory>, qubit_frequency: dict[typing.Union[int, str], float] = <factory>, data: dict[typing.Union[int, str], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]] = <factory>)[source]#

Bases: Data

QubitFlux acquisition outputs.

resonator_type: str#

Resonator type.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property pairs#

Access qubit pairs ordered alphanumerically from data structure.

property params: dict#

Convert non-arrays attributes into dict.

property qubits#

Access qubits from data structure.

save(path: Path)#

Store data to file.

charging_energy: dict[Union[int, str], float]#

Qubit charging energy.

qubit_frequency: dict[Union[int, str], float]#

Qubit charging energy.

data: dict[typing.Union[int, str], numpy.ndarray[typing.Any, numpy.dtype[dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])]]]#

Raw data acquired.

register_qubit(qubit, freq, bias, signal, phase)[source]#

Store output for single qubit.

class qibocal.protocols.flux_dependence.qubit_flux_dependence.QubitFluxParameters(freq_width: int, freq_step: int, bias_width: Optional[float] = None, bias_step: Optional[float] = None, drive_amplitude: Optional[float] = None, drive_duration: int = 2000)[source]#

Bases: ResonatorFluxParameters

QubitFlux runcard inputs.

drive_amplitude: Optional[float] = None#

Drive amplitude (optional). If defined, same amplitude will be used in all qubits. Otherwise the default amplitude defined on the platform runcard will be used

drive_duration: int = 2000#

Duration of the drive pulse.

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

bias_width: Optional[float] = None#

Width for bias sweep [V].

hardware_average: bool = False#

By default hardware average will be performed.

freq_width: int#

Width for frequency sweep relative to the readout frequency [Hz].

freq_step: int#

Frequency step for sweep [Hz].

nshots: int#

Number of executions on hardware.

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state.

class qibocal.protocols.flux_dependence.qubit_flux_dependence.QubitFluxResults(sweetspot: dict[typing.Union[int, str], float] = <factory>, frequency: dict[typing.Union[int, str], float] = <factory>, fitted_parameters: dict[typing.Union[int, str], dict[str, float]] = <factory>, matrix_element: dict[typing.Union[int, str], float] = <factory>)[source]#

Bases: Results

QubitFlux outputs.

sweetspot: dict[Union[int, str], float]#

Sweetspot for each qubit.

frequency: dict[Union[int, str], float]#

Drive frequency for each qubit.

fitted_parameters: dict[Union[int, str], dict[str, float]]#

Raw fitting output.

matrix_element: dict[Union[int, str], float]#

V_ii coefficient.

_to_json(path: Path, filename: str)#

Helper function to dump to json.

_to_npz(path: Path, filename: str)#

Helper function to use np.savez while converting keys into strings.

static load_data(path: Path, filename: str)#

Load data stored in a npz file.

static load_params(path: Path, filename: str)#

Load parameters stored in a json file.

property params: dict#

Convert non-arrays attributes into dict.

save(path: Path)#

Store results to file.

qibocal.protocols.flux_dependence.qubit_flux_dependence.QubitFluxType = dtype([('freq', '<f8'), ('bias', '<f8'), ('signal', '<f8'), ('phase', '<f8')])#

Custom dtype for resonator flux dependence.

qibocal.protocols.flux_dependence.qubit_flux_dependence.qubit_flux = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

QubitFlux Routine object.

qibocal.protocols.flux_dependence.qubit_vz module#

Experiment to measure the Z rotation of a qubit under a rectangular flux pulse.

qibocal.protocols.flux_dependence.resonator_flux_dependence module#

class qibocal.protocols.flux_dependence.resonator_flux_dependence.ResonatorFluxParameters(freq_width: int, freq_step: int, bias_width: Optional[float] = None, bias_step: Optional[float] = None)[source]#

Bases: Parameters

ResonatorFlux runcard inputs.

freq_width: int#

Width for frequency sweep relative to the readout frequency [Hz].

freq_step: int#

Frequency step for sweep [Hz].

bias_width: Optional[float] = None#

Width for bias sweep [V].

bias_step: Optional[float] = None#

Bias step for sweep [a.u.].

hardware_average: bool = False#

By default hardware average will be performed.

nshots: int#

Number of executions on hardware.

relaxation_time: float#

Wait time for the qubit to decohere back to the gnd state.

qibocal.protocols.flux_dependence.resonator_flux_dependence.resonator_flux = Routine(acquisition=<function _acquisition>, fit=<function _fit>, report=<function _plot>, update=<function _update>, two_qubit_gates=False)#

ResonatorFlux Routine object.

qibocal.protocols.flux_dependence.utils module#

qibocal.protocols.flux_dependence.utils.is_crosstalk(data)[source]#

Check if keys are tuple which corresponds to crosstalk data structure.

qibocal.protocols.flux_dependence.utils.create_data_array(freq, bias, signal, phase, dtype)[source]#

Create custom dtype array for acquired data.

qibocal.protocols.flux_dependence.utils.flux_dependence_plot(data, fit, qubit, fit_function=None)[source]#
qibocal.protocols.flux_dependence.utils.flux_crosstalk_plot(data, qubit, fit, fit_function)[source]#
qibocal.protocols.flux_dependence.utils.G_f_d(xi, xj, offset, d, crosstalk_element, normalization)[source]#

Auxiliary function to calculate qubit frequency as a function of bias.

It also determines the flux dependence of \(E_J\),:math:E_J(phi)=E_J(0)G_f_d. For more details see: https://arxiv.org/pdf/cond-mat/0703002.pdf

Parameters:
  • xi (float) – bias of target qubit

  • xj (float) – bias of neighbor qubit

  • offset (float) – phase_offset [V].

  • d (float) – asymmetry between the two junctions of the transmon. Typically denoted as \(d\). \(d = (E_J^1 - E_J^2) / (E_J^1 + E_J^2)\).

  • crosstalk_element (float) – off-diagonal crosstalk matrix element

  • normalization (float) – diagonal crosstalk matrix element

Returns:

(float)

qibocal.protocols.flux_dependence.utils.transmon_frequency(xi, xj, w_max, d, normalization, offset, crosstalk_element, charging_energy)[source]#

Approximation to transmon frequency.

The formula holds in the transmon regime Ej / Ec >> 1.

See https://arxiv.org/pdf/cond-mat/0703002.pdf for the complete formula.

Parameters:
  • xi (float) – bias of target qubit

  • xj (float) – bias of neighbor qubit

  • w_max (float) – maximum frequency :math:`w_{max} = sqrt{8 E_j E_c}

  • d (float) – asymmetry between the two junctions of the transmon. Typically denoted as \(d\). \(d = (E_J^1 - E_J^2) / (E_J^1 + E_J^2)\).

  • normalization (float) – diagonal crosstalk matrix element

  • offset (float) – phase_offset [V].

  • crosstalk_element (float) – off-diagonal crosstalk matrix element

  • charging_energy – Ec / h (GHz)

qibocal.protocols.flux_dependence.utils.transmon_readout_frequency(xi, xj, w_max, d, normalization, crosstalk_element, offset, resonator_freq, g, charging_energy)[source]#

Approximation to flux dependent resonator frequency.

The formula holds in the transmon regime Ej / Ec >> 1.

See https://arxiv.org/pdf/cond-mat/0703002.pdf for the complete formula.

Parameters:
  • xi (float) – bias of target qubit

  • xj (float) – bias of neighbor qubit

  • w_max (float) – maximum frequency :math:`w_{max} = sqrt{8 E_j E_c}

  • d (float) – asymmetry between the two junctions of the transmon. Typically denoted as \(d\). \(d = (E_J^1 - E_J^2) / (E_J^1 + E_J^2)\).

  • normalization (float) – diagonal crosstalk matrix element

  • offset (float) – phase_offset [V].

  • crosstalk_element (float) – off-diagonal crosstalk matrix element

  • resonator_freq (float) – bare resonator frequency [GHz]

  • g (float) – readout coupling.

  • charging_energy – Ec / h (GHz)

qibocal.protocols.flux_dependence.utils.qubit_flux_dependence_fit_bounds(qubit_frequency: float)[source]#

Returns bounds for qubit flux fit.