quantum-cq 0.1.0__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.
- quantum_cq/__init__.py +166 -0
- quantum_cq/_algorithms/__init__.py +0 -0
- quantum_cq/_algorithms/standard.py +607 -0
- quantum_cq/_circuits/__init__.py +0 -0
- quantum_cq/_circuits/adapters.py +141 -0
- quantum_cq/_circuits/compact.py +650 -0
- quantum_cq/_circuits/oracles.py +214 -0
- quantum_cq/_circuits/primitives.py +244 -0
- quantum_cq/_core/__init__.py +0 -0
- quantum_cq/_core/data.py +12 -0
- quantum_cq/_core/environment.py +122 -0
- quantum_cq/_core/facade.py +658 -0
- quantum_cq/_core/handlers.py +275 -0
- quantum_cq/_core/interfaces.py +291 -0
- quantum_cq/_core/logging_config.py +41 -0
- quantum_cq/_core/metrics.py +134 -0
- quantum_cq/_core/results.py +111 -0
- quantum_cq/_core/selectors.py +133 -0
- quantum_cq/_core/settings.py +191 -0
- quantum_cq/_encodings/__init__.py +0 -0
- quantum_cq/_encodings/state.py +530 -0
- quantum_cq/_navigation/__init__.py +0 -0
- quantum_cq/_navigation/memory.py +559 -0
- quantum_cq/_navigation/walks.py +113 -0
- quantum_cq/_runtime/__init__.py +0 -0
- quantum_cq/_runtime/config.py +33 -0
- quantum_cq/_runtime/experiment.py +599 -0
- quantum_cq/_runtime/pipeline.py +822 -0
- quantum_cq/_runtime/runtime.py +511 -0
- quantum_cq/_tools/__init__.py +0 -0
- quantum_cq/_tools/cq_embedded.py +911 -0
- quantum_cq/adapters.py +9 -0
- quantum_cq/algorithms.py +9 -0
- quantum_cq/compact.py +9 -0
- quantum_cq/config.py +9 -0
- quantum_cq/core.py +9 -0
- quantum_cq/cq_embedded.py +9 -0
- quantum_cq/data.py +9 -0
- quantum_cq/encodings.py +9 -0
- quantum_cq/environment.py +9 -0
- quantum_cq/experiment.py +10 -0
- quantum_cq/handlers.py +9 -0
- quantum_cq/interfaces.py +9 -0
- quantum_cq/logging_config.py +9 -0
- quantum_cq/metrics.py +9 -0
- quantum_cq/navigation.py +2 -0
- quantum_cq/oracles.py +9 -0
- quantum_cq/pipeline.py +9 -0
- quantum_cq/primitives.py +9 -0
- quantum_cq/results.py +9 -0
- quantum_cq/runtime.py +9 -0
- quantum_cq/selectors.py +9 -0
- quantum_cq/settings.py +9 -0
- quantum_cq/walks.py +9 -0
- quantum_cq-0.1.0.dist-info/METADATA +168 -0
- quantum_cq-0.1.0.dist-info/RECORD +59 -0
- quantum_cq-0.1.0.dist-info/WHEEL +5 -0
- quantum_cq-0.1.0.dist-info/licenses/LICENSE +21 -0
- quantum_cq-0.1.0.dist-info/top_level.txt +1 -0
quantum_cq/__init__.py
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"""quantum_cq package."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from quantum_cq._core.facade import CQ
|
|
6
|
+
from quantum_cq._core.data import QuantumData
|
|
7
|
+
from quantum_cq._core.interfaces import (
|
|
8
|
+
AlgorithmBuilderProtocol,
|
|
9
|
+
AlgorithmHandler,
|
|
10
|
+
AlgorithmProtocol,
|
|
11
|
+
ArithmeticOracleProtocol,
|
|
12
|
+
BackendAdapter,
|
|
13
|
+
BackendAdapterProtocol,
|
|
14
|
+
BlockEncodingProtocol,
|
|
15
|
+
CircuitBuilderProtocol,
|
|
16
|
+
CircuitExporterProtocol,
|
|
17
|
+
CircuitFactoryProtocol,
|
|
18
|
+
CircuitLikeProtocol,
|
|
19
|
+
CompilerAdapterProtocol,
|
|
20
|
+
ControlledUnitaryProtocol,
|
|
21
|
+
DiffuserProtocol,
|
|
22
|
+
EncodingHandler,
|
|
23
|
+
EncodingProtocol,
|
|
24
|
+
EncodingSelectorProtocol,
|
|
25
|
+
FourierTransformProtocol,
|
|
26
|
+
GraphNavigationProtocol,
|
|
27
|
+
HamiltonianEncodingProtocol,
|
|
28
|
+
LinearSystemProblemProtocol,
|
|
29
|
+
NavigationEncodingProtocol,
|
|
30
|
+
MetricsCollectorProtocol,
|
|
31
|
+
OperatorProtocol,
|
|
32
|
+
OperatorEncodingProtocol,
|
|
33
|
+
OracleProtocol,
|
|
34
|
+
OracleEncodingProtocol,
|
|
35
|
+
PhaseOracleProtocol,
|
|
36
|
+
PipelineBuilderProtocol,
|
|
37
|
+
PowerableUnitaryProtocol,
|
|
38
|
+
PrimitiveProtocol,
|
|
39
|
+
PredicateOracleProtocol,
|
|
40
|
+
RegistryProtocol,
|
|
41
|
+
ResultHandler,
|
|
42
|
+
StateEncodingProtocol,
|
|
43
|
+
StatePreparationProtocol,
|
|
44
|
+
UnitaryProtocol,
|
|
45
|
+
AddressedEncodingProtocol,
|
|
46
|
+
)
|
|
47
|
+
from quantum_cq._core.logging_config import configure_logging
|
|
48
|
+
from quantum_cq._navigation.memory import (
|
|
49
|
+
AddressedMemory,
|
|
50
|
+
AddressedMemoryEncoding,
|
|
51
|
+
GraphData,
|
|
52
|
+
GraphNavigationEncoding,
|
|
53
|
+
)
|
|
54
|
+
from quantum_cq._core.results import (
|
|
55
|
+
AlgorithmCircuit,
|
|
56
|
+
AlgorithmSpec,
|
|
57
|
+
CompilerResult,
|
|
58
|
+
EncodedCircuit,
|
|
59
|
+
NavigationCircuit,
|
|
60
|
+
OperatorCircuit,
|
|
61
|
+
OracleCircuit,
|
|
62
|
+
QuantumResult,
|
|
63
|
+
)
|
|
64
|
+
from quantum_cq._core.settings import (
|
|
65
|
+
PipelineSettings,
|
|
66
|
+
RuntimeSettings,
|
|
67
|
+
get_pipeline_settings,
|
|
68
|
+
get_runtime_settings,
|
|
69
|
+
)
|
|
70
|
+
from quantum_cq._runtime.runtime import IBMRuntimeConfig
|
|
71
|
+
|
|
72
|
+
if TYPE_CHECKING:
|
|
73
|
+
from quantum_cq._runtime.experiment import (
|
|
74
|
+
ExperimentPlan,
|
|
75
|
+
ExperimentResult,
|
|
76
|
+
ExperimentSpec,
|
|
77
|
+
PipelineResult,
|
|
78
|
+
)
|
|
79
|
+
from quantum_cq._runtime.pipeline import BenchmarkingPipeline
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
_LAZY_EXPORTS = {
|
|
83
|
+
"ExperimentPlan": ("quantum_cq._runtime.experiment", "ExperimentPlan"),
|
|
84
|
+
"ExperimentSpec": ("quantum_cq._runtime.experiment", "ExperimentSpec"),
|
|
85
|
+
"ExperimentResult": ("quantum_cq._runtime.experiment", "ExperimentResult"),
|
|
86
|
+
"PipelineResult": ("quantum_cq._runtime.experiment", "PipelineResult"),
|
|
87
|
+
"BenchmarkingPipeline": ("quantum_cq._runtime.pipeline", "BenchmarkingPipeline"),
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def __getattr__(name):
|
|
92
|
+
if name in _LAZY_EXPORTS:
|
|
93
|
+
from importlib import import_module
|
|
94
|
+
|
|
95
|
+
module_name, attr_name = _LAZY_EXPORTS[name]
|
|
96
|
+
value = getattr(import_module(module_name), attr_name)
|
|
97
|
+
globals()[name] = value
|
|
98
|
+
return value
|
|
99
|
+
|
|
100
|
+
raise AttributeError(f"module 'quantum_cq' has no attribute {name!r}")
|
|
101
|
+
|
|
102
|
+
__all__ = [
|
|
103
|
+
"CQ",
|
|
104
|
+
"QuantumData",
|
|
105
|
+
"QuantumResult",
|
|
106
|
+
"EncodedCircuit",
|
|
107
|
+
"AlgorithmCircuit",
|
|
108
|
+
"AlgorithmSpec",
|
|
109
|
+
"CompilerResult",
|
|
110
|
+
"OperatorCircuit",
|
|
111
|
+
"OracleCircuit",
|
|
112
|
+
"NavigationCircuit",
|
|
113
|
+
"AddressedMemory",
|
|
114
|
+
"AddressedMemoryEncoding",
|
|
115
|
+
"GraphData",
|
|
116
|
+
"GraphNavigationEncoding",
|
|
117
|
+
"ExperimentPlan",
|
|
118
|
+
"ExperimentSpec",
|
|
119
|
+
"ExperimentResult",
|
|
120
|
+
"PipelineResult",
|
|
121
|
+
"BenchmarkingPipeline",
|
|
122
|
+
"IBMRuntimeConfig",
|
|
123
|
+
"EncodingHandler",
|
|
124
|
+
"EncodingProtocol",
|
|
125
|
+
"StateEncodingProtocol",
|
|
126
|
+
"OracleEncodingProtocol",
|
|
127
|
+
"OperatorEncodingProtocol",
|
|
128
|
+
"NavigationEncodingProtocol",
|
|
129
|
+
"AddressedEncodingProtocol",
|
|
130
|
+
"GraphNavigationProtocol",
|
|
131
|
+
"AlgorithmBuilderProtocol",
|
|
132
|
+
"AlgorithmHandler",
|
|
133
|
+
"AlgorithmProtocol",
|
|
134
|
+
"ArithmeticOracleProtocol",
|
|
135
|
+
"BackendAdapter",
|
|
136
|
+
"BackendAdapterProtocol",
|
|
137
|
+
"BlockEncodingProtocol",
|
|
138
|
+
"CircuitBuilderProtocol",
|
|
139
|
+
"CircuitExporterProtocol",
|
|
140
|
+
"CircuitFactoryProtocol",
|
|
141
|
+
"CircuitLikeProtocol",
|
|
142
|
+
"CompilerAdapterProtocol",
|
|
143
|
+
"ControlledUnitaryProtocol",
|
|
144
|
+
"DiffuserProtocol",
|
|
145
|
+
"EncodingSelectorProtocol",
|
|
146
|
+
"FourierTransformProtocol",
|
|
147
|
+
"HamiltonianEncodingProtocol",
|
|
148
|
+
"LinearSystemProblemProtocol",
|
|
149
|
+
"RegistryProtocol",
|
|
150
|
+
"PipelineBuilderProtocol",
|
|
151
|
+
"MetricsCollectorProtocol",
|
|
152
|
+
"OperatorProtocol",
|
|
153
|
+
"PrimitiveProtocol",
|
|
154
|
+
"OracleProtocol",
|
|
155
|
+
"PhaseOracleProtocol",
|
|
156
|
+
"PowerableUnitaryProtocol",
|
|
157
|
+
"PredicateOracleProtocol",
|
|
158
|
+
"ResultHandler",
|
|
159
|
+
"StatePreparationProtocol",
|
|
160
|
+
"UnitaryProtocol",
|
|
161
|
+
"configure_logging",
|
|
162
|
+
"PipelineSettings",
|
|
163
|
+
"RuntimeSettings",
|
|
164
|
+
"get_pipeline_settings",
|
|
165
|
+
"get_runtime_settings",
|
|
166
|
+
]
|
|
File without changes
|