bloqade-circuit 0.7.9__py3-none-any.whl → 0.7.11__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 bloqade-circuit might be problematic. Click here for more details.

@@ -56,21 +56,29 @@ class GeminiNoiseModelABC(cirq.NoiseModel, MoveNoiseModelABC):
56
56
  """The correlated CZ error rates as a dictionary"""
57
57
 
58
58
  def __post_init__(self):
59
- if (
59
+ is_ambiguous = (
60
+ self.cz_paired_correlated_rates is not None
61
+ and self.cz_paired_error_probabilities is not None
62
+ )
63
+ if is_ambiguous:
64
+ raise ValueError(
65
+ "Received both `cz_paired_correlated_rates` and `cz_paired_error_probabilities` as input. This is ambiguous, please only set one."
66
+ )
67
+
68
+ use_default = (
60
69
  self.cz_paired_correlated_rates is None
61
70
  and self.cz_paired_error_probabilities is None
62
- ):
71
+ )
72
+ if use_default:
63
73
  # NOTE: no input, set to default value; weird setattr for frozen dataclass
64
74
  object.__setattr__(
65
75
  self,
66
76
  "cz_paired_error_probabilities",
67
77
  _default_cz_paired_correlated_rates(),
68
78
  )
69
- elif (
70
- self.cz_paired_correlated_rates is not None
71
- and self.cz_paired_correlated_rates is None
72
- ):
79
+ return
73
80
 
81
+ if self.cz_paired_correlated_rates is not None:
74
82
  if self.cz_paired_correlated_rates.shape != (4, 4):
75
83
  raise ValueError(
76
84
  "Expected a 4x4 array of probabilities for cz_paired_correlated_rates"
@@ -82,13 +90,11 @@ class GeminiNoiseModelABC(cirq.NoiseModel, MoveNoiseModelABC):
82
90
  "cz_paired_error_probabilities",
83
91
  correlated_noise_array_to_dict(self.cz_paired_correlated_rates),
84
92
  )
85
- elif (
86
- self.cz_paired_correlated_rates is not None
87
- and self.cz_paired_correlated_rates is not None
88
- ):
89
- raise ValueError(
90
- "Received both `cz_paired_correlated_rates` and `cz_paired_correlated_rates` as input. This is ambiguous, please only set one."
91
- )
93
+ return
94
+
95
+ assert (
96
+ self.cz_paired_error_probabilities is not None
97
+ ), "This error should not happen! Please report this issue."
92
98
 
93
99
  @staticmethod
94
100
  def validate_moments(moments: Iterable[cirq.Moment]):
bloqade/squin/groups.py CHANGED
@@ -1,14 +1,14 @@
1
1
  from kirin import ir, passes
2
2
  from kirin.prelude import structural_no_opt
3
3
  from kirin.rewrite import Walk, Chain
4
- from kirin.dialects import ilist
4
+ from kirin.dialects import debug, ilist
5
5
 
6
6
  from . import op, wire, noise, qubit
7
7
  from .op.rewrite import PyMultToSquinMult
8
8
  from .rewrite.desugar import ApplyDesugarRule, MeasureDesugarRule
9
9
 
10
10
 
11
- @ir.dialect_group(structural_no_opt.union([op, qubit, noise]))
11
+ @ir.dialect_group(structural_no_opt.union([op, qubit, noise, debug]))
12
12
  def kernel(self):
13
13
  fold_pass = passes.Fold(self)
14
14
  typeinfer_pass = passes.TypeInfer(self)
bloqade/stim/groups.py CHANGED
@@ -1,12 +1,12 @@
1
1
  from kirin import ir
2
2
  from kirin.passes import Fold, TypeInfer
3
- from kirin.dialects import func, lowering
3
+ from kirin.dialects import func, debug, lowering
4
4
 
5
5
  from .dialects import gate, noise, collapse, auxiliary
6
6
 
7
7
 
8
8
  @ir.dialect_group(
9
- [noise, gate, auxiliary, collapse, func, lowering.func, lowering.call]
9
+ [noise, gate, auxiliary, collapse, func, lowering.func, lowering.call, debug]
10
10
  )
11
11
  def main(self):
12
12
  typeinfer_pass = TypeInfer(self)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bloqade-circuit
3
- Version: 0.7.9
3
+ Version: 0.7.11
4
4
  Summary: The software development toolkit for neutral atom arrays.
5
5
  Author-email: Roger-luo <rluo@quera.com>, kaihsin <khwu@quera.com>, weinbe58 <pweinberg@quera.com>, johnzl-777 <jlong@quera.com>
6
6
  License-File: LICENSE
@@ -19,7 +19,7 @@ bloqade/cirq_utils/parallelize.py,sha256=u9AP6l7YwBatFfIvrcCjbcYMiavk7MU6HKSKPkq
19
19
  bloqade/cirq_utils/noise/__init__.py,sha256=hUBi53U0wE4u3AqGh5cNdgdCspt3O-Vw-SR68cfBZYc,421
20
20
  bloqade/cirq_utils/noise/_two_zone_utils.py,sha256=iq4nwdJQITFlGB61wfrV7vyPA2194p-i_nv36powZ90,17883
21
21
  bloqade/cirq_utils/noise/conflict_graph.py,sha256=ZUwPWTknrb6SgtZUVPeICn3YA-nUeWQJDuKKX5jL9tE,7179
