Sequential Quantum Gate Decomposer
v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
|
Variables | |
backend = Aer.get_backend('unitary_simulator') | |
Qiskit backend for simulator. More... | |
cDecompose = N_Qubit_Decomposition_adaptive( Umtx.conj().T, config=config ) | |
[creating decomp class] More... | |
dictionary | config |
gate systhesis ##################################### More... | |
decomposed_matrix = utils.get_unitary_from_qiskit_circuit( quantum_circuit ) | |
tuple | decomposition_error = (np.real(np.trace(product_matrix)))/2 |
job = execute(qc, backend) | |
job execution and getting the result as an object More... | |
int | levels = 5 |
[creating decomp class] More... | |
parameter_num = cDecompose.get_Parameter_Num() | |
[set adaptive gate structure] More... | |
parameters = np.zeros( (parameter_num,1), dtype=np.float64 ) | |
phase = np.angle(product_matrix[0,0]) | |
product_matrix = np.dot(Umtx,decomposed_matrix.conj().T) | |
qc = QuantumCircuit.from_qasm_file( '../../benchmarks/IBM/alu-v4_37.qasm') | |
quantum_circuit = cDecompose.get_Qiskit_Circuit() | |
[set parameters] More... | |
result = job.result() | |
the result of the Qiskit job More... | |
Umtx = result.get_unitary(qc) | |
the unitary matrix from the result object More... | |
example_evolutionary.backend = Aer.get_backend('unitary_simulator') |
Qiskit backend for simulator.
Definition at line 47 of file example_evolutionary.py.
example_evolutionary.cDecompose = N_Qubit_Decomposition_adaptive( Umtx.conj().T, config=config ) |
[creating decomp class]
Definition at line 81 of file example_evolutionary.py.
dictionary example_evolutionary.config |
gate systhesis #####################################
Definition at line 66 of file example_evolutionary.py.
example_evolutionary.decomposed_matrix = utils.get_unitary_from_qiskit_circuit( quantum_circuit ) |
Definition at line 169 of file example_evolutionary.py.
tuple example_evolutionary.decomposition_error = (np.real(np.trace(product_matrix)))/2 |
Definition at line 176 of file example_evolutionary.py.
job execution and getting the result as an object
Definition at line 50 of file example_evolutionary.py.
int example_evolutionary.levels = 5 |
[creating decomp class]
[set verbosity] [set verbosity] [set adaptive gate structure]
Definition at line 95 of file example_evolutionary.py.
example_evolutionary.parameter_num = cDecompose.get_Parameter_Num() |
[set adaptive gate structure]
[set parameters]
Definition at line 106 of file example_evolutionary.py.
example_evolutionary.parameters = np.zeros( (parameter_num,1), dtype=np.float64 ) |
Definition at line 107 of file example_evolutionary.py.
example_evolutionary.phase = np.angle(product_matrix[0,0]) |
Definition at line 171 of file example_evolutionary.py.
Definition at line 170 of file example_evolutionary.py.
example_evolutionary.qc = QuantumCircuit.from_qasm_file( '../../benchmarks/IBM/alu-v4_37.qasm') |
Definition at line 38 of file example_evolutionary.py.
example_evolutionary.quantum_circuit = cDecompose.get_Qiskit_Circuit() |
[set parameters]
[set AGENTS optimizer] [set AGENTS optimizer] [start optimization] starting the decomposition [start optimization] [set BFGS optimizer] [set BFGS optimizer] [start BFGS optimization] [start BFGS optimization] [start compression phase] [start compression phase] [finalyze circuit] [finalyze circuit] [qiskit] Qiskit quantum circuit
Definition at line 161 of file example_evolutionary.py.
example_evolutionary.result = job.result() |
the result of the Qiskit job
Definition at line 52 of file example_evolutionary.py.
example_evolutionary.Umtx = result.get_unitary(qc) |
the unitary matrix from the result object
Definition at line 55 of file example_evolutionary.py.