compareQuantumState {QuantumOps}R Documentation

compareQuantumState

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

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

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

[Package QuantumOps version 3.0.1 Index]