Local quantum operators

Build the matrix representation of quadratic operators g_i^dag g_j for each gate, where g_i is an annihilation operator.

class vulqano.quantummodels.localquantumops.TNGateOperators(*args: Any, **kwargs: Any)[source]

Class for the definition of a set of local gate operators g_i^dag g_j.

Arguments

gateslist of str

The list of gates involved in the circuit, included the identity. Idenity has to be the first gate.

folder_operatorsstr, optional

DESCRIPTION. The default is “TNGateOperators”.

class vulqano.quantummodels.localquantumops.TNTimeStepOperators(*args: Any, **kwargs: Any)[source]

Class for the definition of a set of time step configuration transitions of the form g_i^dag g_j.

Arguments

time_step_configurationslist of str

List of possible time-step configurations to be represented as states in a local Hilbert space. Each time step configuration is represented by a string like “g1|…|gn”.

time_step_transformationslist of str

The list of transformations between time steps to be encoded as operators. Each transformation is represented by a string like “g1|…|gn->g’1|…|g’n”.

folder_operatorsstr, optional

Folder where the operators are saved by qtealeaves. The default is “TNTimeStepOperators”.

static expand_identities(time_step_configurations, configuration_in, configuration_out)[source]

Given two terms of a transformation, if these terms contain the “any” gate, expand the terms over all the possible configurations of the time step that are compatible.

Arguments

time_step_configurationslist of strings

List of possible time step configurations represented by strings like “g1|…|gn”.

configuration_instring

Input time step configuration represented by a string like “g1|…|gn”.

configuration_outstring

Transformed time step configuration represented by a string like “g’1|…|g’n”.

Yields

new_configuration_instring

Input time step configuration where each “any” gate has been replaced in a way such that the new configuration is in time_step_configurations.

new_configuration_outstring

Transformed time step configuration where each “any” gate has been replaced in a way such that the new configuration is in time_step_configurations.

vulqano.quantummodels.localquantumops.build_annihil_op(index, local_dim)[source]

Build the matrix representation of the annihilation operator for the gate labeled by the index.

Arguments

indexint

Boson favour label

local_dimint

DImension of the local Hilber space

Returns

tmpnp.array

Matrix representation of the annihiling operator.