many: many

Description Usage Arguments Value Examples

View source: R/many.R

Description

Takes as input a gate and generates the matrix for that gate being applied to multiple qubits by creating a tensor product of the matrix. If a ket is supplied, the matrix will be applied to the ket

Usage

1
many(gate,n,...)

Arguments

gate

Single qubit gate to apply

n

Number of qubits that the gate will be applied to

...

Either no argument or a ket that the gates will be applied to

Value

The matrix representing the application of many gates or a ket after the gates have been applied

Examples

1
2
 many(H(),4)
 many(X(),2,ket(1,0,0,0))

QuantumOps documentation built on Feb. 3, 2020, 5:07 p.m.

Related to many in QuantumOps...