@@ -41,10 +41,10 @@ class HoppingPlaquette(Bloq):
4141 $$
4242 \sum_{i,j} [R_{\mathrm{plaq}}]_{i,j} a_{i\sigma}^\dagger a_{j\sigma}
4343 $$
44- where the non-zero sub-bloq of R_{\mathrm{plaq}} is
44+ where the non-zero sub-bloq of $ R_{\mathrm{plaq}}$ is
4545
4646 $$
47- R_{\mathrm{plaq}} =
47+ R_{\mathrm{plaq}} =
4848 \begin{bmatrix}
4949 0 & 1 & 0 & 1 \\
5050 1 & 0 & 1 & 0 \\
@@ -55,7 +55,7 @@ class HoppingPlaquette(Bloq):
5555
5656 Args:
5757 kappa: The scalar prefactor appearing in the definition of the unitary.
58- Usually a combination of the timestep and the hopping parameter $\tau$.
58+ Usually a combination of the timestep and the hopping parameter $\tau$.
5959 eps: The precision of the single qubit rotations.
6060
6161 Registers:
@@ -78,7 +78,7 @@ def build_call_graph(self, ssa: 'SympySymbolAllocator') -> Set['BloqCountT']:
7878 # page 14, discussion after E13
7979 # There are 4 flanking f-gates and a e^{iXX}e^{iYY} rotation, which can
8080 # be rotated to single rotation + cliffords.
81- return {(TwoBitFFFT (0 , 1 ), 4 ), (Rz (self .kappa , eps = self .eps ), 2 )}
81+ return {(TwoBitFFFT (0 , 1 , eps = self . eps ), 4 ), (Rz (self .kappa , eps = self .eps ), 2 )}
8282
8383
8484@frozen
@@ -116,7 +116,7 @@ class HoppingTile(Bloq):
116116 pink : bool = True
117117
118118 def __attrs_post_init__ (self ):
119- if self .length % 2 != 0 :
119+ if isinstance ( self . length , int ) and self .length % 2 != 0 :
120120 raise ValueError ('Only even length lattices are supported' )
121121
122122 def short_name (self ) -> str :
@@ -129,7 +129,9 @@ def signature(self) -> Signature:
129129
130130 def build_call_graph (self , ssa : 'SympySymbolAllocator' ) -> Set ['BloqCountT' ]:
131131 # Page 5, text after Eq. 22. There are L^2 / 4 plaquettes of a given colour and x2 for spin.
132- return {(HoppingPlaquette (kappa = self .tau * self .angle , eps = self .eps ), self .length ** 2 // 2 )}
132+ return {
133+ (HoppingPlaquette (kappa = self .tau * self .angle , eps = self .eps ), self .length ** 2 // 2 )
134+ }
133135
134136
135137@bloq_example
0 commit comments