Skip to content

Commit

Permalink
Merge pull request #1 from sandialabs/dev
Browse files Browse the repository at this point in the history
Added all of the base files from the Sandia repository.
  • Loading branch information
i-am-mounce authored Nov 17, 2023
2 parents 437b32f + 9bdbb34 commit 83d30f6
Show file tree
Hide file tree
Showing 820 changed files with 493,640 additions and 0 deletions.
12 changes: 12 additions & 0 deletions FPGA_SETUP.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
REM FPGA_SETUP.bat copies the necessary files from the qickdawg package onto the FPGA. This includes, a copy of qick, packages and files needed to run the FPGA as an obejct, and our modified QICKDAWG firmware

REM To run this file, open the command prompt on your computer that is connected to the FPGA. In the command prompt change your directory to the folder of your unzipped copy of QICKDAWG that contains this file--FPGA_SETUP.bat. Once you are in the correct directory, type <FPGA_SETUP.bat> into the command prompt and hit enter. You will be prompted to enter the IP address of your FPGA and the password--xilinx.

REM After running this file you should run Install_Packages.ipynb, located in the installation folder, from the Jupyter Notebooks interface.

@echo off

set /p IP=Enter IP address:

scp -r installation xilinx@%IP%:/home/xilinx/jupyter_notebooks
scp -r qick xilinx@%IP%:/home/xilinx/jupyter_notebooks
110 changes: 110 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# QICK-DAWG

## Quantum Instrumentation Control Kit - <br/>Defect Arbitrary Waveform Generator
<p align="center">
<img src="graphics/QD_logo.png"
alt="QD logo"
width="300x"/>
</p>


