Quantum Gate Decomposer
v1.3
Powerful decomposition of almost any unitary into U3 and CNOT gates
|
Variables | |
backend = Aer.get_backend('unitary_simulator') | |
Qiskit backend for simulator. More... | |
cDecompose = N_Qubit_Decomposition( Umtx.conj().T ) | |
[load Umtx] More... | |
data = loadmat('Umtx.mat') | |
load the unitary from file More... | |
decomposed_matrix = result.get_unitary(quantum_circuit) | |
the unitary matrix from the result object More... | |
decomposition_error = LA.norm(product_matrix - np.identity(16)*product_matrix[0,0], 2) | |
the error of the decomposition More... | |
job = execute(quantum_circuit, backend) | |
job execution and getting the result as an object More... | |
matrix_size = int(2**qbit_num) | |
product_matrix = np.dot(Umtx, decomposed_matrix.conj().T) | |
the Umtx*Umtx' matrix More... | |
int | qbit_num = 3 |
quantum_circuit = cDecompose.get_quantum_circuit() | |
[create decomposition class] More... | |
result = job.result() | |
the result of the Qiskit job More... | |
Umtx = unitary_group.rvs(matrix_size) | |
The unitary to be decomposed. More... | |
example.backend = Aer.get_backend('unitary_simulator') |
Qiskit backend for simulator.
Definition at line 119 of file example.py.
example.cDecompose = N_Qubit_Decomposition( Umtx.conj().T ) |
[load Umtx]
[create decomposition class] creating a class to decompose the unitary
Definition at line 47 of file example.py.
example.data = loadmat('Umtx.mat') |
load the unitary from file
Definition at line 71 of file example.py.
example.decomposed_matrix = result.get_unitary(quantum_circuit) |
the unitary matrix from the result object
Definition at line 127 of file example.py.
example.decomposition_error = LA.norm(product_matrix - np.identity(16)*product_matrix[0,0], 2) |
the error of the decomposition
Definition at line 133 of file example.py.
example.job = execute(quantum_circuit, backend) |
job execution and getting the result as an object
Definition at line 122 of file example.py.
example.matrix_size = int(2**qbit_num) |
Definition at line 41 of file example.py.
the Umtx*Umtx' matrix
Definition at line 131 of file example.py.
int example.qbit_num = 3 |
Definition at line 38 of file example.py.
example.quantum_circuit = cDecompose.get_quantum_circuit() |
[create decomposition class]
[set parameters] set the number of successive identical blocks in the optimalization of disentanglement of the n-th qubits [set parameters] [start decomposition] starting the decomposition [start decomposition] [qiskit] Qiskit quantum circuit
Definition at line 109 of file example.py.
example.result = job.result() |
the result of the Qiskit job
Definition at line 124 of file example.py.
example.Umtx = unitary_group.rvs(matrix_size) |
The unitary to be decomposed.
Definition at line 44 of file example.py.