Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Classes | Namespaces | Functions | Variables
qgd_N_Qubit_Decomposition_adaptive.py File Reference

#!/usr/bin/env python3 -*- coding: utf-8 -*- More...

Go to the source code of this file.

Classes

class  squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.qgd_N_Qubit_Decomposition_adaptive
 A QGD Python interface class for the decomposition of N-qubit unitaries into U3 and CNOT gates. More...
 

Namespaces

 squander.decomposition.qgd_N_Qubit_Decomposition_adaptive
 

Functions

def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.__init__ (self, Umtx, level_limit_max=8, level_limit_min=0, topology=None, config={}, accelerator_num=0)
 Constructor of the class. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.add_Adaptive_Layers (self)
 Call to add adaptive layers to the gate structure stored by the class. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.add_Finalyzing_Layer_To_Gate_Structure (self)
 Call to add finalyzing layer (single qubit rotations on all of the qubits) to the gate structure. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.add_Gate_Structure_From_Binary (self, filename)
 Call to append custom layers to the gate structure that are intended to be used in the decomposition from a binary file created from SQUANDER. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.add_Layer_To_Imported_Gate_Structure (self)
 Call to add an adaptive layer to the gate structure previously imported gate structure. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.apply_Global_Phase_Factor (self)
 Call to apply global phase on Unitary matrix. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.apply_Imported_Gate_Structure (self)
 Call to apply the imported gate structure on the unitary. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.Compress_Circuit (self)
 Wrapper function to call the compress_circuit method of C++ class N_Qubit_Decomposition. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.export_Unitary (self, filename)
 Call to export unitary matrix to binary file. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.Finalize_Circuit (self)
 Wrapper function to call the finalize_circuit method of C++ class N_Qubit_Decomposition. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Circuit (self)
 Call to retrieve the incorporated quantum circuit (Squander format) More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Cirq_Circuit (self)
 Export the unitary decomposition into Qiskit format. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Decomposition_Error (self)
 Call to get the error of the decomposition. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Global_Phase (self)
 Call to get global phase. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Initial_Circuit (self)
 Wrapper function to call the get_initial_circuit method of C++ class N_Qubit_Decomposition. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Matrix (self, parameters=None)
 Call to retrieve the unitary of the circuit. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Num_of_Iters (self)
 Call to get the number of iterations. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Optimized_Parameters (self)
 Call to get the optimized parameters set in numpy array. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Parameter_Num (self)
 Call to get the number of free parameters in the gate structure used for the decomposition. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Project_Name (self)
 Call to get the name of the SQUANDER project. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Qbit_Num (self)
 Call to get the number of qubits in the circuit. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Qiskit_Circuit (self)
 Export the unitary decomposition into Qiskit format. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Second_Renyi_Entropy (self, parameters=None, input_state=None, qubit_list=None)
 Call to get the second Rényi entropy. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Trace_Offset (self)
 Call to get the trace offset used in the cost function. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.get_Unitary (self)
 Call to get unitary matrix. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.import_Qiskit_Circuit (self, qc_in)
 Call to import initial quantum circuit in QISKIT format to be further comporessed. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.List_Gates (self)
 Call to print the gates decomposing the initial unitary. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.Optimization_Problem (self, parameters=None)
 Call to evaluate the cost function. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.Optimization_Problem_Combined (self, parameters=None)
 Call to evaluate the cost function and the gradient components. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.Optimization_Problem_Grad (self, parameters=None)
 Call to evaluate the gradient components. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.Reorder_Qubits (self, qbit_list)
 Call to reorder the qubits in the matrix of the gate. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Cost_Function_Variant (self, costfnc=0)
 Call to set the optimizer used in the gate synthesis process. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Gate_Structure (self, Gate_structure)
 Call to set custom gate structure to used in the decomposition. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Gate_Structure_From_Binary (self, filename)
 Call to set custom layers to the gate structure that are intended to be used in the decomposition from a binary file created from SQUANDER. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Global_Phase (self, new_global_phase)
 Call to set global phase. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Iteration_Threshold_of_Randomization (self, threshold=2500)
 Call to set the threshold value for the count of interations, above which the parameters are randomized if the cost function does not decreases fast enough. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Max_Iterations (self, max_iters)
 Call to set the maximum number of iterations for each optimization loop. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Optimization_Tolerance (self, tolerance)
 Call to set the error tolerance of the decomposition. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Optimized_Parameters (self, new_params)
 Call to set the parameters which are used as a starting point in the optimization. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Optimizer (self, optimizer="BFGS")
 Call to set the optimizer used in the gate synthesis process. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Project_Name (self, project_name_new)
 Call to set the name of the SQUANDER project. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Randomized_Radius (self, radius)
 Call to set the radius in which randomized parameters are generated around the current minimum duting the optimization process. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Trace_Offset (self, trace_offset=0)
 Call to set the trace offset used in the cost function. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Unitary (self, Umtx_arr)
 Call to set unitary matrix from a numpy array. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.set_Unitary_From_Binary (self, filename)
 Call to set unitary matrix from a binary file created from SQUANDER. More...
 
def squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.Start_Decomposition (self)
 Wrapper function to call the start_decomposition method of C++ class N_Qubit_Decomposition. More...
 

Variables

 squander.decomposition.qgd_N_Qubit_Decomposition_adaptive.qbit_num
 the number of qubits More...
 

Detailed Description

#!/usr/bin/env python3 -*- coding: utf-8 -*-

A QGD Python interface class for the decomposition of N-qubit unitaries into a set of two-qubit and one-qubit gates.

Definition in file qgd_N_Qubit_Decomposition_adaptive.py.