many {QuantumOps}R Documentation

many

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

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

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

[Package QuantumOps version 3.0.1 Index]