Skip to content

Commit d23766a

Browse files
fix black
1 parent 20baa38 commit d23766a

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

tensorcircuit/interfaces/torch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def vjp_fun(x: Tensor, v: Tensor) -> Tuple[Tensor, Tensor]:
6565
fun = backend.jit(fun)
6666
vjp_fun = backend.jit(vjp_fun)
6767

68-
class Fun(torch.autograd.Function):
68+
class Fun(torch.autograd.Function): # type: ignore
6969
@staticmethod
7070
def forward(ctx: Any, *x: Any) -> Any: # type: ignore
7171
# ctx.xdtype = [xi.dtype for xi in x]
@@ -111,7 +111,7 @@ def backward(ctx: Any, *grad_y: Any) -> Any:
111111
return r
112112

113113
# currently, memory transparent dlpack in these ML framework has broken support on complex dtypes
114-
return Fun.apply
114+
return Fun.apply # type: ignore
115115

116116

117117
pytorch_interface = torch_interface

tensorcircuit/quantum.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,6 @@ def reduced_density_matrix(
17051705
if normalize:
17061706
rho /= backend.trace(rho)
17071707

1708-
17091708
else:
17101709
w = state / backend.norm(state)
17111710
freedomexp = backend.sizen(state)

tensorcircuit/torchnn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Tensor = Any
1414

1515

16-
class QuantumNet(torch.nn.Module):
16+
class QuantumNet(torch.nn.Module): # type: ignore
1717
def __init__(
1818
self,
1919
f: Callable[..., Any],

0 commit comments

Comments
 (0)