|
Sequential Quantum Gate Decomposer
v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
|
Variables | |
| backend = Aer.AerSimulator(method='statevector') | |
| circuit_qiskit = QuantumCircuit(qbit_num) | |
| circuit_qulacs = QuantumCircuit(qbit_num) | |
| circuit_squander = Circuit( qbit_num ) | |
| compiled_circuit = transpile(circuit_qiskit, backend) | |
| control_qbit | |
| dictionary | execution_times_qiskit = {} |
| QISKIT #################################################################. More... | |
| dictionary | execution_times_qulacs = {} |
| dictionary | execution_times_squander = {} |
| SQUANER #################################################################. More... | |
| int | gates_num = 0 |
| int | initial_state = initial_state_real + initial_state_imag*1j |
| initial_state_imag = np.random.uniform(-1.0,1.0, (matrix_size,) ) | |
| initial_state_real = np.random.uniform(-1.0,1.0, (matrix_size,) ) | |
| dictionary | initial_state_squander = {} |
| dictionary | keys = transformed_states_qiskit.keys() |
| int | levels = 4 |
| linewidth | |
| int | matrix_size = 1 << qbit_num |
| num_of_parameters = circuit_squander.get_Parameter_Num() | |
| int | parameter_idx = 0 |
| int | parameters = np.random.rand(num_of_parameters)*2*np.pi |
| dictionary | parameters_squander = {} |
| int | qbit_num_max = 23 |
| int | qbit_num_min = 4 |
| qiskit_version = qiskit.version.get_version_info() | |
| bool | random_initial_state = False |
| result = backend.run(compiled_circuit).result() | |
| RY_gate = qulacs.gate.RotY( target_qbit, parameters[parameter_idx]*2 ) | |
| simulator = Aer.get_backend('statevector_simulator') | |
| state = QuantumState(qbit_num) | |
| dictionary | state_qiskit = transformed_states_qiskit[ qbit_num ] |
| dictionary | state_qulacs = transformed_states_qulacs[ qbit_num ] |
| dictionary | state_squander = transformed_states_squander[ qbit_num ] |
| t0 = time.time() | |
| t_qiskit = time.time() - t0 | |
| t_qulacs = time.time() - t0 | |
| t_SQUANDER = time.time() - t0 | |
| target_qbit | |
| transformed_state = result.get_statevector(compiled_circuit) | |
| dictionary | transformed_states_qiskit = {} |
| dictionary | transformed_states_qulacs = {} |
| dictionary | transformed_states_squander = {} |
| QC_sim_benchmark.backend = Aer.AerSimulator(method='statevector') |
Definition at line 184 of file QC_sim_benchmark.py.
| QC_sim_benchmark.circuit_qiskit = QuantumCircuit(qbit_num) |
Definition at line 149 of file QC_sim_benchmark.py.
| QC_sim_benchmark.circuit_qulacs = QuantumCircuit(qbit_num) |
Definition at line 236 of file QC_sim_benchmark.py.
| QC_sim_benchmark.circuit_squander = Circuit( qbit_num ) |
Definition at line 73 of file QC_sim_benchmark.py.
| QC_sim_benchmark.compiled_circuit = transpile(circuit_qiskit, backend) |
Definition at line 185 of file QC_sim_benchmark.py.
| QC_sim_benchmark.control_qbit |
Definition at line 85 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.execution_times_qiskit = {} |
QISKIT #################################################################.
Definition at line 118 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.execution_times_qulacs = {} |
Definition at line 216 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.execution_times_squander = {} |
SQUANER #################################################################.
Definition at line 50 of file QC_sim_benchmark.py.
| int QC_sim_benchmark.gates_num = 0 |
Definition at line 75 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.initial_state = initial_state_real + initial_state_imag*1j |
Definition at line 63 of file QC_sim_benchmark.py.
| QC_sim_benchmark.initial_state_imag = np.random.uniform(-1.0,1.0, (matrix_size,) ) |
Definition at line 62 of file QC_sim_benchmark.py.
| QC_sim_benchmark.initial_state_real = np.random.uniform(-1.0,1.0, (matrix_size,) ) |
Definition at line 61 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.initial_state_squander = {} |
Definition at line 53 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.keys = transformed_states_qiskit.keys() |
Definition at line 282 of file QC_sim_benchmark.py.
| int QC_sim_benchmark.levels = 4 |
Definition at line 43 of file QC_sim_benchmark.py.
| QC_sim_benchmark.linewidth |
Definition at line 35 of file QC_sim_benchmark.py.
| int QC_sim_benchmark.matrix_size = 1 << qbit_num |
Definition at line 58 of file QC_sim_benchmark.py.
| QC_sim_benchmark.num_of_parameters = circuit_squander.get_Parameter_Num() |
Definition at line 95 of file QC_sim_benchmark.py.
| int QC_sim_benchmark.parameter_idx = 0 |
Definition at line 144 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.parameters = np.random.rand(num_of_parameters)*2*np.pi |
Definition at line 99 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.parameters_squander = {} |
Definition at line 52 of file QC_sim_benchmark.py.
| int QC_sim_benchmark.qbit_num_max = 23 |
Definition at line 40 of file QC_sim_benchmark.py.
| int QC_sim_benchmark.qbit_num_min = 4 |
Definition at line 39 of file QC_sim_benchmark.py.
| QC_sim_benchmark.qiskit_version = qiskit.version.get_version_info() |
Definition at line 123 of file QC_sim_benchmark.py.
| bool QC_sim_benchmark.random_initial_state = False |
Definition at line 45 of file QC_sim_benchmark.py.
| QC_sim_benchmark.result = backend.run(compiled_circuit).result() |
Definition at line 186 of file QC_sim_benchmark.py.
| QC_sim_benchmark.RY_gate = qulacs.gate.RotY( target_qbit, parameters[parameter_idx]*2 ) |
Definition at line 251 of file QC_sim_benchmark.py.
| QC_sim_benchmark.simulator = Aer.get_backend('statevector_simulator') |
Definition at line 194 of file QC_sim_benchmark.py.
| QC_sim_benchmark.state = QuantumState(qbit_num) |
Definition at line 233 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.state_qiskit = transformed_states_qiskit[ qbit_num ] |
Definition at line 285 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.state_qulacs = transformed_states_qulacs[ qbit_num ] |
Definition at line 286 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.state_squander = transformed_states_squander[ qbit_num ] |
Definition at line 284 of file QC_sim_benchmark.py.
| QC_sim_benchmark.t0 = time.time() |
Definition at line 101 of file QC_sim_benchmark.py.
| QC_sim_benchmark.t_qiskit = time.time() - t0 |
Definition at line 203 of file QC_sim_benchmark.py.
| QC_sim_benchmark.t_qulacs = time.time() - t0 |
Definition at line 269 of file QC_sim_benchmark.py.
| QC_sim_benchmark.t_SQUANDER = time.time() - t0 |
Definition at line 103 of file QC_sim_benchmark.py.
| QC_sim_benchmark.target_qbit |
Definition at line 85 of file QC_sim_benchmark.py.
| QC_sim_benchmark.transformed_state = result.get_statevector(compiled_circuit) |
Definition at line 188 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.transformed_states_qiskit = {} |
Definition at line 119 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.transformed_states_qulacs = {} |
Definition at line 217 of file QC_sim_benchmark.py.
| dictionary QC_sim_benchmark.transformed_states_squander = {} |
Definition at line 51 of file QC_sim_benchmark.py.
1.8.13