Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Functions | Variables
example_heavy_hex_general_unitary Namespace Reference

Functions

def create_custom_gate_structure_heavy_hex_3 (qbit_num)
 
def create_custom_gate_structure_heavy_hex_4 (qbit_num)
 

Variables

 decomp = N_Qubit_Decomposition( Umtx.conj().T )
 
 decomposed_matrix = utils.get_unitary_from_qiskit_circuit( quantum_circuit )
 
tuple decomposition_error = (np.real(np.trace(product_matrix)))/2
 
dictionary gate_structure = { 4: create_custom_gate_structure_heavy_hex_4(4), 3: create_custom_gate_structure_heavy_hex_3(3)}
 
 matrix_size = int(2**qbit_num)
 
 phase = np.angle(product_matrix[0,0])
 
 product_matrix = np.dot(Umtx,decomposed_matrix.conj().T)
 
int qbit_num = 4
 
 quantum_circuit = decomp.get_Qiskit_Circuit()
 
 Umtx = unitary_group.rvs(matrix_size)
 

Function Documentation

◆ create_custom_gate_structure_heavy_hex_3()

def example_heavy_hex_general_unitary.create_custom_gate_structure_heavy_hex_3 (   qbit_num)
This method is called to create custom gate structure for the decomposition on IBM QX2

Definition at line 32 of file example_heavy_hex_general_unitary.py.

◆ create_custom_gate_structure_heavy_hex_4()

def example_heavy_hex_general_unitary.create_custom_gate_structure_heavy_hex_4 (   qbit_num)
This method is called to create custom gate structure for the decomposition on IBM QX2

Definition at line 101 of file example_heavy_hex_general_unitary.py.

Variable Documentation

◆ decomp

example_heavy_hex_general_unitary.decomp = N_Qubit_Decomposition( Umtx.conj().T )

Definition at line 180 of file example_heavy_hex_general_unitary.py.

◆ decomposed_matrix

example_heavy_hex_general_unitary.decomposed_matrix = utils.get_unitary_from_qiskit_circuit( quantum_circuit )

Definition at line 211 of file example_heavy_hex_general_unitary.py.

◆ decomposition_error

tuple example_heavy_hex_general_unitary.decomposition_error = (np.real(np.trace(product_matrix)))/2

Definition at line 218 of file example_heavy_hex_general_unitary.py.

◆ gate_structure

dictionary example_heavy_hex_general_unitary.gate_structure = { 4: create_custom_gate_structure_heavy_hex_4(4), 3: create_custom_gate_structure_heavy_hex_3(3)}

Definition at line 184 of file example_heavy_hex_general_unitary.py.

◆ matrix_size

example_heavy_hex_general_unitary.matrix_size = int(2**qbit_num)

Definition at line 174 of file example_heavy_hex_general_unitary.py.

◆ phase

example_heavy_hex_general_unitary.phase = np.angle(product_matrix[0,0])

Definition at line 213 of file example_heavy_hex_general_unitary.py.

◆ product_matrix

int example_heavy_hex_general_unitary.product_matrix = np.dot(Umtx,decomposed_matrix.conj().T)

Definition at line 212 of file example_heavy_hex_general_unitary.py.

◆ qbit_num

int example_heavy_hex_general_unitary.qbit_num = 4

Definition at line 171 of file example_heavy_hex_general_unitary.py.

◆ quantum_circuit

example_heavy_hex_general_unitary.quantum_circuit = decomp.get_Qiskit_Circuit()

Definition at line 205 of file example_heavy_hex_general_unitary.py.

◆ Umtx

example_heavy_hex_general_unitary.Umtx = unitary_group.rvs(matrix_size)

Definition at line 177 of file example_heavy_hex_general_unitary.py.