model_noise
This module implements several functions for configuring a noisy hardware model for creating the corresponding noisy qpu. BE AWARE The functions of this module can be only used with the Qaptiva™ Appliance and when the user is locally in a QLM. The Qaptiva Access library CAN NOT BE used with these functions.
- QQuantLib.qpu.model_noise.create_qpu(hw_cfg)
Create QPU. Using an input hardware configuration this function creates a QPU. It could be a noisy or a ideal qpu depending on the value of the key qpu of the hw_cfg dictionary. Additionally adds a plugin for rewiting the Toffolis using CNOTS and local gates.
- Parameters:
hw_cfg (dict) – Python dictionary with parameters for configuring the QPU * qpu : If noisy the function creates a Noisy QPU. Else create the corresponding ideal QPU. * error_gate_1qb : Error for 1-qubit gate (for Depolarizing channel) * error_gate_2qbs: Error for 2-qubits gates (for Depolarizing channel) * t_gate_1qb : duration time in nanoseconds for 1 qubit gates * t_gate_2qbs : duration time in nanoseconds for 2 qubit gates * t1 : T1 time in nanoseconds (Amplitude Damping and Dephasing channels) * t2 : T2 time in nanoseconds (Dephasing channel)
- Returns:
my_qpu – generated QPU (can be a noisy one)
- Return type:
Qaptiva QPU
- QQuantLib.qpu.model_noise.noisy_hw_model(hw_cfg)
My noisy hardware model: It is composed by 3 types of noise channels: Amplitude Damping and Dephasing channels for idle qubits Depolarizing channel applied after any gate.
- Parameters:
hw_cfg (dict) – Python dictionary with parameters for the noisy hardware: * error_gate_1qb : Error for 1-qubit gate (for Depolarizing channel) * error_gate_2qbs: Error for 2-qubits gates (for Depolarizing channel) * t_gate_1qb : duration time in nanoseconds for 1 qubit gates * t_gate_2qbs : duration time in nanoseconds for 2 qubit gates * t1 : T1 time in nanoseconds (Amplitude Damping and Dephasing channels) * t2 : T2 time in nanoseconds (Dephasing channel)
- Returns:
my_hw_model – my HardwareModel definition
- Return type:
Qaptiva HardwareModel
- QQuantLib.qpu.model_noise.set_gate_times(t_gate_1qb=35, t_gate_2qbs=660, t_readout=4000)
Set the gate times for a noise model.
- Parameters:
t_gate_1qb (int) – time for 1 qubit gate length in ns
t_gate_2qbs (int) – time for 2 qubits gate length in ns
t_readout (int) – time for readout gate in ns
- Returns:
gate_time_dict – dictionary with the default gates and their time length
- Return type:
dict