Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Namespaces | Variables
QC_sim_benchmark.py File Reference

Simple example python code demonstrating how to use state vector simulation with the SQUANDER package and compare the perfromance to QISKIT and Qulacs. More...

Go to the source code of this file.

Namespaces

 QC_sim_benchmark
 

Variables

 QC_sim_benchmark.backend = Aer.AerSimulator(method='statevector')
 
 QC_sim_benchmark.circuit_qiskit = QuantumCircuit(qbit_num)
 
 QC_sim_benchmark.circuit_qulacs = QuantumCircuit(qbit_num)
 
 QC_sim_benchmark.circuit_squander = Circuit( qbit_num )
 
 QC_sim_benchmark.compiled_circuit = transpile(circuit_qiskit, backend)
 
 QC_sim_benchmark.control_qbit
 
dictionary QC_sim_benchmark.execution_times_qiskit = {}
 QISKIT #################################################################. More...
 
dictionary QC_sim_benchmark.execution_times_qulacs = {}
 
dictionary QC_sim_benchmark.execution_times_squander = {}
 SQUANER #################################################################. More...
 
int QC_sim_benchmark.gates_num = 0
 
int QC_sim_benchmark.initial_state = initial_state_real + initial_state_imag*1j
 
 QC_sim_benchmark.initial_state_imag = np.random.uniform(-1.0,1.0, (matrix_size,) )
 
 QC_sim_benchmark.initial_state_real = np.random.uniform(-1.0,1.0, (matrix_size,) )
 
dictionary QC_sim_benchmark.initial_state_squander = {}
 
dictionary QC_sim_benchmark.keys = transformed_states_qiskit.keys()
 
int QC_sim_benchmark.levels = 4
 
 QC_sim_benchmark.linewidth
 
int QC_sim_benchmark.matrix_size = 1 << qbit_num
 
 QC_sim_benchmark.num_of_parameters = circuit_squander.get_Parameter_Num()
 
int QC_sim_benchmark.parameter_idx = 0
 
int QC_sim_benchmark.parameters = np.random.rand(num_of_parameters)*2*np.pi
 
dictionary QC_sim_benchmark.parameters_squander = {}
 
int QC_sim_benchmark.qbit_num_max = 23
 
int QC_sim_benchmark.qbit_num_min = 4
 
 QC_sim_benchmark.qiskit_version = qiskit.version.get_version_info()
 
bool QC_sim_benchmark.random_initial_state = False
 
 QC_sim_benchmark.result = backend.run(compiled_circuit).result()
 
 QC_sim_benchmark.RY_gate = qulacs.gate.RotY( target_qbit, parameters[parameter_idx]*2 )
 
 QC_sim_benchmark.simulator = Aer.get_backend('statevector_simulator')
 
 QC_sim_benchmark.state = QuantumState(qbit_num)
 
dictionary QC_sim_benchmark.state_qiskit = transformed_states_qiskit[ qbit_num ]
 
dictionary QC_sim_benchmark.state_qulacs = transformed_states_qulacs[ qbit_num ]
 
dictionary QC_sim_benchmark.state_squander = transformed_states_squander[ qbit_num ]
 
 QC_sim_benchmark.t0 = time.time()
 
 QC_sim_benchmark.t_qiskit = time.time() - t0
 
 QC_sim_benchmark.t_qulacs = time.time() - t0
 
 QC_sim_benchmark.t_SQUANDER = time.time() - t0
 
 QC_sim_benchmark.target_qbit
 
 QC_sim_benchmark.transformed_state = result.get_statevector(compiled_circuit)
 
dictionary QC_sim_benchmark.transformed_states_qiskit = {}
 
dictionary QC_sim_benchmark.transformed_states_qulacs = {}
 
dictionary QC_sim_benchmark.transformed_states_squander = {}
 

Detailed Description

Simple example python code demonstrating how to use state vector simulation with the SQUANDER package and compare the perfromance to QISKIT and Qulacs.

Definition in file QC_sim_benchmark.py.