QWnet 2.0.0__py3-none-any.whl → 2.0.2__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.
QWnet/__init__.py CHANGED
@@ -12,11 +12,9 @@ def run_simulation(model: str, **kwargs):
12
12
  'QPageRank' (Quantum PageRank)
13
13
  'HadamardQW' (Hadamard Edge Importance)
14
14
  'SzegedyQW' (Szegedy Walk)
15
- 'community' (Community Detection)
16
15
  'directSumQW' (Direct Sum Quantum Walk)
17
16
  **kwargs: Parameters specific to the chosen model.
18
17
  """
19
- # 处理模型名称(不区分大小写)
20
18
  model_upper = model
21
19
 
22
20
  # Lattice Walks
@@ -46,11 +44,6 @@ def run_simulation(model: str, **kwargs):
46
44
  initial_type=kwargs.get('initial_type', 'uniform'),
47
45
  initial_node=kwargs.get('initial_node'))
48
46
 
49
- elif model_upper == 'community':
50
- return run_community_detection(G=kwargs.get('G'),
51
- initial_state=kwargs.get('initial_state', 'uniform'),
52
- coin_type=kwargs.get('coin_type', 'fourier'))
53
-
54
47
  elif model_upper == 'QPageRank':
55
48
  return run_quantum_pagerank(file_path=kwargs.get('file_path'),
56
49
  steps=kwargs.get('steps', 20),
@@ -62,12 +55,11 @@ def run_simulation(model: str, **kwargs):
62
55
  top_p=kwargs.get('top_p', 0.05))
63
56
 
64
57
  elif model_upper == 'directSumQW':
65
- # 暂时使用 run_chawla_ranking 作为 directSumQW 的实现
66
- # 后续可以根据需要添加专门的实现
67
- return run_chawla_ranking(file_path=kwargs.get('file_path'),
68
- steps=kwargs.get('steps', 100),
69
- coin_type=kwargs.get('coin_type', 'fourier'))
58
+ # directSumQW
59
+ return run_community_detection(G=kwargs.get('G'),
60
+ initial_state=kwargs.get('initial_state', 'uniform'),
61
+ coin_type=kwargs.get('coin_type', 'fourier'))
70
62
 
71
63
  else:
72
- available_models = ['1d', '2d', '3d', 'ChawlaQW', 'QPageRank', 'HadamardQW', 'SzegedyQW', 'community', 'directSumQW']
64
+ available_models = ['1d', '2d', '3d', 'ChawlaQW', 'QPageRank', 'HadamardQW', 'SzegedyQW', 'directSumQW']
73
65
  raise ValueError(f"Unknown model type: {model}. Available: {', '.join(available_models)}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QWnet
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: A unified Quantum Walk simulation package
5
5
  Project-URL: Homepage, https://example.com/QWnet
6
6
  Requires-Python: >=3.8
@@ -30,9 +30,9 @@ qw.run_simulation('2d', steps=50)
30
30
  qw.run_simulation('3d', steps=20)
31
31
 
32
32
  # Graph Walks
33
- qw.run_simulation('ranking', file_path='graph.edgelist')
34
- qw.run_simulation('pagerank')
35
- qw.run_simulation('hadamard')
36
- qw.run_simulation('szegedy')
37
- qw.run_simulation('community')
33
+ qw.run_simulation('ChawlaQW', file_path='graph.edgelist', steps=100)
34
+ qw.run_simulation('QPageRank', steps=20, alpha=0.85)
35
+ qw.run_simulation('HadamardQW', steps=100, top_p=0.05)
36
+ qw.run_simulation('SzegedyQW', steps=10)
37
+ qw.run_simulation('directSumQW', initial_state='uniform', coin_type='fourier')
38
38
  ```
@@ -0,0 +1,7 @@
1
+ QWnet/__init__.py,sha256=_PySaCFOYlMtgoVbOwD1KAKMTZOCZtJwZBcfC8SIRMY,3285
2
+ QWnet/graphs.py,sha256=N-tP9lUEVwiM4iRJJazA0oL4Udl4_BxXu4KRk8SMhSo,13167
3
+ QWnet/lattice.py,sha256=wYjIyh1rhYB_ONgxmWfMAWtncOc0sJ13W2jMjEBYQ7Y,8852
4
+ qwnet-2.0.2.dist-info/METADATA,sha256=lFTHOxVSttPh5vIqh-PO_EByBosiUYnzH83CsGGprlc,952
5
+ qwnet-2.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
6
+ qwnet-2.0.2.dist-info/top_level.txt,sha256=h1QjXkEfsiVSIVldoV7OoylAVPE6lfyiFDfYB89yVwM,6
7
+ qwnet-2.0.2.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- QWnet/__init__.py,sha256=el2pSuqEri_X-e6eMn57uxiQ7XUsXTYXK2oQiN94pK0,3777
2
- QWnet/graphs.py,sha256=N-tP9lUEVwiM4iRJJazA0oL4Udl4_BxXu4KRk8SMhSo,13167
3
- QWnet/lattice.py,sha256=wYjIyh1rhYB_ONgxmWfMAWtncOc0sJ13W2jMjEBYQ7Y,8852
4
- qwnet-2.0.0.dist-info/METADATA,sha256=gHVzVUkmMQ8brwIJlungRp8KG41hKCkEWf7lYsAzuSw,832
5
- qwnet-2.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
6
- qwnet-2.0.0.dist-info/top_level.txt,sha256=h1QjXkEfsiVSIVldoV7OoylAVPE6lfyiFDfYB89yVwM,6
7
- qwnet-2.0.0.dist-info/RECORD,,
File without changes