Continous gates

Collection of dictionaries for an abstract description of continuous (parametric) gates.

Each key of GATES_DICTIONARY identifies the name of a gate. The corresponding value is a dictionary that describes the gate as follows:

Connectivitytuple of ints

A tuple indicating the vector from the control qubit to the target qubit in the lowest dimensional lattice in which the gate can be implemented. For 1 qubit gates is [].

Qasmlambda

Returns a quasm string for the gate. None for fictitious gates.

Colorlambda

Returns an RGB tuple of three floats from 0 to 1 associated to the gate when plotting the circuit state.

is_parametricbool

True for parametric gates.

NOTE : parametric gates with perdiodicity T are represented with parameter in [0, T)

vulqano.gates.continuousgates.gate_ints_to_labels(ints_array)[source]

Transforms the int representation of a subcyrcuit to an strings representation, the translation is based on LABELS_TO_GATES.

Arguments

ints_array: np.array of ints

Ints representation of a subcyrcuit

Returns

strings_arraynp.array of strings

Strings representation of a subcyrcuit

vulqano.gates.continuousgates.gate_labels_to_ints(strings_array)[source]

Transforms the strings representation of a subcyrcuit to an ints representation, the translation is based on GATES_TO_LABELS.

Arguments

strings_arraynp.array of strings

Strings representation of a subcyrcuit

Returns

ints_array: np.array of ints

Ints representation of a subcyrcuit