dwave-preprocessing 0.6.10__tar.gz → 0.6.12__tar.gz
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.
- {dwave-preprocessing-0.6.10/dwave_preprocessing.egg-info → dwave_preprocessing-0.6.12}/PKG-INFO +12 -27
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/README.rst +1 -18
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/__init__.py +1 -1
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/composites/spin_reversal_transform.py +14 -16
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/cyfix_variables.cpp +16 -16
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/include/dwave-preprocessing/implication_network.hpp +7 -2
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/presolve/cypresolve.cpp +9 -9
- dwave_preprocessing-0.6.12/dwave/preprocessing/presolve/cypresolve.pyi +50 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12/dwave_preprocessing.egg-info}/PKG-INFO +12 -27
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave_preprocessing.egg-info/SOURCES.txt +10 -1
- dwave_preprocessing-0.6.12/dwave_preprocessing.egg-info/requires.txt +2 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/pyproject.toml +4 -3
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/setup.cfg +3 -3
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/setup.py +2 -2
- dwave_preprocessing-0.6.12/tests/test_clip.py +104 -0
- dwave_preprocessing-0.6.12/tests/test_composites_common.py +68 -0
- dwave_preprocessing-0.6.12/tests/test_connected_components.py +83 -0
- dwave_preprocessing-0.6.12/tests/test_fix_variables.py +100 -0
- dwave_preprocessing-0.6.12/tests/test_presolve.py +632 -0
- dwave_preprocessing-0.6.12/tests/test_roof_duality.py +56 -0
- dwave_preprocessing-0.6.12/tests/test_scale.py +119 -0
- dwave_preprocessing-0.6.12/tests/test_spin_reversal_transform.py +273 -0
- dwave-preprocessing-0.6.10/dwave_preprocessing.egg-info/requires.txt +0 -2
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/LICENSE +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/MANIFEST.in +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/composites/__init__.py +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/composites/clip.py +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/composites/connected_components.py +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/composites/fix_variables.py +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/composites/scale.py +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/cyfix_variables.pyx +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/include/dwave/exceptions.hpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/include/dwave/flags.hpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/include/dwave/presolve.hpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/include/dwave-preprocessing/fix_variables.hpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/include/dwave-preprocessing/helper_data_structures.hpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/include/dwave-preprocessing/helper_graph_algorithms.hpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/include/dwave-preprocessing/mapping_policy.hpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/include/dwave-preprocessing/posiform_info.hpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/include/dwave-preprocessing/push_relabel.hpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/libcpp.pxd +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/lower_bounds.py +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/presolve/__init__.pxd +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/presolve/__init__.py +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/presolve/cypresolve.pxd +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/presolve/cypresolve.pyx +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/presolve/exceptions.py +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/presolve/pypresolve.py +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/src/exceptions.cpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/src/presolve.cpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/src/presolveimpl.hpp +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave_preprocessing.egg-info/dependency_links.txt +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave_preprocessing.egg-info/not-zip-safe +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave_preprocessing.egg-info/top_level.txt +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/LICENSE +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/async.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/async_logger-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/async_logger.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/cfg/argv.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/cfg/env.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/cfg/helpers-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/cfg/helpers.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/common-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/common.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/backtracer-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/backtracer.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/circular_q.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/console_globals.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/file_helper-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/file_helper.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/fmt_helper.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/log_msg-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/log_msg.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/log_msg_buffer-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/log_msg_buffer.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/mpmc_blocking_q.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/null_mutex.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/os-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/os.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/periodic_worker-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/periodic_worker.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/registry-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/registry.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/synchronous_factory.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/tcp_client-windows.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/tcp_client.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/thread_pool-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/thread_pool.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/udp_client-windows.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/udp_client.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/details/windows_include.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bin_to_hex.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/args.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/chrono.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/color.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/compile.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/core.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/fmt.license.rst +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/format-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/format.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/locale.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/os.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/ostream.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/printf.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/ranges.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/bundled/xchar.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/chrono.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/compile.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/fmt.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/ostr.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/ranges.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fmt/xchar.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/formatter.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/fwd.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/logger-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/logger.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/pattern_formatter-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/pattern_formatter.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/android_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/ansicolor_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/base_sink-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/base_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/basic_file_sink-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/basic_file_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/daily_file_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/dist_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/dup_filter_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/hourly_file_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/mongo_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/msvc_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/null_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/ostream_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/qt_sinks.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/ringbuffer_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/rotating_file_sink-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/rotating_file_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/sink-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/stdout_color_sinks-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/stdout_color_sinks.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/stdout_sinks-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/stdout_sinks.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/syslog_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/systemd_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/tcp_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/udp_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/win_eventlog_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/wincolor_sink-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/sinks/wincolor_sink.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/spdlog-inl.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/spdlog.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/stopwatch.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/tweakme.h +0 -0
- {dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/extern/spdlog/include/spdlog/version.h +0 -0
{dwave-preprocessing-0.6.10/dwave_preprocessing.egg-info → dwave_preprocessing-0.6.12}/PKG-INFO
RENAMED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: dwave-preprocessing
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.12
|
|
4
4
|
Summary: An API for preprocessing tools
|
|
5
5
|
Home-page: https://github.com/dwavesystems/dwave-preprocessing
|
|
6
|
+
Download-URL: https://github.com/dwavesystems/dwave-preprocessing/releases
|
|
6
7
|
Author: D-Wave Systems Inc.
|
|
7
8
|
Author-email: tools@dwavesys.com
|
|
8
9
|
License: Apache 2.0
|
|
9
|
-
Download-URL: https://github.com/dwavesystems/dwave-preprocessing/releases
|
|
10
|
-
Platform: UNKNOWN
|
|
11
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
11
|
Classifier: Operating System :: Microsoft :: Windows
|
|
13
12
|
Classifier: Operating System :: POSIX
|
|
@@ -15,16 +14,21 @@ Classifier: Operating System :: Unix
|
|
|
15
14
|
Classifier: Operating System :: MacOS
|
|
16
15
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
17
16
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
-
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
|
+
Requires-Python: >=3.11
|
|
24
23
|
Description-Content-Type: text/x-rst
|
|
25
24
|
License-File: LICENSE
|
|
25
|
+
Requires-Dist: numpy<3.0.0,>=1.23.2
|
|
26
|
+
Requires-Dist: dimod<0.13.0,>=0.12.21
|
|
27
|
+
Dynamic: download-url
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
Dynamic: requires-dist
|
|
26
30
|
|
|
27
|
-
.. image:: https://circleci.com/gh/dwavesystems/dwave-preprocessing.svg?style=
|
|
31
|
+
.. image:: https://circleci.com/gh/dwavesystems/dwave-preprocessing.svg?style=shield
|
|
28
32
|
:target: https://circleci.com/gh/dwavesystems/dwave-preprocessing
|
|
29
33
|
:alt: Linux/Mac/Windows build status
|
|
30
34
|
|
|
@@ -85,22 +89,3 @@ Contributing
|
|
|
85
89
|
|
|
86
90
|
Ocean's `contributing guide <https://docs.dwavequantum.com/en/latest/ocean/contribute.html>`_
|
|
87
91
|
has guidelines for contributing to Ocean packages.
|
|
88
|
-
|
|
89
|
-
Release Notes
|
|
90
|
-
-------------
|
|
91
|
-
|
|
92
|
-
**dwave-preprocessing** makes use of `reno <https://docs.openstack.org/reno/>`_
|
|
93
|
-
to manage its release notes.
|
|
94
|
-
|
|
95
|
-
When making a contribution to **dwave-preprocessing** that will affect users,
|
|
96
|
-
create a new release note file by running
|
|
97
|
-
|
|
98
|
-
.. code-block:: bash
|
|
99
|
-
|
|
100
|
-
reno new your-short-descriptor-here
|
|
101
|
-
|
|
102
|
-
You can then edit the file created under ``releasenotes/notes/``.
|
|
103
|
-
Remove any sections not relevant to your changes.
|
|
104
|
-
Commit the file along with your changes.
|
|
105
|
-
|
|
106
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.. image:: https://circleci.com/gh/dwavesystems/dwave-preprocessing.svg?style=
|
|
1
|
+
.. image:: https://circleci.com/gh/dwavesystems/dwave-preprocessing.svg?style=shield
|
|
2
2
|
:target: https://circleci.com/gh/dwavesystems/dwave-preprocessing
|
|
3
3
|
:alt: Linux/Mac/Windows build status
|
|
4
4
|
|
|
@@ -59,20 +59,3 @@ Contributing
|
|
|
59
59
|
|
|
60
60
|
Ocean's `contributing guide <https://docs.dwavequantum.com/en/latest/ocean/contribute.html>`_
|
|
61
61
|
has guidelines for contributing to Ocean packages.
|
|
62
|
-
|
|
63
|
-
Release Notes
|
|
64
|
-
-------------
|
|
65
|
-
|
|
66
|
-
**dwave-preprocessing** makes use of `reno <https://docs.openstack.org/reno/>`_
|
|
67
|
-
to manage its release notes.
|
|
68
|
-
|
|
69
|
-
When making a contribution to **dwave-preprocessing** that will affect users,
|
|
70
|
-
create a new release note file by running
|
|
71
|
-
|
|
72
|
-
.. code-block:: bash
|
|
73
|
-
|
|
74
|
-
reno new your-short-descriptor-here
|
|
75
|
-
|
|
76
|
-
You can then edit the file created under ``releasenotes/notes/``.
|
|
77
|
-
Remove any sections not relevant to your changes.
|
|
78
|
-
Commit the file along with your changes.
|
|
@@ -25,25 +25,23 @@ __all__ = ['SpinReversalTransformComposite']
|
|
|
25
25
|
# versionadded (0.6.8) to the __init__ file for context manager
|
|
26
26
|
|
|
27
27
|
class SpinReversalTransformComposite(ComposedSampler):
|
|
28
|
-
"""Composite for applying spin reversal transform preprocessing.
|
|
29
|
-
|
|
30
|
-
A spin-reversal transform can improve sample statistics when the
|
|
31
|
-
|
|
32
|
-
The technique works as follows: given an :math:`n`-variable Ising
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
:math:`J_{ij}\mapsto J_{ij}g_ig_j`. Solutions :math:`s` of the
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
[#km]_
|
|
28
|
+
r"""Composite for applying spin reversal transform preprocessing.
|
|
29
|
+
|
|
30
|
+
A spin-reversal transform can improve sample statistics when the sampler is
|
|
31
|
+
a physical object with asymmetries such as a QPU.
|
|
32
|
+
The technique works as follows: given an :math:`n`-variable Ising problem,
|
|
33
|
+
the composite selects a random :math:`g\in\{\pm1\}^n` and transforms the
|
|
34
|
+
problem via :math:`h_i\mapsto h_ig_i` and
|
|
35
|
+
:math:`J_{ij}\mapsto J_{ij}g_ig_j`. Solutions :math:`s` of the original
|
|
36
|
+
problem and :math:`s^\prime` of the transformed problem are related by
|
|
37
|
+
:math:`s^\prime_i=s_ig_i` and have identical energies.\ [#km]_
|
|
39
38
|
|
|
40
39
|
.. note::
|
|
41
40
|
If you are configuring an anneal schedule, be mindful that this
|
|
42
|
-
composite does not recognize the ``initial_state`` parameter
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
states.
|
|
41
|
+
composite does not recognize the ``initial_state`` parameter used by
|
|
42
|
+
dimod's :class:`~dwave.system.samplers.DWaveSampler` for reverse
|
|
43
|
+
annealing (composites do not generally process all keywords of child
|
|
44
|
+
samplers) and does not flip any of the configured initial states.
|
|
47
45
|
|
|
48
46
|
Args:
|
|
49
47
|
sampler: A `dimod` sampler object.
|
{dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave/preprocessing/cyfix_variables.cpp
RENAMED
|
@@ -1532,13 +1532,13 @@ static const char *__pyx_filename;
|
|
|
1532
1532
|
static const char *__pyx_f[] = {
|
|
1533
1533
|
"dwave/preprocessing/cyfix_variables.pyx",
|
|
1534
1534
|
"<stringsource>",
|
|
1535
|
-
"env/lib/python3.
|
|
1536
|
-
"env/lib/python3.
|
|
1537
|
-
"env/lib/python3.
|
|
1538
|
-
"env/lib/python3.
|
|
1539
|
-
"env/lib/python3.
|
|
1540
|
-
"env/lib/python3.
|
|
1541
|
-
"env/lib/python3.
|
|
1535
|
+
"env/lib/python3.12/site-packages/dimod/cyvariables.pxd",
|
|
1536
|
+
"env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_template.pxd.pxi",
|
|
1537
|
+
"env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_float32.pxd",
|
|
1538
|
+
"env/lib/python3.12/site-packages/dimod/binary/cybqm/cybqm_template.pxd.pxi",
|
|
1539
|
+
"env/lib/python3.12/site-packages/dimod/binary/cybqm/cybqm_float32.pxd",
|
|
1540
|
+
"env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_float64.pxd",
|
|
1541
|
+
"env/lib/python3.12/site-packages/dimod/binary/cybqm/cybqm_float64.pxd",
|
|
1542
1542
|
};
|
|
1543
1543
|
/* #### Code section: utility_code_proto_before_types ### */
|
|
1544
1544
|
/* ForceInitThreads.proto */
|
|
@@ -1797,7 +1797,7 @@ struct __pyx_opt_args_5dimod_11cyvariables_11cyVariables_index {
|
|
|
1797
1797
|
};
|
|
1798
1798
|
struct __pyx_opt_args_5dimod_6binary_5cybqm_13cybqm_float32_14cyBQM_template__index;
|
|
1799
1799
|
|
|
1800
|
-
/* "env/lib/python3.
|
|
1800
|
+
/* "env/lib/python3.12/site-packages/dimod/binary/cybqm/cybqm_template.pxd.pxi":28
|
|
1801
1801
|
* # likes to use
|
|
1802
1802
|
*
|
|
1803
1803
|
* cdef Py_ssize_t _index(self, object, bint permissive=*) except -1 # <<<<<<<<<<<<<<
|
|
@@ -1830,7 +1830,7 @@ struct __pyx_obj_5dimod_11cyvariables_cyVariables {
|
|
|
1830
1830
|
};
|
|
1831
1831
|
|
|
1832
1832
|
|
|
1833
|
-
/* "env/lib/python3.
|
|
1833
|
+
/* "env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_template.pxd.pxi":22
|
|
1834
1834
|
*
|
|
1835
1835
|
*
|
|
1836
1836
|
* cdef class cyQMBase_template: # <<<<<<<<<<<<<<
|
|
@@ -1858,7 +1858,7 @@ struct __pyx_obj_5dimod_8cyqmbase_16cyqmbase_float32_cyQMBase_float32 {
|
|
|
1858
1858
|
};
|
|
1859
1859
|
|
|
1860
1860
|
|
|
1861
|
-
/* "env/lib/python3.
|
|
1861
|
+
/* "env/lib/python3.12/site-packages/dimod/binary/cybqm/cybqm_template.pxd.pxi":21
|
|
1862
1862
|
*
|
|
1863
1863
|
*
|
|
1864
1864
|
* cdef class cyBQM_template(cyQMBase): # <<<<<<<<<<<<<<
|
|
@@ -1882,7 +1882,7 @@ struct __pyx_obj_5dimod_6binary_5cybqm_13cybqm_float32_cyBQM_float32 {
|
|
|
1882
1882
|
};
|
|
1883
1883
|
|
|
1884
1884
|
|
|
1885
|
-
/* "env/lib/python3.
|
|
1885
|
+
/* "env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_template.pxd.pxi":22
|
|
1886
1886
|
*
|
|
1887
1887
|
*
|
|
1888
1888
|
* cdef class cyQMBase_template: # <<<<<<<<<<<<<<
|
|
@@ -1910,7 +1910,7 @@ struct __pyx_obj_5dimod_8cyqmbase_16cyqmbase_float64_cyQMBase_float64 {
|
|
|
1910
1910
|
};
|
|
1911
1911
|
|
|
1912
1912
|
|
|
1913
|
-
/* "env/lib/python3.
|
|
1913
|
+
/* "env/lib/python3.12/site-packages/dimod/binary/cybqm/cybqm_template.pxd.pxi":21
|
|
1914
1914
|
*
|
|
1915
1915
|
*
|
|
1916
1916
|
* cdef class cyBQM_template(cyQMBase): # <<<<<<<<<<<<<<
|
|
@@ -2064,7 +2064,7 @@ struct __pyx_vtabstruct_5dimod_11cyvariables_cyVariables {
|
|
|
2064
2064
|
static struct __pyx_vtabstruct_5dimod_11cyvariables_cyVariables *__pyx_vtabptr_5dimod_11cyvariables_cyVariables;
|
|
2065
2065
|
|
|
2066
2066
|
|
|
2067
|
-
/* "env/lib/python3.
|
|
2067
|
+
/* "env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_template.pxd.pxi":22
|
|
2068
2068
|
*
|
|
2069
2069
|
*
|
|
2070
2070
|
* cdef class cyQMBase_template: # <<<<<<<<<<<<<<
|
|
@@ -2093,7 +2093,7 @@ struct __pyx_vtabstruct_5dimod_8cyqmbase_16cyqmbase_float32_cyQMBase_float32 {
|
|
|
2093
2093
|
static struct __pyx_vtabstruct_5dimod_8cyqmbase_16cyqmbase_float32_cyQMBase_float32 *__pyx_vtabptr_5dimod_8cyqmbase_16cyqmbase_float32_cyQMBase_float32;
|
|
2094
2094
|
|
|
2095
2095
|
|
|
2096
|
-
/* "env/lib/python3.
|
|
2096
|
+
/* "env/lib/python3.12/site-packages/dimod/binary/cybqm/cybqm_template.pxd.pxi":21
|
|
2097
2097
|
*
|
|
2098
2098
|
*
|
|
2099
2099
|
* cdef class cyBQM_template(cyQMBase): # <<<<<<<<<<<<<<
|
|
@@ -2136,7 +2136,7 @@ struct __pyx_vtabstruct_5dimod_6binary_5cybqm_13cybqm_float32_cyBQM_float32 {
|
|
|
2136
2136
|
static struct __pyx_vtabstruct_5dimod_6binary_5cybqm_13cybqm_float32_cyBQM_float32 *__pyx_vtabptr_5dimod_6binary_5cybqm_13cybqm_float32_cyBQM_float32;
|
|
2137
2137
|
|
|
2138
2138
|
|
|
2139
|
-
/* "env/lib/python3.
|
|
2139
|
+
/* "env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_template.pxd.pxi":22
|
|
2140
2140
|
*
|
|
2141
2141
|
*
|
|
2142
2142
|
* cdef class cyQMBase_template: # <<<<<<<<<<<<<<
|
|
@@ -2165,7 +2165,7 @@ struct __pyx_vtabstruct_5dimod_8cyqmbase_16cyqmbase_float64_cyQMBase_float64 {
|
|
|
2165
2165
|
static struct __pyx_vtabstruct_5dimod_8cyqmbase_16cyqmbase_float64_cyQMBase_float64 *__pyx_vtabptr_5dimod_8cyqmbase_16cyqmbase_float64_cyQMBase_float64;
|
|
2166
2166
|
|
|
2167
2167
|
|
|
2168
|
-
/* "env/lib/python3.
|
|
2168
|
+
/* "env/lib/python3.12/site-packages/dimod/binary/cybqm/cybqm_template.pxd.pxi":21
|
|
2169
2169
|
*
|
|
2170
2170
|
*
|
|
2171
2171
|
* cdef class cyBQM_template(cyQMBase): # <<<<<<<<<<<<<<
|
|
@@ -505,7 +505,7 @@ void ImplicationNetwork<capacity_t>::fixStronglyConnectedComponentVariables(
|
|
|
505
505
|
int from_component = *eit;
|
|
506
506
|
if (out_degrees[from_component] > 0) {
|
|
507
507
|
out_degrees[from_component]--;
|
|
508
|
-
if (enqueue) {
|
|
508
|
+
if (enqueue && out_degrees[from_component] == 0) {
|
|
509
509
|
component_queue.push(from_component);
|
|
510
510
|
}
|
|
511
511
|
}
|
|
@@ -517,7 +517,7 @@ void ImplicationNetwork<capacity_t>::fixStronglyConnectedComponentVariables(
|
|
|
517
517
|
int from_component = *eit;
|
|
518
518
|
if (out_degrees[from_component] > 0) {
|
|
519
519
|
out_degrees[from_component]--;
|
|
520
|
-
if (enqueue) {
|
|
520
|
+
if (enqueue && out_degrees[from_component] == 0) {
|
|
521
521
|
component_queue.push(from_component);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
@@ -613,6 +613,11 @@ capacity_t ImplicationNetwork<capacity_t>::fixStrongAndWeakVariables(
|
|
|
613
613
|
|
|
614
614
|
while (!component_queue.empty()) {
|
|
615
615
|
int component = component_queue.pop();
|
|
616
|
+
// A component and its complement can both be queued. Fixing one marks
|
|
617
|
+
// both as fixed (out-degree -1), so the second one popped is skipped.
|
|
618
|
+
if (out_degrees[component] < 0) {
|
|
619
|
+
continue;
|
|
620
|
+
}
|
|
616
621
|
fixStronglyConnectedComponentVariables(
|
|
617
622
|
component, scc_info, adjacency_list_components_transposed, out_degrees,
|
|
618
623
|
fixed_variables, component_queue, true);
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
],
|
|
12
12
|
"include_dirs": [
|
|
13
13
|
"dwave/preprocessing/presolve",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"dimod/include/",
|
|
15
|
+
"dwave/preprocessing/include/"
|
|
16
16
|
],
|
|
17
17
|
"language": "c++",
|
|
18
18
|
"name": "dwave.preprocessing.presolve.cypresolve",
|
|
@@ -1543,11 +1543,11 @@ static const char *__pyx_filename;
|
|
|
1543
1543
|
static const char *__pyx_f[] = {
|
|
1544
1544
|
"dwave/preprocessing/presolve/cypresolve.pyx",
|
|
1545
1545
|
"<stringsource>",
|
|
1546
|
-
"env/lib/python3.
|
|
1547
|
-
"env/lib/python3.
|
|
1548
|
-
"env/lib/python3.
|
|
1549
|
-
"env/lib/python3.
|
|
1550
|
-
"env/lib/python3.
|
|
1546
|
+
"env/lib/python3.12/site-packages/dimod/cyvariables.pxd",
|
|
1547
|
+
"env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_template.pxd.pxi",
|
|
1548
|
+
"env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_float64.pxd",
|
|
1549
|
+
"env/lib/python3.12/site-packages/dimod/constrained/cyexpression.pxd",
|
|
1550
|
+
"env/lib/python3.12/site-packages/dimod/constrained/cyconstrained.pxd",
|
|
1551
1551
|
};
|
|
1552
1552
|
/* #### Code section: utility_code_proto_before_types ### */
|
|
1553
1553
|
/* ForceInitThreads.proto */
|
|
@@ -1813,7 +1813,7 @@ struct __pyx_obj_5dimod_11cyvariables_cyVariables {
|
|
|
1813
1813
|
};
|
|
1814
1814
|
|
|
1815
1815
|
|
|
1816
|
-
/* "env/lib/python3.
|
|
1816
|
+
/* "env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_template.pxd.pxi":22
|
|
1817
1817
|
*
|
|
1818
1818
|
*
|
|
1819
1819
|
* cdef class cyQMBase_template: # <<<<<<<<<<<<<<
|
|
@@ -2021,7 +2021,7 @@ struct __pyx_vtabstruct_5dimod_11cyvariables_cyVariables {
|
|
|
2021
2021
|
static struct __pyx_vtabstruct_5dimod_11cyvariables_cyVariables *__pyx_vtabptr_5dimod_11cyvariables_cyVariables;
|
|
2022
2022
|
|
|
2023
2023
|
|
|
2024
|
-
/* "env/lib/python3.
|
|
2024
|
+
/* "env/lib/python3.12/site-packages/dimod/cyqmbase/cyqmbase_template.pxd.pxi":22
|
|
2025
2025
|
*
|
|
2026
2026
|
*
|
|
2027
2027
|
* cdef class cyQMBase_template: # <<<<<<<<<<<<<<
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Copyright 2022 D-Wave Systems Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import enum
|
|
16
|
+
|
|
17
|
+
import dimod
|
|
18
|
+
import numpy as np
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Feasibility(enum.Enum):
|
|
22
|
+
Infeasible = 0
|
|
23
|
+
Feasible = 1
|
|
24
|
+
Unknown = 2
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class TechniqueFlags(enum.IntFlag):
|
|
28
|
+
None_ = 0
|
|
29
|
+
RemoveRedundantConstraints = 1 << 0
|
|
30
|
+
RemoveSmallBiases = 1 << 1
|
|
31
|
+
DomainPropagation = 1 << 2
|
|
32
|
+
All = 0xffffffffffffffff
|
|
33
|
+
Default = All
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class cyPresolver:
|
|
37
|
+
variables: dimod.variables.Variables
|
|
38
|
+
|
|
39
|
+
def __init__(self, cqm: dimod.ConstrainedQuadraticModel, move: bool = ...): ...
|
|
40
|
+
def add_techniques(self, techniques: TechniqueFlags) -> TechniqueFlags: ...
|
|
41
|
+
def apply(self) -> bool: ...
|
|
42
|
+
def clear_model(self) -> None: ...
|
|
43
|
+
def copy_model(self) -> dimod.ConstrainedQuadraticModel: ...
|
|
44
|
+
def detach_model(self) -> dimod.ConstrainedQuadraticModel: ...
|
|
45
|
+
def feasibility(self) -> Feasibility: ...
|
|
46
|
+
def normalize(self) -> bool: ...
|
|
47
|
+
def presolve(self, *, time_limit_s: float = float("inf")) -> bool: ...
|
|
48
|
+
def restore_samples(self, samples_like: dimod.typing.SamplesLike) -> np.ndarray: ...
|
|
49
|
+
def set_techniques(self, techniques: TechniqueFlags) -> TechniqueFlags: ...
|
|
50
|
+
def techniques(self) -> TechniqueFlags: ...
|
{dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12/dwave_preprocessing.egg-info}/PKG-INFO
RENAMED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: dwave-preprocessing
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.12
|
|
4
4
|
Summary: An API for preprocessing tools
|
|
5
5
|
Home-page: https://github.com/dwavesystems/dwave-preprocessing
|
|
6
|
+
Download-URL: https://github.com/dwavesystems/dwave-preprocessing/releases
|
|
6
7
|
Author: D-Wave Systems Inc.
|
|
7
8
|
Author-email: tools@dwavesys.com
|
|
8
9
|
License: Apache 2.0
|
|
9
|
-
Download-URL: https://github.com/dwavesystems/dwave-preprocessing/releases
|
|
10
|
-
Platform: UNKNOWN
|
|
11
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
11
|
Classifier: Operating System :: Microsoft :: Windows
|
|
13
12
|
Classifier: Operating System :: POSIX
|
|
@@ -15,16 +14,21 @@ Classifier: Operating System :: Unix
|
|
|
15
14
|
Classifier: Operating System :: MacOS
|
|
16
15
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
17
16
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
-
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
|
+
Requires-Python: >=3.11
|
|
24
23
|
Description-Content-Type: text/x-rst
|
|
25
24
|
License-File: LICENSE
|
|
25
|
+
Requires-Dist: numpy<3.0.0,>=1.23.2
|
|
26
|
+
Requires-Dist: dimod<0.13.0,>=0.12.21
|
|
27
|
+
Dynamic: download-url
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
Dynamic: requires-dist
|
|
26
30
|
|
|
27
|
-
.. image:: https://circleci.com/gh/dwavesystems/dwave-preprocessing.svg?style=
|
|
31
|
+
.. image:: https://circleci.com/gh/dwavesystems/dwave-preprocessing.svg?style=shield
|
|
28
32
|
:target: https://circleci.com/gh/dwavesystems/dwave-preprocessing
|
|
29
33
|
:alt: Linux/Mac/Windows build status
|
|
30
34
|
|
|
@@ -85,22 +89,3 @@ Contributing
|
|
|
85
89
|
|
|
86
90
|
Ocean's `contributing guide <https://docs.dwavequantum.com/en/latest/ocean/contribute.html>`_
|
|
87
91
|
has guidelines for contributing to Ocean packages.
|
|
88
|
-
|
|
89
|
-
Release Notes
|
|
90
|
-
-------------
|
|
91
|
-
|
|
92
|
-
**dwave-preprocessing** makes use of `reno <https://docs.openstack.org/reno/>`_
|
|
93
|
-
to manage its release notes.
|
|
94
|
-
|
|
95
|
-
When making a contribution to **dwave-preprocessing** that will affect users,
|
|
96
|
-
create a new release note file by running
|
|
97
|
-
|
|
98
|
-
.. code-block:: bash
|
|
99
|
-
|
|
100
|
-
reno new your-short-descriptor-here
|
|
101
|
-
|
|
102
|
-
You can then edit the file created under ``releasenotes/notes/``.
|
|
103
|
-
Remove any sections not relevant to your changes.
|
|
104
|
-
Commit the file along with your changes.
|
|
105
|
-
|
|
106
|
-
|
{dwave-preprocessing-0.6.10 → dwave_preprocessing-0.6.12}/dwave_preprocessing.egg-info/SOURCES.txt
RENAMED
|
@@ -29,6 +29,7 @@ dwave/preprocessing/presolve/__init__.pxd
|
|
|
29
29
|
dwave/preprocessing/presolve/__init__.py
|
|
30
30
|
dwave/preprocessing/presolve/cypresolve.cpp
|
|
31
31
|
dwave/preprocessing/presolve/cypresolve.pxd
|
|
32
|
+
dwave/preprocessing/presolve/cypresolve.pyi
|
|
32
33
|
dwave/preprocessing/presolve/cypresolve.pyx
|
|
33
34
|
dwave/preprocessing/presolve/exceptions.py
|
|
34
35
|
dwave/preprocessing/presolve/pypresolve.py
|
|
@@ -141,4 +142,12 @@ extern/spdlog/include/spdlog/sinks/tcp_sink.h
|
|
|
141
142
|
extern/spdlog/include/spdlog/sinks/udp_sink.h
|
|
142
143
|
extern/spdlog/include/spdlog/sinks/win_eventlog_sink.h
|
|
143
144
|
extern/spdlog/include/spdlog/sinks/wincolor_sink-inl.h
|
|
144
|
-
extern/spdlog/include/spdlog/sinks/wincolor_sink.h
|
|
145
|
+
extern/spdlog/include/spdlog/sinks/wincolor_sink.h
|
|
146
|
+
tests/test_clip.py
|
|
147
|
+
tests/test_composites_common.py
|
|
148
|
+
tests/test_connected_components.py
|
|
149
|
+
tests/test_fix_variables.py
|
|
150
|
+
tests/test_presolve.py
|
|
151
|
+
tests/test_roof_duality.py
|
|
152
|
+
tests/test_scale.py
|
|
153
|
+
tests/test_spin_reversal_transform.py
|
|
@@ -3,7 +3,8 @@ requires = [
|
|
|
3
3
|
"setuptools>=46.4.0",
|
|
4
4
|
"wheel>=0.30.0",
|
|
5
5
|
"Cython~=3.0",
|
|
6
|
-
"dimod==0.12.
|
|
6
|
+
"dimod==0.12.21; python_version<'3.15'", # oldest we support
|
|
7
|
+
"dimod==0.12.23; python_version>='3.15'", # first that supports Python 3.15
|
|
7
8
|
]
|
|
8
9
|
build-backend = "setuptools.build_meta"
|
|
9
10
|
|
|
@@ -15,8 +16,8 @@ test-command = "python -m unittest discover {project}/tests/"
|
|
|
15
16
|
|
|
16
17
|
[tool.cibuildwheel.linux]
|
|
17
18
|
archs = "x86_64 aarch64"
|
|
18
|
-
manylinux-x86_64-image = "
|
|
19
|
-
manylinux-aarch64-image = "
|
|
19
|
+
manylinux-x86_64-image = "manylinux_2_28"
|
|
20
|
+
manylinux-aarch64-image = "manylinux_2_28"
|
|
20
21
|
|
|
21
22
|
[tool.cibuildwheel.macos]
|
|
22
23
|
# We follow NumPy and don't build universal wheels, see https://github.com/numpy/numpy/pull/20787
|
|
@@ -7,11 +7,11 @@ classifiers =
|
|
|
7
7
|
Operating System :: MacOS
|
|
8
8
|
Programming Language :: Python :: Implementation :: CPython
|
|
9
9
|
Programming Language :: Python :: 3 :: Only
|
|
10
|
-
Programming Language :: Python :: 3.9
|
|
11
|
-
Programming Language :: Python :: 3.10
|
|
12
10
|
Programming Language :: Python :: 3.11
|
|
13
11
|
Programming Language :: Python :: 3.12
|
|
14
12
|
Programming Language :: Python :: 3.13
|
|
13
|
+
Programming Language :: Python :: 3.14
|
|
14
|
+
Programming Language :: Python :: 3.15
|
|
15
15
|
license = Apache 2.0
|
|
16
16
|
long_description = file: README.rst
|
|
17
17
|
long_description_content_type = text/x-rst
|
|
@@ -25,7 +25,7 @@ description = An API for preprocessing tools
|
|
|
25
25
|
[options]
|
|
26
26
|
include_package_data = True
|
|
27
27
|
packages = find_namespace:
|
|
28
|
-
python_requires = >=3.
|
|
28
|
+
python_requires = >=3.11
|
|
29
29
|
zip_safe = False
|
|
30
30
|
|
|
31
31
|
[options.packages.find]
|
|
@@ -65,7 +65,7 @@ setup(
|
|
|
65
65
|
'extern/spdlog/include/',
|
|
66
66
|
],
|
|
67
67
|
install_requires=[
|
|
68
|
-
'numpy>=1.
|
|
69
|
-
'dimod>=0.12.
|
|
68
|
+
'numpy>=1.23.2,<3.0.0', # this is the oldest supported NumPy on Python 3.11
|
|
69
|
+
'dimod>=0.12.21,<0.13.0'
|
|
70
70
|
],
|
|
71
71
|
)
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Copyright 2021 D-Wave Systems Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import unittest
|
|
16
|
+
|
|
17
|
+
import dimod
|
|
18
|
+
import dimod.testing as dtest
|
|
19
|
+
from dimod import BinaryQuadraticModel, ExactSolver, NullSampler
|
|
20
|
+
|
|
21
|
+
from dwave.preprocessing.composites import ClipComposite
|
|
22
|
+
|
|
23
|
+
@dtest.load_sampler_bqm_tests(ClipComposite(ExactSolver()))
|
|
24
|
+
@dtest.load_sampler_bqm_tests(ClipComposite(NullSampler()))
|
|
25
|
+
class TestClipCompositeClass(unittest.TestCase):
|
|
26
|
+
def test_instantiation_smoketest(self):
|
|
27
|
+
sampler = ClipComposite(NullSampler())
|
|
28
|
+
dtest.assert_sampler_api(sampler)
|
|
29
|
+
|
|
30
|
+
def test_no_bounds(self):
|
|
31
|
+
bqm = BinaryQuadraticModel({0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0},
|
|
32
|
+
{(0, 1): -2.0, (0, 2): -5.0, (0, 3): -2.0,
|
|
33
|
+
(0, 4): -2.0, (1, 2): -2.0, (1, 3): -2.0, (1, 4): 4.0,
|
|
34
|
+
(2, 3): -3.0, (2, 4): -5.0, (3, 4): -4.0}, 0, dimod.SPIN)
|
|
35
|
+
sampler = ClipComposite(ExactSolver())
|
|
36
|
+
solver = ExactSolver()
|
|
37
|
+
response = sampler.sample(bqm)
|
|
38
|
+
response_exact = solver.sample(bqm)
|
|
39
|
+
self.assertEqual(response.first.sample, response_exact.first.sample)
|
|
40
|
+
self.assertAlmostEqual(response.first.energy, response_exact.first.energy)
|
|
41
|
+
|
|
42
|
+
def test_lb_only(self):
|
|
43
|
+
bqm = BinaryQuadraticModel({0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0},
|
|
44
|
+
{(0, 1): -2.0, (0, 2): -5.0, (0, 3): -2.0,
|
|
45
|
+
(0, 4): -2.0, (1, 2): -2.0, (1, 3): -2.0, (1, 4): 4.0,
|
|
46
|
+
(2, 3): -3.0, (2, 4): -5.0, (3, 4): -4.0}, 0, dimod.SPIN)
|
|
47
|
+
sampler = ClipComposite(ExactSolver())
|
|
48
|
+
solver = ExactSolver()
|
|
49
|
+
response = sampler.sample(bqm, lower_bound=-1)
|
|
50
|
+
response_exact = solver.sample(bqm)
|
|
51
|
+
self.assertEqual(response.first.sample, response_exact.first.sample)
|
|
52
|
+
self.assertAlmostEqual(response.first.energy, response_exact.first.energy)
|
|
53
|
+
|
|
54
|
+
def test_ub_only(self):
|
|
55
|
+
bqm = BinaryQuadraticModel({0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0},
|
|
56
|
+
{(0, 1): -2.0, (0, 2): -5.0, (0, 3): -2.0,
|
|
57
|
+
(0, 4): -2.0, (1, 2): -2.0, (1, 3): -2.0, (1, 4): 4.0,
|
|
58
|
+
(2, 3): -3.0, (2, 4): -5.0, (3, 4): -4.0}, 0, dimod.SPIN)
|
|
59
|
+
sampler = ClipComposite(ExactSolver())
|
|
60
|
+
solver = ExactSolver()
|
|
61
|
+
response = sampler.sample(bqm, upper_bound=1)
|
|
62
|
+
response_exact = solver.sample(bqm)
|
|
63
|
+
self.assertEqual(response.first.sample, response_exact.first.sample)
|
|
64
|
+
self.assertAlmostEqual(response.first.energy, response_exact.first.energy)
|
|
65
|
+
|
|
66
|
+
def test_lb_and_ub(self):
|
|
67
|
+
bqm = BinaryQuadraticModel({0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0},
|
|
68
|
+
{(0, 1): -2.0, (0, 2): -5.0, (0, 3): -2.0,
|
|
69
|
+
(0, 4): -2.0, (1, 2): -2.0, (1, 3): -2.0, (1, 4): 4.0,
|
|
70
|
+
(2, 3): -3.0, (2, 4): -5.0, (3, 4): -4.0}, 0, dimod.SPIN)
|
|
71
|
+
sampler = ClipComposite(ExactSolver())
|
|
72
|
+
solver = ExactSolver()
|
|
73
|
+
response = sampler.sample(bqm, lower_bound=-1, upper_bound=1)
|
|
74
|
+
response_exact = solver.sample(bqm)
|
|
75
|
+
self.assertEqual(response.first.sample, response_exact.first.sample)
|
|
76
|
+
self.assertAlmostEqual(response.first.energy, response_exact.first.energy)
|
|
77
|
+
|
|
78
|
+
def test_with_labels(self):
|
|
79
|
+
bqm = BinaryQuadraticModel({'a': 0.0, 'b': 0.0, 'c': 0.0, 'd': 0.0, 'e': 0.0},
|
|
80
|
+
{('a', 'b'): -2.0, ('a', 'c'): -5.0, ('a', 'd'): -2.0,
|
|
81
|
+
('a', 'e'): -2.0, ('b', 'c'): -2.0, ('b', 'd'): -2.0, ('b', 'e'): 4.0,
|
|
82
|
+
('c', 'd'): -3.0, ('c', 'e'): -5.0, ('d', 'e'): -4.0}, 0, dimod.SPIN)
|
|
83
|
+
sampler = ClipComposite(ExactSolver())
|
|
84
|
+
solver = ExactSolver()
|
|
85
|
+
response = sampler.sample(bqm, lower_bound=-1, upper_bound=1)
|
|
86
|
+
response_exact = solver.sample(bqm)
|
|
87
|
+
self.assertEqual(response.first.sample, response_exact.first.sample)
|
|
88
|
+
self.assertAlmostEqual(response.first.energy, response_exact.first.energy)
|
|
89
|
+
|
|
90
|
+
def test_empty_bqm(self):
|
|
91
|
+
bqm = BinaryQuadraticModel({}, {}, 0.0, dimod.SPIN)
|
|
92
|
+
sampler = ClipComposite(ExactSolver())
|
|
93
|
+
sampler.sample(bqm, lower_bound=-1, upper_bound=1)
|
|
94
|
+
|
|
95
|
+
def test_info_propagation(self):
|
|
96
|
+
bqm = BinaryQuadraticModel.from_ising({}, {})
|
|
97
|
+
|
|
98
|
+
class MySampler:
|
|
99
|
+
@staticmethod
|
|
100
|
+
def sample(bqm):
|
|
101
|
+
return dimod.SampleSet.from_samples_bqm([], bqm, info=dict(a=1))
|
|
102
|
+
|
|
103
|
+
sampleset = ClipComposite(MySampler).sample(bqm)
|
|
104
|
+
self.assertEqual(sampleset.info, {'a': 1})
|