qiskit.pulse.ShiftPhase¶
-
class
ShiftPhase
(phase, channel, name=None)[소스]¶ The shift phase instruction updates the modulation phase of proceeding pulses played on the same
Channel
. It is a relative increase in phase determined by thephase
operand.In particular, a PulseChannel creates pulses of the form
\[Re[\exp(i 2\pi f jdt + \phi) d_j].\]The
ShiftPhase
instruction causes \(\phi\) to be increased by the instruction’sphase
operand. This will affect all pulses following on the same channel.The qubit phase is tracked in software, enabling instantaneous, nearly error-free Z-rotations by using a ShiftPhase to update the frame tracking the qubit state.
Instantiate a shift phase instruction, increasing the output signal phase on
channel
byphase
[radians].- 매개변수
phase (
Union
[complex
,ParameterExpression
]) – The rotation angle in radians.channel (
PulseChannel
) – The channel this instruction operates on.name (
Optional
[str
]) – Display name for this instruction.
-
__init__
(phase, channel, name=None)[소스]¶ Instantiate a shift phase instruction, increasing the output signal phase on
channel
byphase
[radians].- 매개변수
phase (
Union
[complex
,ParameterExpression
]) – The rotation angle in radians.channel (
PulseChannel
) – The channel this instruction operates on.name (
Optional
[str
]) – Display name for this instruction.
Methods
__init__
(phase, channel[, name])Instantiate a shift phase instruction, increasing the output signal phase on
channel
byphase
[radians].append
(schedule[, name])Return a new
Schedule
withschedule
inserted at the maximum time over all channels shared betweenself
andschedule
.assign_parameters
(value_dict)Modify and return self with parameters assigned according to the input.
ch_duration
(*channels)Return duration of the supplied channels in this Instruction.
ch_start_time
(*channels)Return minimum start time for supplied channels.
ch_stop_time
(*channels)Return maximum start time for supplied channels.
draw
([dt, style, filename, interp_method, …])Plot the instruction.
flatten
()Return itself as already single instruction.
insert
(start_time, schedule[, name])Return a new
Schedule
withschedule
inserted withinself
atstart_time
.shift
(time[, name])Return a new schedule shifted forward by time.
Attributes
Return the
Channel
that this instruction is scheduled on.Returns channels that this schedule uses.
The associated command.
Duration of this instruction.
Unique identifier for this instruction.
Iterable for getting instructions from Schedule tree.
Name of this instruction.
Return instruction operands.
Return the rotation angle enacted by this instruction in radians.
Relative begin time of this instruction.
Relative end time of this instruction.
Occupied time slots by this instruction.
-
append
(schedule, name=None)¶ Return a new
Schedule
withschedule
inserted at the maximum time over all channels shared betweenself
andschedule
.- 매개변수
schedule (
ScheduleComponent
) – schedule to be appendedname (
Optional
[str
]) – Name of the new schedule. Defaults to name of self
- 반환 형식
Schedule
-
assign_parameters
(value_dict)¶ Modify and return self with parameters assigned according to the input.
- 매개변수
value_dict (
Dict
[ParameterExpression
,Union
[ParameterExpression
,float
,int
]]) – A mapping from Parameters to either numeric values or another Parameter expression.- 반환 형식
Instruction
- 반환값
Self with updated parameters.
-
ch_duration
(*channels)¶ Return duration of the supplied channels in this Instruction.
- 매개변수
*channels – Supplied channels
- 반환 형식
int
-
ch_start_time
(*channels)¶ Return minimum start time for supplied channels.
- 매개변수
*channels – Supplied channels
- 반환 형식
int
-
ch_stop_time
(*channels)¶ Return maximum start time for supplied channels.
- 매개변수
*channels – Supplied channels
- 반환 형식
int
-
property
command
¶ The associated command. Commands are deprecated, so this method will be deprecated shortly.
- 반환값
The deprecated command if available.
- 반환 형식
-
draw
(dt=1, style=None, filename=None, interp_method=None, scale=1, plot_all=False, plot_range=None, interactive=False, table=True, label=False, framechange=True, channels=None)¶ Plot the instruction.
- 매개변수
dt (
float
) – Time interval of samplesstyle (Optional[SchedStyle]) – A style sheet to configure plot appearance
filename (
Optional
[str
]) – Name required to save pulse imageinterp_method (
Optional
[Callable
]) – A function for interpolationscale (
float
) – Relative visual scaling of waveform amplitudesplot_all (
bool
) – Plot empty channelsplot_range (
Optional
[Tuple
[float
]]) – A tuple of time range to plotinteractive (
bool
) – When set true show the circuit in a new window (this depends on the matplotlib backend being used supporting this)table (
bool
) – Draw event table for supported instructionslabel (
bool
) – Label individual instructionsframechange (
bool
) – Add framechange indicatorschannels (
Optional
[List
[Channel
]]) – A list of channel names to plot
- 반환값
A matplotlib figure object of the pulse schedule
- 반환 형식
matplotlib.figure
-
property
duration
¶ Duration of this instruction.
- 반환 형식
int
-
flatten
()¶ Return itself as already single instruction.
- 반환 형식
Instruction
-
property
id
¶ Unique identifier for this instruction.
- 반환 형식
int
-
insert
(start_time, schedule, name=None)¶ Return a new
Schedule
withschedule
inserted withinself
atstart_time
.- 매개변수
start_time (
int
) – Time to insert the schedule scheduleschedule (
ScheduleComponent
) – Schedule to insertname (
Optional
[str
]) – Name of the new schedule. Defaults to name of self
- 반환 형식
Schedule
-
property
instructions
¶ Iterable for getting instructions from Schedule tree.
- 반환 형식
Tuple
[Tuple
[int
,Instruction
]]
-
property
name
¶ Name of this instruction.
- 반환 형식
str
-
property
operands
¶ Return instruction operands.
- 반환 형식
Tuple
-
property
phase
¶ Return the rotation angle enacted by this instruction in radians.
- 반환 형식
Union
[complex
,ParameterExpression
]
-
shift
(time, name=None)¶ Return a new schedule shifted forward by time.
- 매개변수
time (
int
) – Time to shift byname (
Optional
[str
]) – Name of the new schedule. Defaults to name of self
- 반환 형식
Schedule
-
property
start_time
¶ Relative begin time of this instruction.
- 반환 형식
int
-
property
stop_time
¶ Relative end time of this instruction.
- 반환 형식
int