testGate: testGate

Description Usage Arguments Value Examples

View source: R/testGate.R

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

1
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

1
2
 testGate(CX())
 testGate(CX(),inputs=c(0,1))

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