qutip_qip.pulse¶
Pulse representation of a quantum circuit.
Classes

Representation of the timeindependent drift Hamiltonian. 

Representation of a control pulse and the pulse dependent noise. 

class
qutip_qip.pulse.
Drift
(qobj=None)[source]¶ Bases:
object
Representation of the timeindependent drift Hamiltonian. Usually its the intrinsic evolution of the quantum system that can not be tuned.
 Parameters
 qobj
qutip.Qobj
or list ofqutip.Qobj
, optional The drift Hamiltonians.
 qobj
 Attributes
 qobj: list of :class:`qutip.Qobj`
A list of the the drift Hamiltonians.

add_drift
(qobj, targets)[source]¶ Add a Hamiltonian to the drift.
 Parameters
 qobj: :class:`qutip.Qobj`
The collapse operator of the lindblad noise.
 targets: list
target qubits of the collapse operator (or subquantum system of other dimensions).

get_ideal_qobjevo
(dims)[source]¶ Get the QobjEvo representation of the drift Hamiltonian.
 Parameters
 dims: int or list
Dimension of the system. If int, we assume it is the number of qubits in the system. If list, it is the dimension of the component systems.
 Returns
 ideal_evo:
qutip.QobjEvo
A QobjEvo representing the drift evolution.
 ideal_evo:

get_noisy_qobjevo
(dims)[source]¶ Same as the get_ideal_qobjevo method. There is no additional noise for the drift evolution.
 Returns
 noisy_evo:
qutip.QobjEvo
A QobjEvo representing the ideal evolution and coherent noise.
 c_ops: list of
qutip.QobjEvo
Always an empty list for Drift
 noisy_evo:

class
qutip_qip.pulse.
Pulse
(qobj, targets, tlist=None, coeff=None, spline_kind=None, label='')[source]¶ Bases:
object
Representation of a control pulse and the pulse dependent noise. The pulse is characterized by the ideal control pulse, the coherent noise and the lindblad noise. The later two are lists of noisy evolution dynamics. Each dynamic element is characterized by four variables:
qobj
,targets
,tlist
andcoeff
.See examples for different construction behavior.
 Parameters
 qobj
qutip.Qobj
The Hamiltonian of the ideal pulse.
 targets: list
target qubits of the ideal pulse (or subquantum system of other dimensions).
 tlist: arraylike, optional
Time sequence of the ideal pulse. A list of time at which the timedependent coefficients are applied.
tlist
does not have to be equidistant, but must have the same length or one element shorter compared tocoeff
. See documentation for the parameterspline_kind
. coeff: arraylike or bool, optional
Timedependent coefficients of the ideal control pulse. If an array, the length must be the same or one element longer compared to
tlist
. See documentation for the parameterspline_kind
. If a bool, the coefficient is a constant 1 or 0. spline_kind: str, optional
Type of the coefficient interpolation: “step_func” or “cubic”.
“step_func”: The coefficient will be treated as a step function. E.g.
tlist=[0,1,2]
andcoeff=[3,2]
, means that the coefficient is 3 in t=[0,1) and 2 in t=[2,3). It requireslen(coeff)=len(tlist)1
orlen(coeff)=len(tlist)
, but in the second case the last element ofcoeff
has no effect.“cubic”: Use cubic interpolation for the coefficient. It requires
len(coeff)=len(tlist)
 label: str
The label (name) of the pulse.
 qobj
Examples
Create a pulse that is turned off
>>> Pulse(sigmaz(), 0) >>> Pulse(sigmaz(), 0, None, None)
Create a time dependent pulse
>>> tlist = np.array([0., 1., 2., 4.]) >>> coeff = np.array([0.5, 1.2, 0.8]) >>> spline_kind = "step_func" >>> Pulse(sigmaz(), 0, tlist=tlist, coeff=coeff, spline_kind="step_func")
Create a time independent pulse
>>> Pulse(sigmaz(), 0, coeff=True)
Create a constant pulse with time range
>>> Pulse(sigmaz(), 0, tlist=tlist, coeff=True)
Create an dummy Pulse (H=0)
>>> Pulse(None, None)
 Attributes
 ideal_pulse: :class:`.pulse._EvoElement`
