qfnn.qf_circ.v_lyr_circ module¶
- class qfnn.qf_circ.v_lyr_circ.V_LYR_Circ(n_qubits, n_repeats)¶
Bases:
qfnn.qf_circ.base.BaseCircuit
V_LYR_Circ is a class, which includes functions to build v-layer(vqc)
- Parameters
n_qubits – input qubits of each unit
n_repeats – repeat times of each unit
- add_input_qubits(circuit, name='vqc_input')¶
Function add_input_qubits is to add a group of qubits as input qubit .
- Parameters
circuit – The circuit that you add the unit at the end
name – The name of the group
- Returns
The register of qubits
- Return type
qubits
- forward(circuit, input_qubits, vqc_name, thetas)¶
Function forward is to add the circuit of VQC.
- Parameters
circuit – The circuit that you add the unit at the end
input_qubits – The register of input qubits
vqc_name – The number of vqc architecture in the paper.
thetas – A list of angles to be encoded into of vqc architecture in the paper.
aux – aux qubits
- get_parameter_number(vqc_name)¶
- vqc_10(circuit, input_qubits, thetas)¶
- vqc_5(circuit, input_qubits, thetas)¶