bloqade-circuit 0.7.9__py3-none-any.whl → 0.7.10__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]):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bloqade-circuit
3
- Version: 0.7.9
3
+ Version: 0.7.10
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
@@ -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.10.dist-info/METADATA,sha256=U60f2ctIawKmXlnu1z7MAnuEZliCMychHmnsCpst9FU,3725
246
+ bloqade_circuit-0.7.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
247
+ bloqade_circuit-0.7.10.dist-info/licenses/LICENSE,sha256=S5GIJwR6QCixPA9wryYb44ZEek0Nz4rt_zLUqP05UbU,13160
248
+ bloqade_circuit-0.7.10.dist-info/RECORD,,