@@ -74,6 +74,10 @@ while the second version throws an error if the lattices do not match.
7474function checklattice (args... )
7575 return checklattice (Bool, args... ) || throw (ArgumentError (" Lattice mismatch." ))
7676end
77+ checklattice (:: Type{Bool} , arg) = true
78+ function checklattice (:: Type{Bool} , arg1, arg2, args... )
79+ return checklattice (Bool, arg1, arg2) && checklattice (Bool, arg2, args... )
80+ end
7781function checklattice (:: Type{Bool} , H1:: LocalOperator , H2:: LocalOperator )
7882 return H1. lattice == H2. lattice
7983end
8387function checklattice (:: Type{Bool} , H:: LocalOperator , peps:: InfinitePEPS )
8488 return checklattice (Bool, peps, H)
8589end
90+ function checklattice (:: Type{Bool} , pepo:: InfinitePEPO , O:: LocalOperator )
91+ return size (pepo, 3 ) == 1 && reshape (physicalspace (pepo), size (pepo, 1 ), size (pepo, 2 )) == physicalspace (O)
92+ end
93+ function checklattice (:: Type{Bool} , O:: LocalOperator , pepo:: InfinitePEPO )
94+ return checklattice (Bool, pepo, O)
95+ end
8696@non_differentiable checklattice (args... )
8797
8898function Base. repeat (O:: LocalOperator , m:: Int , n:: Int )
0 commit comments