The ideal dynamic of the control pulse.
 coherent_noise: list of :class:`.pulse._EvoElement`
The coherent noise caused by the control pulse. Each dynamic element is still characterized by a timedependent Hamiltonian.
 lindblad_noise: list of :class:`.pulse._EvoElement`
The dissipative noise of the control pulse. Each dynamic element will be treated as a (timedependent) lindblad operator in the master equation.
 spline_kind: str
See parameter
spline_kind
. label: str
See parameter
label
.

add_coherent_noise
(qobj, targets, tlist=None, coeff=None)[source]¶ Add a new (timedependent) Hamiltonian to the coherent noise.
 Parameters
 qobj: :class:`qutip.Qobj`
The Hamiltonian of the pulse.
 targets: list
target qubits of the pulse (or subquantum system of other dimensions).
 tlist: arraylike, optional
A list of time at which the timedependent coefficients are applied.
tlist
does not have to be equidistant, but must have the same length or one element shorter compared tocoeff
. See documentation for the parameterspline_kind
ofPulse
. coeff: arraylike or bool, optional
Timedependent coefficients of the pulse noise. If an array, the length must be the same or one element longer compared to
tlist
. See documentation for the parameterspline_kind
ofPulse
. If a bool, the coefficient is a constant 1 or 0.

add_lindblad_noise
(qobj, targets, tlist=None, coeff=None)[source]¶ Add a new (timedependent) lindblad noise to the coherent noise.
 Parameters
 qobj: :class:`qutip.Qobj`
The collapse operator of the lindblad noise.
 targets: list
target qubits of the collapse operator (or subquantum system of other dimensions).
 tlist: arraylike, optional
A list of time at which the timedependent coefficients are applied.
tlist
does not have to be equidistant, but must have the same length or one element shorter compared tocoeff
. See documentation for the parameterspline_kind
ofPulse
. coeff: arraylike or bool, optional
Timedependent coefficients of the pulse noise. If an array, the length must be the same or one element longer compared to
tlist
. See documentation for the parameterspline_kind
ofPulse
. If a bool, the coefficient is a constant 1 or 0.

property
coeff
¶ See parameter
coeff
.

get_full_tlist
(tol=1e10)[source]¶ Return the full tlist of the pulses and noise. It means that if different
tlist
are present, they will be merged to one with all time points stored in a sorted array. Returns
 full_tlist: arraylike 1d
The full time sequence for the noisy evolution.

get_ideal_qobj
(dims)[source]¶ Get the Hamiltonian of the ideal pulse.
 Parameters
 dims: int or list
Dimension of the system. If int, we assume it is the number of qubits in the system. If list, it is the dimension of the component systems.
 Returns
 qobj
qutip.Qobj
The Hamiltonian of the ideal pulse.
 qobj

get_ideal_qobjevo
(dims)[source]¶ Get a QobjEvo representation of the ideal evolution.
 Parameters
 dims: int or list
Dimension of the system. If int, we assume it is the number of qubits in the system. If list, it is the dimension of the component systems.
 Returns
 ideal_evo:
qutip.QobjEvo
A QobjEvo representing the ideal evolution.
 ideal_evo:

get_noisy_qobjevo
(dims)[source]¶ Get the QobjEvo representation of the noisy evolution. The result can be used directly as input for the qutip solvers.
 Parameters
 dims: int or list
Dimension of the system. If int, we assume it is the number of qubits in the system. If list, it is the dimension of the component systems.
 Returns
 noisy_evo:
qutip.QobjEvo
A QobjEvo representing the ideal evolution and coherent noise.
 c_ops: list of
qutip.QobjEvo
A list of (timedependent) lindbald operators.
 noisy_evo:

print_info
()[source]¶ Print the information of the pulse, including the ideal dynamics, the coherent noise and the lindblad noise.

property
qobj
¶ See parameter qobj.

property
targets
¶ See parameter targets.

property
tlist
¶ See parameter tlist