cqc-quam-state 2025.12.29__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cqc-quam-state might be problematic. Click here for more details.

@@ -0,0 +1,9 @@
1
+ """CQC QuAM State management package."""
2
+
3
+ from .utils import get_quam_state_path
4
+
5
+ # Define QUAM_STATE_PATH that points to the installed quam_state directory
6
+ QUAM_STATE_PATH = get_quam_state_path()
7
+
8
+ # Export the variable in package namespace
9
+ __all__ = ['QUAM_STATE_PATH']
cqc_quam_state/cli.py ADDED
@@ -0,0 +1,38 @@
1
+ import click
2
+ import os
3
+ from .utils import get_quam_state_path
4
+
5
+
6
+ @click.group()
7
+ def cli():
8
+ """A CLI tool for managing CQC QuAM state."""
9
+ pass
10
+
11
+
12
+ @cli.command()
13
+ def set():
14
+ """Set a configuration value."""
15
+ click.echo("Set command called")
16
+ # Add your set logic here
17
+
18
+
19
+ @cli.command()
20
+ def info():
21
+ """Display information."""
22
+ click.echo("Info command called")
23
+ # Add your info logic here
24
+
25
+
26
+ @cli.command()
27
+ def load():
28
+ """Load data or configuration."""
29
+ # Run `cqc-quam-state load`
30
+ # Get QuAM state path using the utility function
31
+ quam_state_path = str(get_quam_state_path())
32
+ # print(f"QuAM state path: {type(quam_state_path)}")
33
+
34
+ click.echo(f"export QUAM_STATE_PATH={quam_state_path}")
35
+
36
+
37
+ if __name__ == "__main__":
38
+ cli()
@@ -0,0 +1,30 @@
1
+ """Utility functions for CQC QuAM State."""
2
+
3
+ import os
4
+ from importlib.resources import files
5
+
6
+
7
+ def get_quam_state_path():
8
+ """
9
+ Get the path to the QuAM state directory.
10
+
11
+ Returns:
12
+ str: The absolute path to the QuAM state directory.
13
+ """
14
+ try:
15
+ # For Python 3.9+
16
+ # Access quam_state as a resource within the cqc_quam_state package
17
+ p = files('quam_state')
18
+ # p = files('cqc_quam_state').joinpath('quam_state')
19
+ quam_state_path = str(p._paths[0])
20
+ except Exception as e:
21
+ # Fallback for older Python versions
22
+ # This fallback might also need adjustment if __file__ is not reliable
23
+ # depending on how the package is installed/used.
24
+ # For now, assuming it's a simple local structure.
25
+ libs_dir = os.path.dirname(os.path.dirname(__file__))
26
+ quam_state_path = os.path.join(libs_dir, 'quam_state')
27
+ # print(f"Warning: Using fallback path for quam_state: {quam_state_path}")
28
+ quam_state_path = str(quam_state_path)
29
+
30
+ return quam_state_path
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ output=$(cqc-quam-state load)
3
+ eval $output
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.4
2
+ Name: cqc-quam-state
3
+ Version: 2025.12.29
4
+ Summary: Add your description here
5
+ Author-email: JUNIQ Software Team <info-juniq@fz-juelich.de>
6
+ License: MIT
7
+ Project-URL: Homepage, https://gitlab.jsc.fz-juelich.de/qip/cqc/cqc-quam-state
8
+ Project-URL: Repository, https://gitlab.jsc.fz-juelich.de/qip/cqc/cqc-quam-state
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: click>=8.0.0
17
+
18
+ # CQC QUAM State
19
+
20
+ A command-line tool for managing CQC QuAM (Quantum Abstract Machine) state configuration.
21
+
22
+ ## Overview
23
+
24
+ This package provides access to calibrated quantum device configurations and state files. It includes:
25
+
26
+ - Pre-calibrated QuAM state files (JSON format)
27
+ - CLI tools for managing and loading state configurations
28
+ - Environment variable management for QuAM state paths
29
+
30
+ To quickly set the `QUAM_STATE_PATH` environment variable to the current calibrated state (after installing and activating the environment):
31
+
32
+ ```bash
33
+ source load-cqc-quam
34
+ ```
35
+
36
+ **Note**: The package version follows the format `YYYY.MM.DD[.X]` where `YYYY.MM.DD` indicates the date of the last calibration, and the optional `.X` is a sub-version for multiple releases on the same day.
37
+
38
+ ## Installation
39
+
40
+ Install the package using `uv` (recommended) or `pip`. Make sure to use the latest version to get the most recent calibration data:
41
+
42
+ ### Using uv (recommended)
43
+
44
+ ```bash
45
+ uv venv
46
+ source .venv/bin/activate
47
+ uv pip install cqc-quam-state==2025.6.4.1
48
+ ```
49
+
50
+ ### Using pip
51
+
52
+ ```bash
53
+ pip install cqc-quam-state==2025.6.4.1
54
+ ```
55
+
56
+ ### Installing the latest version
57
+
58
+ To install the most recent calibration data, check for the latest version:
59
+
60
+ ```bash
61
+ # Find the latest version
62
+ pip index versions cqc-quam-state
63
+
64
+ # Install the latest version (e.g., if there are multiple releases today)
65
+ pip install cqc-quam-state==2025.6.4.3
66
+ ```
67
+
68
+ ## Usage
69
+
70
+ ### Quick Start
71
+
72
+ The simplest way to use this package is to source the provided script, which sets the `QUAM_STATE_PATH` environment variable:
73
+
74
+ ```bash
75
+ source load-cqc-quam
76
+ ```
77
+
78
+ This will set `QUAM_STATE_PATH` to point to the current calibrated state files included in the package.
79
+
80
+ ### CLI Commands
81
+
82
+ The package also provides a `cqc-quam-state` CLI tool for more advanced usage:
83
+
84
+ #### Get Help
85
+
86
+ ```bash
87
+ cqc-quam-state --help
88
+ ```
89
+
90
+ #### Available Commands
91
+
92
+ - **`info`**: Display information about the current state
93
+ - **`load`**: Output the export command for setting `QUAM_STATE_PATH` (used by the `load-cqc-quam` script)
94
+ - **`set`**: Set configuration values (placeholder for future functionality)
95
+
96
+ #### Examples
97
+
98
+ Display current state information:
99
+
100
+ ```bash
101
+ cqc-quam-state info
102
+ ```
103
+
104
+ Get the export command for the QuAM state path:
105
+
106
+ ```bash
107
+ cqc-quam-state load
108
+ ```
109
+
110
+ Set configuration values:
111
+
112
+ ```bash
113
+ cqc-quam-state set
114
+ ```
115
+ (In development, the idea is to set the IP address and port of the OPX and octave and the calibration db dynamically here)
116
+
117
+ ## State Files
118
+
119
+ The package includes pre-calibrated state files in the `quam_state/` directory:
120
+
121
+ - **`state.json`**: Main QuAM state configuration containing octave settings, RF outputs, and calibration parameters
122
+ - **`wiring.json`**: Wiring configuration for the quantum device setup
123
+
124
+ These files are automatically included when you install the package and can be accessed via the `QUAM_STATE_PATH` environment variable.
125
+
126
+ ## Version Information
127
+
128
+ The package uses a date-based versioning system with optional sub-versions:
129
+
130
+ ### Version Format: `YYYY.MM.DD[.X]`
131
+
132
+ - **`YYYY.MM.DD`**: The calibration date ( generated from `date +"%Y.%-m.%-d"`)
133
+ - **`.X`**: Optional sub-version for multiple releases on the same day
134
+
135
+ ### Version Examples
136
+
137
+ - **`2025.6.4`**: First release on June 4, 2025
138
+ - **`2025.6.4.1`**: Second release on June 4, 2025 (updated calibration)
139
+ - **`2025.6.4.2`**: Third release on June 4, 2025
140
+ - **`2025.6.5`**: First release on June 5, 2025
141
+
142
+ ## Troubleshooting
143
+
144
+ ### Environment Variable Not Set
145
+
146
+ If the `QUAM_STATE_PATH` environment variable is not set after sourcing the script:
147
+
148
+ 1. Ensure you're in the correct virtual environment
149
+ 2. Verify the package is installed: `pip show cqc-quam-state`
150
+ 3. Try running the load command directly: `cqc-quam-state load`
151
+
152
+ ### Package Not Found
153
+
154
+ If you get import errors:
155
+
156
+ 1. Check if the package is installed: `pip list | grep cqc-quam-state`
157
+ 2. Ensure you're using the correct Python environment
158
+ 3. Try reinstalling: `pip install --force-reinstall cqc-quam-state`
159
+
160
+
161
+ ## License
162
+
163
+ This project is licensed under the MIT License.
@@ -0,0 +1,12 @@
1
+ cqc_quam_state/__init__.py,sha256=0MjJ6b67H2tQAZMJ17GBsIRNEZHnXmwENIjY3nTNa4c,271
2
+ cqc_quam_state/cli.py,sha256=maXhyYtURun-cPHgnG6GzyVEAIbcD6Nu0a7NpcTe9i8,768
3
+ cqc_quam_state/utils.py,sha256=jA8Mln8O7teERC07waVicuzNM5oxlwTZ6bNZBsKD8s0,1056
4
+ cqc_quam_state-2025.12.29.data/scripts/load-cqc-quam,sha256=FawIyEdTIuHaUl9Uuqhp4tApqtRiBFBld3NgVcduHR4,55
5
+ quam_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ quam_state/state.json,sha256=LLq9g5hyZu3S2EI1TJ7Yg5TRWrPqty_Pj7DgvR9QeaE,72471
7
+ quam_state/wiring.json,sha256=CuS9OeiALkgF30nUJQbA-dGwCbXtkIK5-LX2MxmQXVI,4700
8
+ cqc_quam_state-2025.12.29.dist-info/METADATA,sha256=I6mSh4aDQS0_6CQXuhPMK0kGwzieX8sbFOuaPe9UWAw,4703
9
+ cqc_quam_state-2025.12.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ cqc_quam_state-2025.12.29.dist-info/entry_points.txt,sha256=yDPN6kPOJ_FVj0GG1MrOZrkhHwS0dB0Nibg9_gxEaeI,58
11
+ cqc_quam_state-2025.12.29.dist-info/top_level.txt,sha256=3vvwgdiiqaeIb21EtYfkY064frn0mOkC0X9bRjzg7UU,26
12
+ cqc_quam_state-2025.12.29.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ cqc-quam-state = cqc_quam_state.cli:cli
@@ -0,0 +1,2 @@
1
+ cqc_quam_state
2
+ quam_state
quam_state/__init__.py ADDED
File without changes