skqulacs.circuit.pre_defined module#
- skqulacs.circuit.pre_defined.create_dqn_cl(n_qubit: int, c_depth: int, s_qubit: int) skqulacs.circuit.circuit.LearningCircuit [source]#
- skqulacs.circuit.pre_defined.create_dqn_cl_no_cz(n_qubit: int, c_depth: int) skqulacs.circuit.circuit.LearningCircuit [source]#
- skqulacs.circuit.pre_defined.create_farhi_neven_ansatz(n_qubit: int, c_depth: int, seed: Optional[int] = 0) skqulacs.circuit.circuit.LearningCircuit [source]#
create circuit proposed in https://arxiv.org/abs/1802.06002. :param n_qubits: number of qubits :param c_depth: depth of the circuit :param seed: random seed determining the shuffling of the qubits between layers
- skqulacs.circuit.pre_defined.create_farhi_neven_watle_ansatz(n_qubit: int, c_depth: int, seed: Optional[int] = 0) skqulacs.circuit.circuit.LearningCircuit [source]#
create modified version of circuit proposed in https://arxiv.org/abs/1802.06002. made by WA_TLE. :param n_qubits: number of qubits :param c_depth: depth of the circuit :param seed: random seed determining the shuffling of the qubits between layers
- skqulacs.circuit.pre_defined.create_ibm_embedding_circuit(n_qubit: int) skqulacs.circuit.circuit.LearningCircuit [source]#
create circuit proposed in https://arxiv.org/abs/1802.06002. :param n_qubits: number of qubits
- skqulacs.circuit.pre_defined.create_multi_qubit_param_rotational_ansatz(n_qubit: int, c_depth: int = 1, seed: Optional[int] = 0) skqulacs.circuit.circuit.LearningCircuit [source]#
- skqulacs.circuit.pre_defined.create_npqc_ansatz(n_qubit: int, c_depth: int = 4, c: float = 0.1) skqulacs.circuit.circuit.LearningCircuit [source]#
Creates circuit used in http://arxiv.org/abs/2108.01039, Fig. 5(a). :param n_qubit: number of qubits. must be even. :param c_depth: circuit depth. The number of parameters is 8+4*(c_depth-1). :param c: hyperparameter of the circuit. Defined in Eq. (2) of the paper.
- skqulacs.circuit.pre_defined.create_qcl_ansatz(n_qubit: int, c_depth: int, time_step: float = 0.5, seed: Optional[int] = 0) skqulacs.circuit.circuit.LearningCircuit [source]#
Create a circuit used in this page: https://dojo.qulacs.org/ja/latest/notebooks/5.2_Quantum_Circuit_Learning.html :param n_qubit: number of qubits :param c_depth: circuit depth :param time_step: the evolution time used for the hamiltonian dynamics :param seed: seed for random numbers. used for determining the interaction strength of the hamiltonian simulation
Examples
>>> n_qubit = 4 >>> circuit = create_qcl_ansatz(n_qubit, 3, 0.5) >>> qnn = QNNRegressor(circuit) >>> qnn.fit(x_train, y_train)
- skqulacs.circuit.pre_defined.create_qcnn_ansatz(n_qubit: int, seed: Optional[int] = 0) skqulacs.circuit.circuit.LearningCircuit [source]#
Creates circuit used in https://www.tensorflow.org/quantum/tutorials/qcnn?hl=en, Section 1. :param n_qubit: number of qubits. must be even. :param seed: seed for random numbers. used for determining the interaction strength of the hamiltonian simulation
- skqulacs.circuit.pre_defined.create_shirai_ansatz(n_qubit: int, c_depth: int = 5, seed: Optional[int] = 0) skqulacs.circuit.circuit.LearningCircuit [source]#
create circuit proposed in http://arxiv.org/abs/2111.02951. :param n_qubit: number of qubits :param c_depth: circuit depth as defined in http://arxiv.org/abs/2111.02951 :param seed: random seed for initial parameter values
- skqulacs.circuit.pre_defined.create_yzcx_ansatz(n_qubit: int, c_depth: int = 4, c: float = 0.1, seed: Optional[int] = 0) skqulacs.circuit.circuit.LearningCircuit [source]#
Creates circuit used in http://arxiv.org/abs/2108.01039, Fig. 5(c). :param n_qubit: number of qubits. must be even. :param c_depth: circuit depth. The number of parameters is 8*c_depth. :param c: hyperparameter of the circuit. Defined in Eq. (2) of the paper.