Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
get_parametric_circuit.py
Go to the documentation of this file.
1 '''
2 Copyright 2020 Peter Rakyta, Ph.D.
3 
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 '''
16 
17 import vqe_utils
18 import numpy as np
19 import time
20 import random
21 
22 
23 # load preconstructed optimized parameters
24 vqe_utils.load_preconstructed_data('optimized_parameters_vqe.npy', 'parameter_values_vqe.npy')
25 
26 start = time.time()
27 random.seed(start)
28 
29 # determine random parameter value alpha
30 alpha = random.random()*4*np.pi
31 print('alpha=', alpha)
32 
33 # determine the quantum circuit at parameter value alpha
35 
36 
37 time_loc = time.time() - start
38 print('average time: ', time_loc, 's.')
39 
40 
41 
def load_preconstructed_data(filename1, filename2)
Call load precosntructed data for inerpolated optimization.
Definition: vqe_utils.py:46
def get_interpolated_circuit(alpha)
???????????
Definition: vqe_utils.py:136