testGate {QuantumOps} | R Documentation |
testGate
Description
Takes a given quantum gate and tests it with computational basis states as input. Can test a subset of possible inputs if specified, otherwise it tests all possible inputs. Useful for testing user defined gates.
Usage
testGate(g,inputs=0:(dim(g)[1]-1) )
Arguments
g |
Matrix that represents a quantum gate (operation) |
inputs |
Vector of indices of computational basis states to test. Default is that all computational basis states will be tested |
Value
None
Examples
testGate(CX())
testGate(CX(),inputs=c(0,1))
[Package QuantumOps version 3.0.1 Index]