Skip to content

Commit

Permalink
Add godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
itsubaki committed Jan 13, 2025
1 parent 2b96ec8 commit 73c055b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions quantum/gate/gate.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ func ControlledModExp2(n, a, j, N, c int, t []int) matrix.Matrix {
return g
}

// TensorProduct returns the tensor product of 'u' at specified indices over 'n' qubits.
func TensorProduct(u matrix.Matrix, n int, index []int) matrix.Matrix {
idx := make(map[int]bool)
for _, i := range index {
Expand Down

0 comments on commit 73c055b

Please sign in to comment.