Skip to content

edited dummy protocols#6

Open
osn07 wants to merge 3 commits intotoolsforexperiments:mainfrom
osn07:dummy_refactoring
Open

edited dummy protocols#6
osn07 wants to merge 3 commits intotoolsforexperiments:mainfrom
osn07:dummy_refactoring

Conversation

@osn07
Copy link
Copy Markdown

@osn07 osn07 commented Apr 8, 2026

implemented measure_dummy to use the respective datagen class instead of individual modeling classes in protocol files. I had to hard code some getters for res_spec_vs_gain.py (testing purposes), but I commented them out for now.

…els from individual file classes. some classes at naming conflicts with fitfuncs.generic, so imports do not currently have consistent naming across files protocol

sweep = sweep_parameter("frequencies", frequencies, record_as(generate, "signal"))
generator = GaussianDataGen(x0=center, sigma=self._SIM_SIGMA, A=self._SIM_AMP, of=0, noise_std=self._SIM_NOISE_AMP)
sweep = sweep_parameter("frequencies", frequencies) * Sweep(record_as(generator.generate(frequencies), "signal"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keep it under a single sweep instead of zipping


sweep = sweep_parameter("gains", gains, record_as(generator.generate, "signal"))
generator = PowerRabiDataGen(pi_amp=self._SIM_PI_AMP, noise_std=self._SIM_NOISE_AMP)
sweep = sweep_parameter("gains", gains) * Sweep(record_as(generator.generate(gains), "signal"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keep it under a single sweep instead of zipping

)

sweep = sweep_parameter("frequencies", frequencies + self.readout_lo(), record_as(generator.generate, "signal"))
frequencies = np.linspace(self.start_frequency(), self.end_frequency(), int(self.steps())) + self.readout_freq()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why the + self.readout_freq()?

sweep = sweep_parameter("frequencies", frequencies + self.readout_lo(), record_as(generator.generate, "signal"))
frequencies = np.linspace(self.start_frequency(), self.end_frequency(), int(self.steps())) + self.readout_freq()
generator = HangerResonator(f0=self._SIM_F0, Qc=self._SIM_QC, Qi=self._SIM_QI, A=self._SIM_A, phi=self._SIM_PHI, noise_std=self._SIM_NOISE_AMP)
sweep = sweep_parameter("frequencies", frequencies) * Sweep(record_as(generator.generate(frequencies), "signal"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keep it under a single sweep instead of zipping

Comment thread src/cqedtoolbox/protocols/operations/single_qubit/res_spec_vs_gain.py Outdated

frequencies = np.linspace(self.start_freq(), self.end_freq(), int(self.steps()))
generator = LorentzianDataGen(x0=self._DUMMY_F_Q, gamma=self._DUMMY_GAMMA, A=self._DUMMY_A, of=0, noise_std=self._DUMMY_NOISE_AMP)
sweep = sweep_parameter('frequencies', frequencies) * Sweep(record_as(generator.generate(frequencies), 'signal'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keep it under a single sweep instead of zipping

generator = LorentzianDataGen(x0=self._DUMMY_F_Q, gamma=self._DUMMY_GAMMA, A=self._DUMMY_A, of=0, noise_std=self._DUMMY_NOISE_AMP)
sweep = sweep_parameter('frequencies', frequencies) * Sweep(record_as(generator.generate(frequencies), 'signal'))
loc, _ = run_and_save_sweep(sweep, "data", self.name)
logger.info("Dummy saturation spectroscopy measurement complete.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

keep this message, it is more descriptive.

+ self._SIM_NOISE_AMP * (np.random.randn() + 1j * np.random.randn()))
sweep = sweep_parameter("delays", delays, record_as(signal_gen, "signal"))
generator = ExponentialDecayingSine(A=self._SIM_AMP, f=self._SIM_DETUNING, phi=0, tau=self._SIM_T2E, of=0, noise_std=self._SIM_NOISE_AMP)
sweep = sweep_parameter("delays", delays) * Sweep(record_as(generator.generate(delays), "signal"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keep it under a single sweep instead of zipping

+ self._SIM_NOISE_AMP * (np.random.randn() + 1j * np.random.randn()))
sweep = sweep_parameter("delays", delays, record_as(signal_gen, "signal"))
generator = ExponentialDecayingSine(A=self._SIM_AMP, f=self._SIM_DETUNING, phi=0, tau=self._SIM_T2R, of=0, noise_std=self._SIM_NOISE_AMP)
sweep = sweep_parameter("delays", delays) * Sweep(record_as(generator.generate(delays), "signal"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keep it under a single sweep instead of zipping

+ self._SIM_NOISE_AMP * (np.random.randn() + 1j * np.random.randn()))
sweep = sweep_parameter("delays", delays, record_as(signal_gen, "signal"))
generator = ExponentialDecayDataGen(A=self._SIM_AMP, tau=self._SIM_T1, of=0, noise_std=self._SIM_NOISE_AMP)
sweep = sweep_parameter("delays", delays) * Sweep(record_as(generator.generate(delays), "signal"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keep it under a single sweep instead of zipping

… using lambda functions). hanger resonator and sat spec moved from datagen in labcore repo to cqedtoolbox repo because not generic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants