compareQuantumState: compareQuantumState

Description Usage Arguments Value Examples

View source: R/compareQuantumState.R

Description

Generates a matrix (quantum oracle) which will flip the last qubit in a quantum state if the qubits at indices in vectors a and b are the same

Usage

1
compareQuantumState(nQubits,a,b)

Arguments

nQubits

Number of qubits in a target ket. Should contain at least enough for states a and b and an additional last qubit.

a

Vector of indices of first state to compare in a target ket

b

Vector of indices of second state to compare in a target ket

Value

Matrix of the compareQuantumState oracle

Examples

1
 compareQuantumState(5,0:1,2:3)

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