SynthesizeCircuit: SynthesizeCircuit

Description Usage Arguments Value Examples

View source: R/SynthesizeCircuit.R

Description

Converts the list form of a quantum circuit into a matrix representation. If the input is a single list, this function multiplies each entry. If each entry is a 4x4 unitary matrix, this function will multiply all, starting with the first, and generate a single 4x4 unitary matrix. If the input is a list of lists, this function will perform the same operation but interleave each list. The lists can be of different lengths.

Usage

1

Arguments

l

list containing the quantum operators of each cycle. The quantum operators should be unitary matrices which act on a number of qubits. Each entry in l should be of the same dimension. Optionally, l can be a of such lists, in which case each list will be interleaved.

Value

A matrix representing the result of applying each operation listed in l

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
 SynthesizeCircuit( list( tensor(X(),X()) , tensor(Y(),X()),
		 tensor(I(),X()) , tensor(Z(),Z())  ))

## End(Not run)
## Not run: 
 SynthesizeCircuit( list(  list(  tensor(X(),X()) , tensor(I(),X()) ),
		 list( tensor(Y(),X()) , tensor(Z(),Z()) ) ) )

## End(Not run)

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