cutqc2.library.QWalk package

Submodules

cutqc2.library.QWalk.quantum_walk module

class cutqc2.library.QWalk.quantum_walk.QWALK(N, barriers=False, regname=None)[source]

Bases: object

Class to implement the Quantum Walk algorithm as described in Childs et al. (https://arxiv.org/abs/quant-ph/0209131)

A circuit implementing the quantum walk can be generated for a given instance of a problem parameterized by N (i.e. # of vertices in a graph) by calling the gen_circuit() method.

N

number of vertices in the graph we want to perform the quantum walk on

Type:

int

barriers

should barriers be included in the generated circuit

Type:

bool

regname

optional string to name the quantum and classical registers. This allows for the easy concatenation of multiple QuantumCircuits.

Type:

str

qr

Qiskit QuantumRegister holding all of the quantum bits

Type:

QuantumRegister

circ

Qiskit QuantumCircuit that represents the uccsd circuit

Type:

QuantumCircuit

Vc(c)[source]

Apply the Vc gate to the circuit

evolve_T(t)[source]

Simulate the evolution of exp(-iTt)

gen_circuit()[source]

Create a circuit implementing the quantum walk algorithm

Returns:

QuantumCircuit object of size nq with no ClassicalRegister and no measurements

Return type:

QuantumCircuit

gen_coloring()[source]

Generate a coloring for the graph

k = poly(log(N))

Module contents