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

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...
 

Variable Documentation

◆ backend

example_evolutionary.backend = Aer.get_backend('unitary_simulator')

Qiskit backend for simulator.

Definition at line 47 of file example_evolutionary.py.

◆ cDecompose

example_evolutionary.cDecompose = N_Qubit_Decomposition_adaptive( Umtx.conj().T, config=config )

[creating decomp class]

Definition at line 81 of file example_evolutionary.py.

◆ config

dictionary example_evolutionary.config
Initial value:
1 = { 'agent_lifetime':200,
2  'max_inner_iterations_agent': 100000,
3  'max_inner_iterations_compression': 100000,
4  'max_inner_iterations' : 10000,
5  'max_inner_iterations_final': 10000,
6  'Randomized_Radius': 0.3,
7  'randomized_adaptive_layers': 1,
8  'optimization_tolerance_agent': 1e-3,
9  'optimization_tolerance_': 1e-8}

gate systhesis #####################################

Definition at line 66 of file example_evolutionary.py.

◆ decomposed_matrix

example_evolutionary.decomposed_matrix = utils.get_unitary_from_qiskit_circuit( quantum_circuit )

Definition at line 169 of file example_evolutionary.py.

◆ decomposition_error

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

Definition at line 176 of file example_evolutionary.py.

◆ job

example_evolutionary.job = execute(qc, backend)

job execution and getting the result as an object

Definition at line 50 of file example_evolutionary.py.

◆ levels

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.

◆ parameter_num

example_evolutionary.parameter_num = cDecompose.get_Parameter_Num()

[set adaptive gate structure]

[set parameters]

Definition at line 106 of file example_evolutionary.py.

◆ parameters

example_evolutionary.parameters = np.zeros( (parameter_num,1), dtype=np.float64 )

Definition at line 107 of file example_evolutionary.py.

◆ phase

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

Definition at line 171 of file example_evolutionary.py.

◆ product_matrix

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

Definition at line 170 of file example_evolutionary.py.

◆ qc

example_evolutionary.qc = QuantumCircuit.from_qasm_file( '../../benchmarks/IBM/alu-v4_37.qasm')

Definition at line 38 of file example_evolutionary.py.

◆ quantum_circuit

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.

◆ result

example_evolutionary.result = job.result()

the result of the Qiskit job

Definition at line 52 of file example_evolutionary.py.

◆ Umtx

example_evolutionary.Umtx = result.get_unitary(qc)

the unitary matrix from the result object

Definition at line 55 of file example_evolutionary.py.