# qudeveth/pycqed_py3 architecture

> Architecture diagram of the GitHub repository qudeveth/pycqed_py3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/qudeveth/pycqed_py3
- Repository: https://github.com/qudeveth/pycqed_py3

## Overview

##### Main Components Identification
The system should be divided into these major components:

a. Core Framework Components:
- Measurement Control System
- Analysis Framework (v1, v2, and v3)
- Instrument Drivers Layer
- Waveform Control System
- GUI Interface

b. Supporting Components:
- Utilities
- Simulations
- Documentation
- Testing Framework

##### Component Relationships

**[Hardware Layer]**
- ↑↓
**[Instrument Drivers]**
- ↑↓
**[Measurement Control]**
- ↑↓
**[Waveform Control] ←→ [Analysis Framework]**
- ↑↓
**[GUI Interface] ←→ [User Layer]**

##### Specific Implementation Details

a. Instrument Driver Architecture:
- Physical Instruments (ZurichInstruments, AWGs, etc.)
- Meta Instruments (Qubit Objects, Device Control)
- Virtual Instruments (Simulation/Testing)

b. Measurement Framework:
- Pulse Sequences
- Calibration Routines
- Detector Functions
- Sweep Functions

c. Analysis Pipeline:
- Multiple Analysis Versions (v1, v2, v3)
- Data Processing
- Fitting Tools
- Visualization

##### Specific Design Elements

Critical elements:
- Interface points between components
- Hardware abstraction layers
- Analysis pipeline stages
- Calibration feedback loops

##### Key Features to Highlight

- Circuit-QED specific functionality
- Real-time measurement capabilities
- Hardware abstraction layer
- Multiple analysis framework versions
- Extensible architecture

This system design should emphasize the modular nature of PycQED and its ability to handle complex quantum experiments while maintaining a clear separation of concerns between different components.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Main Components
    subgraph Hardware
        HW[Physical Hardware]:::hardware
    end

    subgraph "Instrument Layer"
        PI["Physical Instruments"]:::driver
        MI["Meta Instruments"]:::driver
        VI["Virtual Instruments"]:::driver
    end

    subgraph "Core Framework"
        MC["Measurement Control"]:::core
        WC["Waveform Control"]:::core
        CAL["Calibration System"]:::core
    end

    subgraph "Analysis Framework"
        AV1["Analysis v1"]:::analysis
        AV2["Analysis v2"]:::analysis
        AV3["Analysis v3"]:::analysis
    end

    subgraph "User Interface"
        GUI["GUI Interface"]:::ui
    end

    subgraph "Support Systems"
        UT["Utilities"]:::support
        SIM["Simulations"]:::support
        DOC["Documentation"]:::support
        TEST["Testing Framework"]:::support
    end

    %% Relationships
    HW <--> PI
    PI --> MC
    MI --> MC
    VI --> MC
    
    MC <--> WC
    WC --> CAL
    
    MC --> AV1
    MC --> AV2
    MC --> AV3
    
    WC --> GUI
    AV1 --> GUI
    AV2 --> GUI
    AV3 --> GUI

    %% Support System Connections
    UT -.-> MC
    UT -.-> WC
    SIM -.-> VI
    TEST -.-> MC

    %% Click Events
    click MC "https://github.com/QudevETH/PycQED_py3/blob/qudev_master/pycqed/measurement/measurement_control.py"
    click AV1 "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/analysis/"
    click AV2 "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/analysis_v2/"
    click AV3 "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/analysis_v3/"
    click PI "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/instrument_drivers/physical_instruments/"
    click MI "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/instrument_drivers/meta_instrument/"
    click VI "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/instrument_drivers/virtual_instruments/"
    click WC "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/measurement/waveform_control/"
    click CAL "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/measurement/calibration/"
    click GUI "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/gui/"
    click UT "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/utilities/"
    click SIM "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/simulations/"
    click DOC "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/docs/"
    click TEST "https://github.com/QudevETH/PycQED_py3/tree/qudev_master/pycqed/tests/"

    %% Styling
    classDef hardware fill:#FFD700,stroke:#333,stroke-width:2px
    classDef driver fill:#90EE90,stroke:#333,stroke-width:2px
    classDef core fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef analysis fill:#98FB98,stroke:#333,stroke-width:2px
    classDef ui fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef support fill:#D3D3D3,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[Hardware]:::hardware
        L2[Drivers]:::driver
        L3[Core]:::core
        L4[Analysis]:::analysis
        L5[UI]:::ui
        L6[Support]:::support
    end
```