22
- bloqade/cirq_utils/noise/model.py,sha256=tKzK_d1u81miQu1LMeum7wKRXeuyP1M182SEJ8lNTbo,18605
22
+ bloqade/cirq_utils/noise/model.py,sha256=fhznG0P_SUtl7LBNIANuNi5MGY9ks241UW7m0rg2iNs,18782
23
23
  bloqade/cirq_utils/noise/transform.py,sha256=pauFnOKbk2QjxeyXEV_x2zyRGypr5wiQ6ySirU7C2zg,2278
24
24
  bloqade/native/__init__.py,sha256=MtQZmq7KqNGkjxsO_22DpY-13X23Ovw8JKs7lfuv55w,443
25
25
  bloqade/native/_prelude.py,sha256=znle4mSTLZtRMCmmiZ-bCPfHqNdgVxsKuY64Fgj2kko,1258
@@ -137,7 +137,7 @@ bloqade/rewrite/rules/__init__.py,sha256=3e1Z5T3INqNtP6OU0Vivu_SdMOR_2KDixeA0Yjo
137
137
  bloqade/rewrite/rules/split_ifs.py,sha256=KhwvUx-oBrBO2F1j-J5kwNbdnrnEZcZtJflzyQm-UOI,2613
138
138
  bloqade/squin/__init__.py,sha256=j9jgH39eQHedbVR9poKx2YHxOihclAI0GpIA05NejHM,675
139
139
  bloqade/squin/_typeinfer.py,sha256=bilWfC6whTMwewFCqDgB6vDHZsgXPr3azNOYqqnvtB4,780
140
- bloqade/squin/groups.py,sha256=RXGJnNZUSXF_f5ljjhZ9At8UhaijayoxFoWvxEsUOWc,1310
140
+ bloqade/squin/groups.py,sha256=ceO6RfWB1B0FlGZYtJACkKUXvTFPNZR_A4aikKDwHAU,1324
141
141
  bloqade/squin/lowering.py,sha256=bfrPjx6t2mnd1qoBshF_RW-FXMWg3TOUA6XKUeONyig,2560
142
142
  bloqade/squin/parallel.py,sha256=X6Ps9kQIgnFMlZO14y2ntdxvivqbIP28PAWF8KmxByM,5172
143
143
  bloqade/squin/qubit.py,sha256=eX24PLk0CILaooQZDD6gv5MwSAXSncazv86M-cyT3cc,5649
@@ -182,7 +182,7 @@ bloqade/squin/stdlib/channel.py,sha256=ZZrnZlJ1UnjiGMaN2C3MFqbeCH94lb92gfmlb72pB
182
182
  bloqade/squin/stdlib/gate.py,sha256=5bwImrUOOH4Yl7VBVXsQmCtJMqtXdp6u6spMLiMWE5Q,4180
183
183
  bloqade/stim/__init__.py,sha256=QPZnQRWiiC66pwZ4yRiX2m5doqgPQorQLqc3b7fav2A,935
184
184
  bloqade/stim/_wrappers.py,sha256=Bx_cv-B5ifuFK9sJkURAFg3AzfDzS3oMObEEheX-Ieg,4045
185
- bloqade/stim/groups.py,sha256=Fx8G698BGO7hR8OwpPXGUEYdW4uCCPwbMp_3fJAqa8M,585
185
+ bloqade/stim/groups.py,sha256=lywG10uTr3saNsvKGa8Sqfb-xZIqiLwc3y1_QAvaaNs,599
186
186
  bloqade/stim/dialects/__init__.py,sha256=A1Sq0jg8wi6MjRkzmuSBnHmO3EraD0pDFWz-dO6c6v8,89
187
187
  bloqade/stim/dialects/auxiliary/__init__.py,sha256=6f57a8k2-QBtqaB0GN8FxxTBlG82oZQbVIOxxq975g4,692
188
188
  bloqade/stim/dialects/auxiliary/_dialect.py,sha256=GExjMgzF9HV7IA25Kbl1K2i5g7aJAhdifIdrIDrvBVY,55
@@ -242,7 +242,7 @@ bloqade/visual/animation/runtime/atoms.py,sha256=EmjxhujLiHHPS_HtH_B-7TiqeHgvW5u
242
242
  bloqade/visual/animation/runtime/ppoly.py,sha256=JB9IP53N1w6adBJEue6J5Nmj818Id9JvrlgrmiQTU1I,1385
243
243
  bloqade/visual/animation/runtime/qpustate.py,sha256=rlmxQeJSvaohXrTpXQL5y-NJcpvfW33xPaYM1slv7cc,4270
244
244
  bloqade/visual/animation/runtime/utils.py,sha256=ju9IzOWX-vKwfpqUjlUKu3Ssr_UFPFFq-tzH_Nqyo_c,1212
245
- bloqade_circuit-0.7.9.dist-info/METADATA,sha256=VhYLXjeRULFvq59sRDSx_0bLWHDbVbK1sF4CTNTmSOY,3724
246
- bloqade_circuit-0.7.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
247
- bloqade_circuit-0.7.9.dist-info/licenses/LICENSE,sha256=S5GIJwR6QCixPA9wryYb44ZEek0Nz4rt_zLUqP05UbU,13160
248
- bloqade_circuit-0.7.9.dist-info/RECORD,,
245
+ bloqade_circuit-0.7.11.dist-info/METADATA,sha256=JCGZ-nrxZmVVGNnXU-Duw1f1YbArfNPgeJyDOMYzLCI,3725
246
+ bloqade_circuit-0.7.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
247
+ bloqade_circuit-0.7.11.dist-info/licenses/LICENSE,sha256=S5GIJwR6QCixPA9wryYb44ZEek0Nz4rt_zLUqP05UbU,13160
248
+ bloqade_circuit-0.7.11.dist-info/RECORD,,