## Description
The Quantum Instrumentation Control Kit - Defect Arbitrary Waveform Generator (QICK-DAWG) is an extension of [QICK](https://github.com/openquantumhardware/qick) with the purpose of controlling nitrogen-vacancy in diamond and other quantum defects for quantum sensing and other quantum applications. QICK-DAWG utilizes Xilinx Radio Frequency System-on-Chip (RFSoC) Field Programmable Gate Array (FPGAs) evaluation boards which are significantly less expensive than hardware currently available and have the potential for superior capabilities.

In this package we supply specific mw, laser, and readout pulsing code to characterize photoluminescence intensity, optically detected magnetic resonance (ODMR), spin readout, Rabi Oscillation, Hahn Echo T<sub>2</sub>, and T<sub>1</sub> relaxation. A Jupyter Notebook Demo is included for performing all of these measurements with an RFSoC4x2 to demonstrate typical measurements.

## Hardware

- Either [RFSoC4x2](https://www.xilinx.com/support/university/xup-boards/RFSoC4x2.html) or [ZCU111](https://www.xilinx.com/products/boards-and-kits/zcu111.html)
- Router [(example)](https://www.amazon.com/TP-Link-Integrated-Lightening-Protection-TL-R605/dp/B08QTXNWZ1/ref=asc_df_B08QTXNWZ1/?tag=hyprod-20&linkCode=df0&hvadid=475692076734&hvpos=&hvnetw=g&hvrand=3761702075041011209&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=1022494&hvtargid=pla-1149738264234&psc=1) and ethernet cords
- Control Computer
- Low Frequency Differential Amplifier such as [Texas Instruments LMH5401EVM](https://www.digikey.com/en/products/detail/texas-instruments/LMH5401EVM/5031896?s=N4IgTCBcDaIDIFkASBWALABgIwFEBqCIAugL5A)
- 3 Voltage supplies to power the differential amplifier

## Installation
To install QICKDAWG software follow the README found [here](https://gitlab-ex.sandia.gov/amounce/qickdawg/-/blob/main/installation/RFSoC4x2_ReadMe.md#quantum-instrumentation-control-kit-defect-arbitary-waveform-generator). Software installation includes:

## Usage
QICKDAWG has programs for the characterization of:
- Photoluminescence (PL) Intensity
- Optically Detected Magnetic Resonance (ODMR)
- Readout Window
- Rabi Oscillations
- Hanhn Echo T<sub>2</sub>
- T<sub>1</sub> Relaxation

using a ZCU111 or RFSoC4x2. Support for the ZCU216 coming soon.

<!-- ### Example use: ###
Optically Detected Magnetic Resonance (ODMR) is one of the QICKDAWG demo pulse sequences. To run ODMR, and any of the other pulse sequences, you must first set the default configuration. The following code, found in the demo Jupyter Notebook, sets the deault configuration.
<p align="center">
<img src="graphics/config_example.PNG"
alt="configuration code example"
width="500x"/>
</p>
The following code copies the default configuration, adjusts a a few configuration settings, and runs ODMR. This code is found in the demo Jupyter Notebook.
<p align="center">
<img src="graphics/odmr_example_code.PNG"
alt="configuration code example"
width="400x"/>
</p>
The pulse sequencing for ODMR is configured in LockinODMR.py as:
<p align="center">
<img src="graphics/odmr_pulse.jpg"
alt="pulse sequencing for ODMR "
width="300x"/>
</p>
This is a graph of microwave frequency (MHz) versus ODMR contrast made from data collected using the QICKDAWG ODMR pulse sequencing.
<p align="center">
<img src="graphics/odmr_example_graph.png"
alt="pulse sequencing for ODMR "
width="200x"/>
</p>
-->

## Support
To raise an issue use the Issues button on the side bar. Email Andy Mounce at [email protected] for further support.


## Authors and acknowledgment
Andy Mounce<sup>[1](#CINT)</sup>, Emmeline Riendeau<sup>[1](#CINT),[2](#Hav)</sup>

<a name="CINT">1</a>: Center for Integrated Nanotechnology (CINT), Sandia National Laboratories<br>
<a name="Hav">2</a>: Haverford College '24

Thank you to Sho Uemura at Fermi Labs for helping us edit the QICK firmware.


## License
Copyright 2023 National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software.


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.

## Project status
QICKDAWG project is active and updates will be added as changes are made.


71 changes: 71 additions & 0 deletions STATUS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
THINGS THAT NEED TO GET DONE

- Upload to GitHub -- by 10/31
- Submit Joss paper -- by 10/31

- Run through installation once more -- 98% sure it should work with no changes (AM)

- Check through the functionality once more -- run jupyter notebook (AM) or (ER)

- Do we have automated tests for users to test functionality?
- Should we just link to the QICK loop back test?

-Software paper -- (ER) will review and edit this
-Summary for diverse non specialist audience
-Statement of need
-State of the field

-Modify the hardware readme to include the ZCU111?
-Modify the voltage divider in the hardware readme to match our current version

- Setup.py and SPHINX documentation (ER/AM)
________________________________________________________________________

TO DO SOONER THAN LATER

- setup a diamond/laser/mw/FPGA setup so we can test the functionality
- (ER) meet with Jasmine talk about SPINX and setup.py
- Need to update the voltage divider from my old version to the new version and get pictures

________________________________________________________________________

OUTSTANDING QUESTIONS

-Do we have automated tests for users to test functionality?
-What do we want to put under the hardware section? I added a shortened list from the hardware readme that I have archived
-Under project status do we want to say that a hardware setup/readme will be coming soon?
-How do we want to credit Sho? Right now we just say thank you to Sho on the main readme page.
-I had to add config.mw_readout_delay_treg to Readoutwindow in 4x2demo--I'm not sure what it should be set to can you check on this?
-I had to config.laser_readout_offset_treg=310 ## ER HAD TO ADD THIS to 4x2
-I had to mw_readout_delay and laser_readout_offset to Hahn echo
- Are we making functionality claims -- part of the JOSS paper. I think this would be related to the overhead in timing
-Do we want to edit the installation to make sense for 4x2 and 111 users?
-this would mean sectioning off the balun surgery for onyl 4x2 users
-incuding a schematic setup for 111 users

______________________________________________________________________

MOVE THINGS HERE WHEN THEY ARE COMPLETED

- Add licensing to readme (ER) DONE 10/14
- added the SANDIA text required before the OSS license
- used the MIT license template from GITHUB for the rest of the text
- I compared this to software on the sandia github and ours looks good
- this is in both the readme and its own license text document
- ER edited main page readme and feels like its done 10/14
- edited the wording of the abstract
- changed the hardware section
- added the proper licensing
- went through and implemented AM comments in the main readme and installation read me 10/15
- went through the pulse sequence plotting and adjusted the vars_on plots so that the text is readable 10/15
- 10/16 made some quick qickdawg timing analysis code--runs through each sequence for a range of reps and then does a linear fit on the data
Right now I'm thinking that the y intercept is the overhead time for any run regardless of the reps
There might be fancier things we could do to add to the analysis like comparing the pusling time to the actual time it takes to run, but
I feel like this would only show the relax delay time and its already clear from the documentation what/how long that is
** I should re run this notebook with the correct settings for mw_readout_delay_treg and laser_readout_offset --> not sure what they should be

_______________________________________________________________________

WHEN THE GITHUB IS POSTED CHANGE THESE THINGS

- need to redo the internal links to other files
54 changes: 54 additions & 0 deletions change.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
10/20/2023 AMM

Added this change log, append to top
Removed aom_readout() code, removed readout_mode
Moved analyze_results to NVAveragerPogram now called analyze_pulse_sequence_results()
Moved two source ODMR to nvpulsing/development, same with two source frequency Sweep
Moved CPMGXY8nDelaySweep to development
Added documentation to all of nvpulsing code

Need to:
Double check NVAvergerProgram subclassed objects for attribute requirements
add "check_config" function to check required parameters
add "time_per_rep" method to all subclasses
add "total_time" method to all subclasses
Run demo notebook

10/21/2023 ER

Added check_cfg to Pintensity
Added check_cfg to lockinODMR
Added reads_per_rep and reps as required at the top of lockinODMR
Added .reps(required) .relax_delay_treg(required) to PL intentensity

Need to:
add longer parameter description to PL intentensity

10/23/2023 AMM
- Made laser_on and laser_off function
- plot_sequence is now plot without needing to initialize objects
- small tweaks to check_cfg
- much more text in demo notebook

10/25/2023
- New function start_client, which returns the qick socket and configuration objects
- removing soc and soccfg from input paramters, these are now assigned to the qd packag

10/15/2023 ER (what is this date?)
- removing the soc arugment in aquire_decimated in NVAveragerPogram
- soc --> qd. soc

Q: If nsweep_points is only needed when using expt sweep how should we put this in check_cfg()

11/1/2023 (AMM)

Getting Readoutwindow, RabiSweep, HahnEchoDelaySweep, and T1DelaySweep upto date with newest syntax for
plot_sequence
acquire

11/2/2023 (AMM)
Continuing docuemntation and fixes
config.readout_delay_t# was inconsistent between different measurement programs, should be
config.mw_readout_delay_t#. Changed where necessary.


Empty file added graphics/.gitkeep
Empty file.
Binary file added graphics/Flash_SD_Card.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/HAHN_ECHO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 83d30f6

Please sign in to comment.