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 272f982 commit 2b96ec8
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 @@ -134,6 +134,7 @@ func RZ(theta float64) matrix.Matrix {
}

// Controlled returns a controlled-u gate.
// u is a (2x2) unitary matrix and returns a (2**n x 2**n) matrix.
func Controlled(u matrix.Matrix, n int, c []int, t int) matrix.Matrix {
var mask int
for _, bit := range c {
Expand Down

0 comments on commit 2b96ec8

Please sign in to comment.