Quantum Gate Decomposer  v1.3
Powerful decomposition of almost any unitary into U3 and CNOT gates
Namespaces | Variables
example.py File Reference

Simple example python code demonstrating the basic usage of the Python interface of the Quantum Gate Decomposer package. More...

Go to the source code of this file.

Namespaces

 example
 

Variables

 example.backend = Aer.get_backend('unitary_simulator')
 Qiskit backend for simulator. More...
 
 example.cDecompose = N_Qubit_Decomposition( Umtx.conj().T )
 [load Umtx] More...
 
 example.data = loadmat('Umtx.mat')
 load the unitary from file More...
 
 example.decomposed_matrix = result.get_unitary(quantum_circuit)
 the unitary matrix from the result object More...
 
 example.decomposition_error = LA.norm(product_matrix - np.identity(16)*product_matrix[0,0], 2)
 the error of the decomposition More...
 
 example.job = execute(quantum_circuit, backend)
 job execution and getting the result as an object More...
 
 example.matrix_size = int(2**qbit_num)
 
 example.product_matrix = np.dot(Umtx, decomposed_matrix.conj().T)
 the Umtx*Umtx' matrix More...
 
int example.qbit_num = 3
 
 example.quantum_circuit = cDecompose.get_quantum_circuit()
 [create decomposition class] More...
 
 example.result = job.result()
 the result of the Qiskit job More...
 
 example.Umtx = unitary_group.rvs(matrix_size)
 The unitary to be decomposed. More...
 

Detailed Description

Simple example python code demonstrating the basic usage of the Python interface of the Quantum Gate Decomposer package.

Definition in file example.py.