Compiler
Main module for compiling quantum circuits using various optimization techniques based on many-body embedding.
- vulqano.compiler.compiler(method, input_circuit, machine, instructions, n_cpus, output_folder)[source]
Main function for the many-body compilation of quantum circuit.
Arguments
- methodstr
Many-body optimization method used by the compiler.
- input_circuitvulqano.states.AbstractCircuitState
The circuit state (many-body classical state) representing te circuit to optimize.
- 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).
- instructionsdict or list of dict
Set of instructions specific for the optimization method.
- n_cpusint
Number of CPUs involved in the parallelization.
- output_folderstr
Name of the folder where the raw data results are saved.
Returns
- results
Specific output of the selected optimization method.