Quantum model

Here we define functions to map the compilation problem into a quantum many-body system to simulate with qtealeaves.

We map the circuit in a (1+1) dimensional qudits lattice. The first coordinate labels the time-step, the other coordinates label the qubit where a gate is executed, the state of each qudit represents the corrisponding executed gate.

vulqano.quantummodels.quantummodel.get_quantum_compilation_model(input_circuit, machine, qcd_instructions, shape)[source]

Maps the compilation problem into a quantum many-body system to simulate with qtealeaves.

Arguments

input_circuitinstance of AbstractCircuitState

Classical circuit state, the initial state of the dynamics.

machinedictionary
hamiltonian_operatorlist of (np.array of strings, float, mask)

Abstract description of the Hamiltonian. The energy is obtained by counting how many times each subcircuit hamiltonian_operator[i][0] appears on a region A of the circuit suck that that hamiltonian_operator[i][2] is True for all (t,q) in A. The counted number is multiplied by the weight hamiltonian_operator[i][1].

gatesset

Gates enabled on the machine (virtual gates included).

qcd_instructionsdictionary
annealing_Tfloat

Annealing time.

rules_classesstr or list of ints, optional

A list of the ints identifying the rule classes that we want to generate. Default is “all” and generates all the rule classes.

generators“std” or list of generators, optional

The list of generators producing the rules to be used. Default is “std”, in this case a standard list of rules is used.

annealing_schedulechar, optional

Pulse schedule for the annealing process. Default is A.

max_rules_volumeint, optional

Maximum volume allowed for the rules to be included in the driving Hamiltonian. Default is 100.

shapetuple of ints

Shape of the lattice where the circuit is encoded, including fictitious sites added to fit in a TTN.

Returns

shapetuple of ints

Shape of the lattice where the circuit is encoded, including fictitious sites added to fit in a TTN.

my_opsinstance of qtealeaves.operators.TNOperators

Operators that transform a gate state into another gate state.

my_obsinstance of qtealeaves.observables.TNObservables

Defines the observables of the simulation. For details, check the corresponding class.

modelinstance of qtealeaves.modeling.QuantumModel
System Hamiltonian in the form

H = H_ext + alpha*H_initial + beta*H_driving + gamma*H_final

where:
  • H_ext = sum_i |idle><idle| is a 1-local Hamiltonian acting on

the sites of the lattice that does not correspond to a circuit site. - H_initial is 1-local Hamiltonian having the initial circuit as ground state. - H_driving is the Hamiltonian that drives the evolution by creating superpositions of equivalent circuit.. - H_final is the Hamiltonian that encodes the infidelity function.