<jupyter_start><jupyter_text>Sample Experiment in QCoDeSA virtual digital to analog converter and multimeter setup  0. Open conda environment and launch Jupyter labList conda environments:``` bashconda env list```Start the one that you are using: ``` bashconda start qcodes```Initialize the Jupyter lab: ``` bashjupyter lab```  1. Import modules and packages<jupyter_code>import numpy as np
import qcodes as qc
from qcodes.dataset import (
    Measurement,
    experiments,
    initialise_or_create_database_at,
    load_by_run_spec,
    load_or_create_experiment,
)

## Dummy instruments for generating synthetic data
from qcodes.tests.instrument_mocks import (
    DummyInstrument, 
    DummyInstrumentWithMeasurement
)

## Multidimensional scanning module
from qcodes.utils.dataset.doNd import (
    dond, 
    LinSweep
)

## Integrated plotting module
from qcodes.dataset.plotting import plot_dataset

## Using interactive widget
from qcodes.interactive_widget import experiments_widget<jupyter_output><empty_output><jupyter_text>2. Create a station3. Initialize and configure instruments and their respective parameters4. Initialize a database & create an experiment5. Configure and point doNd utility to dependent and independent variables6. Start measuring!7. Plot & convert data to desired format  2. Initialize and configure instruments and their respective parameters<jupyter_code># A dummy signal generator with two parameters ch1 and ch2
dac = DummyInstrument('dac', gates=['ch1', 'ch2'])

# A dummy digital multimeter that generates a synthetic data depending
# on the values set on the setter_instr, in this case the dummy dac
dmm = DummyInstrumentWithMeasurement('dmm', setter_instr=dac)
dmm.print_readable_snapshot()
# setting the value of channel 1 to 1.1?? What does this do though?
dac.ch1(1.1)
dmm.v1()<jupyter_output><empty_output><jupyter_text>3. Create a station, adding all instruments and parameters to it<jupyter_code># Initialize a station to add all of our components to
station = qc.Station()

# Add the dac and dmm to it
station.add_component(dac)
station.add_component(dmm)
# Show a sample snapshot of the station, this can be saved to a text file, for instance
station.snapshot()<jupyter_output><empty_output><jupyter_text>4. Create a database and experiment<jupyter_code># Create a database at the specified location
initialise_or_create_database_at("~/git/Qcodes/docs/examples/sample_experiments.db")
# Create an experiment
sample_exp = load_or_create_experiment(
    experiment_name="sample_exp",
    sample_name="synthetic data"
)<jupyter_output><empty_output><jupyter_text>5. Configure the sweeps<jupyter_code># Setting up a doNd measurement
sweep_1 = LinSweep(dac.ch1, -1, 1, 20, 0.01)
sweep_2 = LinSweep(dac.ch2, -1, 1, 20, 0.01)<jupyter_output><empty_output><jupyter_text>6. Run doNd to start collecting data!<jupyter_code># Run the data collection with the dond function for 1d
dond(
    sweep_1,                          # 1st independent parameter
    #sweep_2,                          # 2nd independent parameter
    dmm.v1,                           # 1st dependent parameter
    #dmm.v2,                           # 2nd dependent parameter
    measurement_name="dond_example",  # Set the measurement name
    exp=sample_exp,                 # Set the experiment to save data to.
    show_progress=True                # Optional progress bar
)

# Run the data collection with the dond function for 2d
dond(
    sweep_1,                          # 1st independent parameter
    sweep_2,                          # 2nd independent parameter
    dmm.v1,                           # 1st dependent parameter
    dmm.v2,                           # 2nd dependent parameter
    measurement_name="dond_example",  # Set the measurement name
    exp=sample_exp,                 # Set the experiment to save data to.
    show_progress=True                # Optional progress bar
)<jupyter_output>Starting experimental run with id: 8. Using 'qcodes.utils.dataset.doNd.dond'<jupyter_text>7. List and plot the data<jupyter_code># List all datasets in database
experiments()
# List all datasets in an experiment
sample_exp.data_sets()
# Load the dataset using one or two specifications
dataset_1d = load_by_run_spec(experiment_name='sample_exp', captured_run_id=5)
dataset_2d = load_by_run_spec(experiment_name='sample_exp', captured_run_id=6)
# Plot the 1d dataset
plot_dataset(dataset_1d)
# Plotting 2d dataset
plot_dataset(dataset_2d)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07025344597598933, 'fraction_numerical': 0.015562472209871054, 'mean_word_length': 3.943956043956044, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '352504', 'license': 'MIT', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1330, 'n_words': 426, 'path': 'docs/examples/SampleExp-Copy1.ipynb', 'repo_name': 'NikolaiTeslovich/Qcodes', 'size': '4498'}