GroverOracle: GroverOracle

Description Usage Arguments Value Examples

View source: R/GroverOracle.R

Description

If integer is input, returns the matrix of GroverOracle operation on the integer number of qubits. If ket given as input, applies a GroverOracle operation to the input ket and returns the resulting ket

Usage

1
GroverOracle(w,input)

Arguments

w

Integer specifying the state to search for, between 0 and 2^n-1 where n is the number of qubits

input

Either integer specifying size of operation (in number of qubits it is applied to) or input ket to apply GroverOracle to

Value

Either the matrix of the GroverOracle gate of the specified size or ket after a GroverOracle operation is applied

Examples

1
2
 GroverOracle(0,ket(1,1,1,1,1,1,1,1))
 GroverOracle(0,3)

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