Qiskit Pulse: Programming Quantum Computers Through the Cloud with Pulses
Thomas Alexander, Naoki Kanazawa, Daniel J. Egger, Lauren Capelluto, Christopher J. Wood, Ali Javadi-Abhari, David McKay
QQiskit Pulse: Programming Quantum Computers Through the Cloud with Pulses
Thomas Alexander, ∗ Naoki Kanazawa, ∗ Daniel J. Egger, LaurenCapelluto, Christopher J. Wood, Ali Javadi-Abhari, and David McKay IBM T.J. Watson Research Center, Yorktown Heights, NY 10598, USA IBM Research - Tokyo, 19-21 Nihonbashi Hakozaki-cho, Chuo-ku, Tokyo, 103-8510, Japan IBM Research - Z¨urich, S¨aumerstrasse 4, 8803 R¨uschlikon, Switzerland
The quantum circuit model is an abstraction that hides the underlying physical implementation ofgates and measurements on a quantum computer. For precise control of real quantum hardware, theability to execute pulse and readout-level instructions is required. To that end, we introduce QiskitPulse, a pulse-level programming paradigm implemented as a module within Qiskit-Terra [1]. Todemonstrate the capabilities of Qiskit Pulse, we calibrate both un-echoed and echoed variants of thecross-resonance entangling gate with a pair of qubits on an IBM Quantum system accessible throughthe cloud. We perform Hamiltonian characterization of both single and two-pulse variants of thecross-resonance entangling gate with varying amplitudes on a cloud-based IBM Quantum system.We then transform these calibrated sequences into a high-fidelity CNOT gate by applying pre andpost local-rotations to the qubits, achieving average gate fidelities of F = 0 .
981 and F = 0 .
979 forthe un-echoed and echoed respectively. This is comparable to the standard backend CNOT fidelityof F CX = 0 . I. INTRODUCTION
In quantum computing, information is stored and pro-cessed according to the laws of quantum mechanics [2].The primary quantum programming paradigm is the cir-cuit model. In this model, the underlying dynamics ofthe physical system implementing the quantum computerare abstracted as a sequence of unitary gate operationsand projective measurements applied to a set of qubits.Gates manipulate the states of qubits, while measure-ments extract classical information in the form of bit-strings, which encode the outcome of projective measure-ments of the qubits in a particular measurement basis.Qiskit is an open-source quantum computing frame-work designed to enable research on near-term quantumcomputers and their applications. It provides tools forcreating, manipulating and running quantum programson quantum systems independent of their underlyingtechnology and architecture. The standard programmingabstraction for a quantum circuit is a quantum assemblylanguage (QASM) such as OpenQASM [3] which Qiskitsupports [1] and many similar languages that have beendescribed in the literature [4, 5]. However, hardware isnot capable of natively implementing quantum instruc-tions and must compose these operations from the clas-sical stimulus avilable to control hardware.At the hardware level the time-dependent dynamicsof a quantum system interacting with applied controlfields is described by its Hamiltonian and the Schr¨odingerequation. Through careful engineering of applied clas-sical control fields a quantum system may be steered ∗ These two authors contributed equally;Corresponding author: [email protected] through a desired unitary evolution [6]. Superconductingtransmon qubits, for example, encode a qubit in a non-linear oscillator formed by a parallel circuit consisting ofa Josephson junction and capacitor, and may be manip-ulated by applying shaped microwave control pulses [7].Implementing the quantum circuit model on such an ar-chitecture requires compiling circuit instructions to a setof microwave control instructions, or pulses, which enactthe desired state-transformations and/or measurements.In the circuit domain, an atomic circuit instruction isagnostic to its pulse-level implementation on hardware.Extracting the highest performance out of quantum hard-ware requires the ability to craft a pulse-level instructionschedule, which cannot be done within the standard cir-cuit model. To enable pulse-level programming an in-struction set, OpenPulse [8], was developed to describequantum programs as a sequence of pulses, scheduledin time. We present within this paper a Python imple-mentation of OpenPulse,
Qiskit Pulse which adds to theQiskit compilation pipeline the capability to schedule aquantum circuit into a pulse program intermediate repre-sentation, perform analysis and optimizations, and thencompile to OpenPulse object code to execute on a quan-tum system.The various hardware architectures used for current-day quantum computing systems creates a need for apulse-level instruction set that may address most plat-forms at an abstract level, compatible with both com-mercial off-the-shelf and proprietary control instruments,including arbitrary waveform generators (AWG), signalgenerators, filters, amplifiers and digitizers [9]. To pro-gram such systems at the pulse-level in a hardware in-dependent manner requires the user-level instruction setto be target-compiled to the underlying system hardwarecomponents, each of which may have a unique instruc- a r X i v : . [ qu a n t - ph ] A p r tion set and programming model. Recent efforts to con-struct microarchitectures that conform to classical com-puter engineering paradigms [10–12] have programmingsemantics closely tied to the underlying microarchitec-ture. Compiling directly from the circuit model to targethardware obfuscates the underlying pulses that manipu-late the hardware removing a powerful degree of control.With Qiskit Pulse we enable the development of a com-mon and reusable suite of technology-independent quan-tum control techniques [6] that operate at the level ofanalog stimulus which may be remotely retargeted tocloud-based quantum computing systems. Paper outline —
In Sec. II we present our pulse pro-gramming model. We demonstrate the capabilities ofQiskit Pulse in Sec. III where we show Hamiltonian char-acterization of the two-qubit cross-resonance interaction,and calibration of a high-fidelity entangling gate, on acloud-based quantum computer available on the IBMQuantum Experience. We discuss how the readout ofquantum computers is incorporated in Qiskit Pulse inSec. IV and conclude in Sec. V. The source code anddata for the experiments within this paper has been madeavailable online [13].
II. QISKIT PULSE PROGRAMMING MODEL
In the standard quantum circuit model, the timeelapsed between operations is irrelevant as long as theorder of non-commuting gates is preserved [14]. How-ever, when controlling quantum hardware at the pulselevel, properly timing and synchronizing instructions iscrucial for accurately enacting quantum operations. Forinstance, users may create new gate definitions, charac-terize and correct for crosstalk on qubits neighboring in-teracting qubits, implement optimal control techniquessuch as GRAPE [15] or mitigate errors through Richard-son extrapolation [16–18].We envision that a classical microprocessor with anembedded pulse coprocessor will be responsible for con-trolling and measuring the quantum device. Within thiswork we only focus on describing a virtual executionmodel and limited set of instructions for the pulse co-processor which can be compiled to the instruction setarchitecture (ISA) of the underlying control hardware.Qiskit Pulse’s position in the predicted quantum com-puting compilation pipeline is demonstrated in Fig. 1.We expect that as quantum hardware continues to berefined these abstractions will be extended.Qiskit Pulse provides an open source, front-end im-plementation of the OpenPulse interface [8]. Third par-ties can fully integrate with Qiskit Pulse by implement-ing their own Qiskit provider [1] which is responsiblefor translating Qiskit Pulse programs to executable pro-grams on the provider-specific hardware which might in-clude components such as AWGs and digitizers. QiskitPulse programs are composed of pulses , channels , and in-structions which we present in the following subsections. FIG. 1: The envisioned quantum program representationsand their associated lowering compilation procedures.QASM programs may be built and optimized withinformation of the system topology, native gates, and errorrates, and then are scheduled into pulse programs by usingcalibrated native gate definitions. Pulse programs arecompiled to a processor-specific ISA through a target codegeneration procedure. The typical user is expected toprogram at the circuit level, whereas Qiskit Pulse enablesadvanced users to control at the pulse level.
A. Pulses A pulse is a time-series of complex-valued amplitudeswith a maximum unit norm, [ d , . . . , d n − ]. Each d j , j ∈ { , ..., n − } , is called a sample . Every system speci-fies a cycle-time of dt which is the finest time-resolutionexposed on the pulse coprocessor, and is typically definedby the sample rate of the coprocessor’s waveform gener-ators. Each sample in a pulse is output for one cycle, a timestep . All pulse durations and timesteps are definedand discretized dimensionlessly with respect to dt . Theideal output signal has amplitude D j = Re (cid:2) e i πfj dt + φ d j (cid:3) (1)at time j dt , where f and φ are a modulation frequencyand a phase. The pulse samples describe only the enve-lope of the produced signal which are then mixed up inhardware with a carrier signal defined by a frequency anda phase. To reduce encoding sizes we also allow hard-ware providers to define parametric pulse shapes. Forexample, one parametric pulse supported by IBM back-ends and made available through the Pulse library is the Gaussian pulse. It takes three parameters: an integer duration in terms of dt , a complex amplitude amp , andstandard deviation sigma . This parametric pulse can beinstantiated within Qiskit in the following way: from qiskit.pulse.pulse_lib import Gaussianduration = 128amp = 0.2sigma = 16gaussian_pulse = Gaussian(duration, amp, sigma) TABLE I: A summary of channels and the pulse instructions that are defined on them. Note that the
DriveChannel , MeasureChannel , and
ControlChannel are subtypes of
PulseChannel , whereas the
AcquireChannel , which cannot transmitstimulus pulses, is not. In the near term it is expected that the instruction set below will continue to be expanded.Channel Alias Description
PulseChannel - Generic transmit channel used to manipulate the quantumsystem. Current supported sub-types are
DriveChannel , MeasureChannel and
ControlChannel . DriveChannel d i Transmit channel connected to qubit i , with signals typicallymodulated at a frequency in resonance with qubit i . MeasureChannel m i Transmit channel connected to the readout component of qubit i . ControlChannel u i Transmit channel with signals typically associated with arbi-trary interaction terms in the Hamiltonian.
AcquireChannel a i Receive channel connected to the readout component of qubit i , capable of digitizing and acquiring data.Instruction Operands Description Play pulse: Pulse , channel: PulseChannel Output the waveform described by pulse on the channel . Delay duration: int , channel: Channel Idle the channel for the given duration . ShiftPhase phase: float , channel: PulseChannel Shift the phase of the channel by phase radians. SetFrequency frequency: float , channel: PulseChannel Set the frequency of the channel to frequency Hz.
Acquire duration: int , channel: AcquireChannel , register: Register Trigger the channel to collect data for the given duration ,and store the measurement result in a register . B. Channels
Hardware components are modeled with
Channel s.Channels label signal lines that either transmit or receivesignals between the control electronics and the quantumdevice. Each channel executes instructions from a first-in, first-out (FIFO) queue as outlined in subsection II C.Channels are constrained at target code generationtime to target hardware components, e.g., an AWG. Thecalibrated parameters of a channel, such as its frequency,and the pulses played on that channel, depend on thephysical properties of the targeted qubit. Therefore,channels are not interchangeable at the pulse abstrac-tion layer, i.e. permuting channels over qubits will notgive equivalent results. This highlights another differencebetween circuit and pulse instructions, the parameters ofgates in a quantum circuit do not depend on the physicalproperties of the targeted qubits. The qubits in a quan-tum circuit can therefore be interchanged without affect-ing the computational result as long as the topology ofthe device is taken into account and gate imperfectionsare ignored.There are several different channel types, and eachmay support a different instruction set. A summary ofchannels and their descriptions is provided in Table. I.The channel type, and thus the supported instructions,is determined by the effect of the channel on the quan- tum device. For example, a
PulseChannel models theoutput of a control field α k ( t ) in a system Hamiltonianˆ H ( t ) = ˆ H sys + (cid:80) k α k ( t ) ˆ H k which is composed of time-independent system and time-dependent control terms.The Hamiltonian term for a given channel, ˆ H k in generalmay be arbitrary, but is typically associated with thesubtype of the respective pulse channel that is assignedat system configuration time.The sub-types of PulseChannel s are
DriveChannel s, MeasureChannel s, and
ControlChannel s. Each pulsechannel maintains an instruction writeable frequency f and phase φ , which modify the channel output as perEq. (1). Tracking the phase in this way enables the im-plementation of virtual Z-gates [19, 20]. Qubit drive andreadout pulses are respectively assigned to
DriveChan-nel s and
MeasureChannel s, see e.g., the drive pulses ondrive channels d0 and d1 in Fig. 2. Their index is triviallymapped to the address of the target qubit. The Con-trolChannel implements any remaining control fields,such as coupler drives or two-qubit drives as depictedby u2 in Fig. 2. The backend hardware may choose tomap multiple PulseChannel s to the same control unit inthe system, which enables tracking a unique phase foreach channel. For example, in the IBM Quantum sys-tems used to perform the experiments within this paper,every
DriveChannel may share an AWG with multiple
ControlChannel s, each of which have a frequency andphase adjusted to track that of their respectively cou-pled qubits, enabling the implementation of two-qubitgates as demonstrated in Sec. III.The
AcquireChannel is used to communicate to thesystem when qubit readout data must be acquired. Itis not associated with a control term in the Hamiltonianand does not output stimulus to the quantum system.Data collected on these channels are used to determinethe qubit state, see Sec. IV for more details.For convenience we alias drive, measurement, con-trol and acquisition channels as { d , . . . , d n q − } , { m , . . . , m n q − } , { u , . . . , u n u − } , and { a , . . . , a n q − } respectively, where n q is the number of qubits and n u isthe number of arbitrary control channels of the system. C. Instructions and Execution Model
Instruction s may be scheduled on
Channel s to ma-nipulate the quantum system. Pulse instructions have asoperands channels and instruction-dependent constants.All pulse instructions have a fixed, deterministic dura-tion, which may be specified either implicitly or explic-itly. Instructions are executed with an allocation and trigger timing model in which instructions are loaded intoa FIFO queue unique to each channel and then executionis initialized synchronously across all channels with anexternal trigger signal. Consequently the absolute startand end of every pulse instruction may be scheduled atcompile-time across channels with hard real-time dead-lines relative to the external trigger signal. Instructionsmay have multiple channels as operands causing an exe-cution dependency. In this case channels stall executionuntil all operand channels are available. We now outlinethe different types of instructions, which are summarizedin Table I.Every channel supports a
Delay instruction which hasas operands a duration which is specified as a numberof cycles, and a target channel. The channel will idle forthe duration of the instruction.The
Play instruction allows users to play a pulse ona target
PulseChannel with a frequency and phase setwith the
ShiftPhase and
SetFrequency instructions.The
ShiftPhase instruction has an implicit duration ofzero and accepts an input float phase and
PulseChan-nel . The
ShiftPhase will shift the phase φ of the targetchannel by phase radians. This relative shift persistson the channel from the time of the instruction, allow-ing the phase of a channel to be accumulated throughoutan experiment. The SetFrequency instruction has animplicit duration of zero and accepts an input float fre-quency and a
PulseChannel . This instruction will setthe frequency f of all proceeding pulses on the targetchannel to frequency Hz. Like any other instruction,
SetFrequency can be used on a single channel multi-ple times within a schedule, subject to the instantaneousbandwidth of the hardware. It can therefore be used, forexample, to measure the anharmonicity of a transmon qubit.The
Acquire instruction has as operands a duration ,an
AcquireChannel , and a classical register in whichto store the observed result. This instruction signals tothe measurement unit to begin acquiring data, and forhow long. Each
Acquire instruction should align witha corresponding measurement stimulus
Play instructionto induce a measurement of the target qubit. An acqui-sition channel outputs an unsigned integer value N intothe result register. For the standard two-level qubit, thiswill be a single bit { , } .If a measurement stimulus pulse measures multi-ple qubits, as is typical for multiplexed measurementschemes [21, 22], an acquisition instruction must be syn-chronously scheduled for each of the measured qubits. Inhardware, each AcquireChannel is constrained to a mea-surement chain which usually includes data acquisition,filtering, kerneling, and state discrimination. To accom-modate the heterogeneous readout schemes encounteredin hardware we defined three levels of readout data andhow to convert between them, see Sec. IV.The set of operations in Qiskit Pulse should have suffi-cient generality to program a pulse coprocessor for an ar-bitrary quantum computing system in the time-domainand be embedded within a larger instruction set thatmight include both classical control flow and a tradi-tional gate-level description of a quantum program withinstructions being implemented by a lowering procedureto pulse instructions. The benefit of this approach isthat a single software stack may provide the middle-endfor the rapidly developing heterogeneous quantum com-puting platforms.
D. The Pulse Schedule
The pulse
Schedule is the representation of a pulseprogram in Qiskit Pulse and is an ordered collectionof scheduled pulse instructions. The pulse schedule isequivalent to a basic block [23] in a classical computa-tion with deterministic instruction durations. To con-struct a pulse schedule
Instruction s may be appendedas demonstrated in the example below, which preparesqubit 0 in the | (cid:105) state and then measures it: sched = Schedule(name='excited_state') x180 = Drag(x_dur, x_amp, x_sigma, x_beta)measure = GaussianSquare(m_dur, m_amp, m_sigma, m_square_width) sched += Play(x180, DriveChannel(0)) sched += Play(measure, MeasureChannel(0)) sched += Acquire(AcquireChannel(0), MemorySlot(0)) counts = execute(sched, backend).result().get_counts() E. Scheduling
Quantum circuits and pulse schedules are both repre-sentations of a quantum program. The Qiskit transpiler optimizes quantum circuits according to the properties ofthe targeted quantum system such as the device topol-ogy, the native gate set, and the gate fidelities. A sched-uler compiles a circuit program to a pulse program, asdepicted in Fig. 1. Scheduling requires system depen-dent information, most notably the definitions of the na-tive gates in terms of scheduled pulse instructions. Thescheduler therefore requires a quantum circuit to be tran-spiled to the native gate set of the target system prior toscheduling. Furthermore, during scheduling it is crucialto maintain the relative timing of groups of pulse instruc-tions calibrated to implement an element of the nativegate set. For instance, the cross-talk cancellation tone ofa cross-resonance gate applied to the target qubit mustbe aligned with the pulse that drives the control qubit atthe frequency of the target qubit [24].The input circuit provides only implicit topologicaltiming constraints, which allows the scheduler to arbi-trarily resolve the remaining free time-alignment param-eters in the output schedule. The scheduler’s behavior inresolving free parameters is set by specifying a schedulingmethod or policy . By default the Qiskit scheduler followsan “as-late-as-possible” scheduling method [1]. This willschedule individual gates as late as possible while min-imizing the deadtime between instructions on the samechannel. This scheduling routine mitigates T and T -decay errors by maximizing the time that qubits willspend in their initial ground state prior to the first pulse,while also minimizing the time between the last pulseand the measurement. Fig. 2 provides a code snippet forscheduling a quantum circuit into a pulse schedule usingQiskit, and visually demonstrates the correspondence be-tween the circuit instructions input to the scheduler andthe calibrated output pulse sequences. This output is eas-ily generated for both the QuantumCircuit and
Sched-ule with the draw method.Qiskit Pulse users may create pulse programs to re-place the default pulse programs of the native gate setprovided by the backend and pass them as an argumentto the scheduler. This gives users low level control overthe gate definitions used at scheduling time. They mayspecify their own scheduling policies to dynamically ag-gregate gates and generate composite pulse sequencessuch as would be required to implement the compilationtechniques described by Shi et. al. [25]. (a) qc = QuantumCircuit(2, 2)qc.h(1)qc.cx(1, 0)qc.measure([0, 1], [0, 1])qc = transpile(qc, backend)pulse_schedule = schedule(qc, backend) qc.draw()pulse_schedule.draw()
FIG. 2: (a) Qiskit code to construct a quantum circuit thatprepares and measures a Bell state and then schedules thecircuit to produce an equivalent pulse schedule. Here, h is aHadamard gate, cx a CNOT gate and backend is adescription of a quantum system received from a hardwareprovider. (b) and (c) Visualization of the mapping betweencircuit instructions (b) and the composite pulse sequencesthat will implement the circuit elements (c). Pulse envelopesfilled with bright and dark colors respectively represent thereal (in-phase) and imaginary (quadrature-phase)components of the input control waveform. The circulararrows represent a phase shift. The gray shadow on a0 and a1 indicates the data acquisition trigger for the ADC whichis synchronized with the measurement stimulus pulse. Thesemappings are automatically provided by the hardwarebackend, but may be overridden by the user as wedemonstrate in section III. The scheduler will align the gatesin time according to the selected scheduling policy. III. DEMONSTRATION OF ACROSS-RESONANCE ENTANGLING GATE
To highlight how Qiskit Pulse can enable tasks thatcannot be done in the circuit model we perform standardquantum process tomography (QPT) [26] of both echoedand un-echoed cross-resonance (CR) [27] pulses for vary-ing amplitudes on a cloud-based quantum computer. Weuse the tomography data to calculate the coefficients ofthe effective CR Hamiltonian as a function of the pulseamplitude, and show how to implement a high-fidelityControlled-NOT (CNOT) gate based on the calibratedCR pulse.
A. The Cross-Resonance Interaction
The CR gate is a microwave-only two-qubit entanglinggate for fixed-frequency dispersively coupled qubits [27].It is physically realized by driving the control qubit withmicrowave pulses at the frequency of the target qubitto stimulate the evolution of an effective ZX interactionHamiltonian, where Z and X are the Pauli- Z and X operators of the driven control qubit and the target qubit,respectively.The two-transmon system driven by the CR pulse is de-scribed by a time-dependent Hamiltonian H CR ( t ) which,in the absence of noise, results in the unitary evolu-tion U CR . We can approximate the evolution as beinggenerated by a time-independent Hamiltonian H CR us-ing the perturbative method presented in Ref [28] whichshowed good agreement with experimental results forsingle-pulse and echoed CR gates [24]. This technique ap-proximates the time-dependent control qubit drive pulsewith a constant amplitude pulse and block-diagonalizesthe resulting Hamiltonian to second order. Using thisapproach the CR evolution is approximated by U CR ≈ exp (cid:0) − it CR H CR (cid:1) where H CR = Z ⊗ B I ⊗ C B = ω ZI I + ω ZX X + ω ZY Y + ω ZZ ZC = ω IX X + ω IY Y + ω IZ Z. If the ZX term could be isolated, the resulting unitarygate would be a two-qubit rotation U ZX ( θ ZX ) = exp (cid:18) − iθ ZX ZX (cid:19) , (3)where the rotation angle θ ZX depends on the strengthand duration of the pulse applied to the control qubit.The unitary gate U ZX ( π/
2) is a perfect entangler – it canbe used to generate a maximally entangled state from aseparable input state and is locally equivalent to a CNOTgate [29]. Therefore, combined with arbitrary single-qubit operations, it is sufficient for universal quantumcomputation.The terms in addition to ω ZX ZX in H CR lead to co-herent errors and divergences from the ideal target uni-tary in Eq. (3). Characterizing the strength of theseterms and designing pulse sequences that suppress themis necessary to create high fidelity entangling operations.The standard techniques used to suppress these termsare multi-pulse echos and cancellation tones [24]. B. Constructing and Calibrating aCross-Resonance Gate
The experiments presented within this section are exe-cuted on the twenty-qubit IBM Quantum system ibmq -almaden to take advantage of higher resolution wave-forms with a cycle-time dt = 0 .
222 ns afforded by in-frastructure under test on that system at the time ofwriting. We use qubit 1 and qubit 0 as the control andtarget qubits, respectively. The resonance frequency andanharmonicity of the control qubit are f = 4 .
972 GHzand δ = − . f = 4 .
857 GHz and δ = − . GaussianSquare pulse, i.e.a square pulse with Gaussian-shaped rising and fallingedges. The pulse has a square amplitude A , a phase φ = − .
166 rad . , discussed in Appendix B, and a totalduration t CR = 848 dt = 184 . dt and the Gaussian risingand falling edges last 64 dt and have a 32 dt standarddeviation. The pulse duration is chosen so that a π/ Con-trolChannel u1 , see Fig. 3(a). The CR2 sequence con-sists of two CR pulses with opposite phases on u1 , andtwo additional single-qubit pulses on the DriveChanneld1 , one after each CR pulse, see Fig. 3(b). This echosequence refocuses unwanted terms in the interactionHamiltonian [24]. The following code exemplifies howto build the CR2 schedule in Qiskit Pulse. sched = Schedule(name='cr2') cr_p = GaussianSquare(cr_dur, amp, sigma, square_width)cr_m = GaussianSquare(cr_dur, -amp, sigma, square_width)x180 = Drag(pi_dur, pi_amp, pi_sigma, pi_beta) sched += Play(cr_p, ControlChannel(1))sched += Delay(t_cr, DriveChannel(1))sched += Play(x180, DriveChannel(1))sched += Play(cr_m, ControlChannel(1))sched += Delay(t_cr, DriveChannel(1))sched += Play(x180, DriveChannel(1))
C. Quantum Process Tomography of the CR Gate
To study the dynamics of the CR pulse, we performstandard QPT [26] of the CR1 and CR2 pulse sequencesfor a range of CR pulse amplitudes using the tomographymodule of Qiskit Ignis [31]. Given a d -dimensional noisy ( . )( . )( . ) ( - . )( - . )( - . ) d0 x10.0 ( . )( . )( . ) ( . )( - . )( . ) d1 x10.0 ( . )( . )( . ) ( - . )( - . )( - . ) u1 x3.0 (a) X +/2 X /2 X +/2 X /2 X +/2 X /2 X +/2 X /2 CR /2 ( . )( . )( . ) ( - . )( - . )( - . ) d0 x10.0 ( - . )( . )( - . ) ( - . )( - . )( . ) d1 x10.0 ( . )( . )( . ) ( - . )( - . )( - . ) u1 x3.0 (b) X +/2 X /2 X +/2 X /2 X X X +/2 X /2 X +/2 X /2 CR +/4 CR /4 FIG. 3: CNOT pulse
Schedule s implemented by the CRgates with the local fidelity optimization. Local operationsare realized by X ± π/ pulses with three virtual-Z gates beforeand after CR gates on the DriveChannel s d0 and d1 . TheCR1 and CR2 gate are surrounded by red boxes. (a)CR1-based CNOT gate composed of a single CR pulse CR π/ on the ControlChannel u1 . (b) CR2-based CNOTgate composed of two CR pulses CR ± π/ on u1 with echopulses X + π applied on d1 . Measurement and acquisitionpulses are not shown. The numbers below the channelaliases show an amplitude scaling factor used for plotting.The 12 circular arrows topped by floating point numbersrepresent phase shifts in units of radians and each phaseshift corresponds to an optimization parameter Θ i . Notethat phase shifts on u1 reflect those in d0 to synchronize theframe of both channels; they are automatically inserted bythe pulse scheduler. quantum channel E , QPT reconstructs the Choi -matrixΛ E which is the positive-semidefinite matrix defined byΛ E ≡ (cid:80) d − i =0 | i (cid:105)(cid:104) i | ⊗ E ( | i (cid:105)(cid:104) i | ) [32].The QPT circuits, shown in Fig. 4, use the single-qubit gates { U prep i } i =0 and { U meas i } i =0 to prepare the re-quired input states and measurement bases, respectively.We prepare each qubit in the states | (cid:105) , | (cid:105) , √ ( | (cid:105) + | (cid:105) ) , √ ( | (cid:105) + i | (cid:105) ) and measure in the X, Y and Z bases.Our amplitude-dependent CR pulse is inserted into theQPT circuits in Fig. 4 as a custom gate that the Qiskitpulse scheduler maps to a pulse program, see appendixA 1. Each of the 144 two-qubit QPT pulse schedules is ex- ecuted 2048 times to estimate the measurement outcomeprobabilities of each qubit. The details of the readoutprocess are presented in Sec. IV. We correct for mea-surement errors using the readout error mitigation tech-niques [33] implemented in Qiskit Ignis. Readout errormitigation for two qubits requires four additional sched-ules which were interleaved with the QPT schedules.The reconstructed Choi-matrix E CR ( A ) for the noisy gatewas obtained from the convex-optimization QPT fitter inQiskit Ignis for each value of the CR pulse amplitude A .This fitter uses maximum likelihood estimation to findthe completely-positive trace-preserving process that ismost likely to fit the measured data after correction forreadout errors. FIG. 4: Process tomography circuits for the E CR ( A ) pulseembedded as a user-defined custom gate. We use the fitted Choi-matrices E CR ( A ) to computeestimates of the coefficients of the effective CR Hamil-tonian in Eq. (2). The method is described in Ap-pendix C. We then fit these coefficients to a third ordermodel to find the CR pulse amplitude that implements a θ ZX = π/ . ± . ± D. Optimizing CNOT Fidelity with LocalOperations
To estimate the highest fidelity of a maximally entan-gling gate that the CR gate can be transformed into,we optimize the average gate fidelity F over all single-qubit pre and post-rotation angles Θ on both the controland target qubits, see appendix D. The optimized fideli-ties for the measured CR1 and CR2 process maps are F max = 0 .
992 and F max = 0 . F = 0 . F = 0 .
979 for the CR1 and CR2 gates, respectively.These fidelities are comparable to the measured fidelityof F = 0 .
984 of the standard CNOT gate provided by ibmq almaden which is implemented using a highly-tuned C o e ff i c i e n t ij ( M H z ) (a) ZXZYZZZI (x0.01) IXIYIZ A (arb. units)0.00.51.01.5 C o e ff i c i e n t ij ( M H z ) (b) ZXZYZZZI IXIYIZ A (MHz) /40/4/23 /4 R o t a t i o n a n g l e = ij t C R R o t a t i o n a n g l e = ij t C R FIG. 5: CR Hamiltonian coefficients reconstructed followingthe procedure described in Appendix C, plotted against thetime-averaged CR pulse amplitude A . The blue solid linesare the fits to the third order expansion of the CRHamiltonian in Eq. (C6). The rotation angle is estimated by θ = n CR ω ij t CR where n CR is the number of CR pulses.Star-shaped markers indicate operating points of CNOTgates. (a) Measured coefficients of the CR1 sequence. The ZI coefficient is several orders of magnitude larger thanother Hamiltonian terms and is displayed with a 1/100 scalein (a) whereas in (b) it is approximately zeroed by the echopulse in CR2 and is therefore not scaled. calibration process including an echo sequence, cancella-tion tone, and closed-loop amplitude calibration [24]. Itis worth noting that the CNOT gates demonstrated inthis paper have no cancellation tone and all parametersare obtained with open-loop calibration. In the sameway, we can create custom basis gates which may en-able hardware-efficient implementations of quantum al-gorigthms. IV. READOUT AT THE PULSE LEVEL
Readout is the process through which the qubit state isprojected onto | (cid:105) or | (cid:105) and a corresponding classical bitis obtained. This process is modeled by a readout chainin which the observed signal undergoes a series of succes-sive transformations. Qiskit Pulse supports returning theoutput data of each measurement layer to the program- mer. The lowest level accessible to the user, level-zero or raw data, typically corresponds to a digitized time-seriessignal. A kernel method applied to the signal data re-moves its time dependency and results in a complex valuewhich encodes the qubit state (level-one kerneled data).Finally, the classified qubit state (level-two disciminated data), is obtained by applying a discriminator to the ker-neled data. For a superconducting qubit processor, thetime traces are complex vectors representing the digi-tized readout signals reflected or transmitted from thereadout resonators [9]. The kernel method, such as theboxcar integrator used within this paper, outputs pointsin the IQ plane which a discriminator may use to classifythe qubit’s state.Qiskit users are now able to retrieve data from differ-ent levels in the readout-chain by specifying the readoutdata-level, i.e., zero, one, or two. For example, users ofIBM Quantum processors may request the kerneled datain the form of IQ points so that they may implement theirown discriminator. To be sure, Qiskit users that do notwish to implement their own kernels and discriminatorscan request level-two data therefore using the built-inreadout scheme. The readout methodology that we im-plemented reflects the typical data flow during readoutin hardware and should allow users to test novel readoutschemes [36] as well as accommodate different quantumcomputing architectures. FIG. 6: IQ data and the decision boundary for thediscriminators of qubits 16, shown in (a), and 17, shown in(b), that use only the IQ data of their respective qubit.
Aside from counting qubit states, discriminators mayalso be used to infer properties of the system and bench-mark it. We illustrate this by investigating spurious cor-relations in the qubit readout of the IBM Quantum sys-
TABLE II: The measurement assignment fidelity F a = 1 − (Pr[0 |
1] + Pr[1 | / cal 00 and cal 01 while thediscriminator Both-Q16 was fitted with all four calibrationschedules: cal 00 , cal 01 , cal 10 and cal 11 . Theconfidence intervals were obtained using Jeffreys interval ata 95% confidence level. Qubit discriminatedQ16 Q17Data used Single 89 . +1 . − . % 91 . +1 . − . %Both 89 . +1 . − . % 90 . +1 . − . % tem ibmq singapore selected based on its availabilityat the time of the experiment. From ibmq singapore we randomly selected qubits 16 and 17 to study as theyare a neighboring pair of qubits on the chip. Kerneleddata was measured for four calibration schedules, named cal ij with i, j ∈ { , } . Here, to prepare the state | ij (cid:105) a π -pulse is applied to qubit i if i = 1 and simultaneously toqubit j if j = 1. The single-qubit pulses are followed bythe measurement stimulus pulses and acquisition instruc-tions for all qubits. For each qubit we fit two discrimina-tors based on linear discriminant analysis [36]. For qubit i , one discriminator is fitted to a subset of the calibrationdata in which the other qubit is always in state | (cid:105) , shownin Fig. 6, while the other discriminator is fitted using allfour calibration schedules. We expect that the discrimi-nator that uses all the calibration data will perform bestif there is measurement cross-talk. The fidelities of thefitted discriminators, shown in Tab. II, suggest that thereis no significant cross-talk between the qubits that wemeasured. This is verified by t -tests on sixteen Pearsons’correlation coefficients r j ( ES i,X , GS i,Y ) between ES i,X and GS i,Y which correspond to the X, Y ∈ { I , Q } data ofqubit i in state j ∈ { , } when the other qubit is in theexcited state ( ES , i.e., | (cid:105) ) and ground state ( GS , i.e., | (cid:105) ), respectively. These correlation coefficients are sen-sitive to cross-talk between the two qubits. With 1024degrees of freedom, i.e., measurement shots, we do notobserve any statistically significant correlation at the 95%confidence level. This implies that it is sufficient to fitdiscriminators using only a ground and excited referenceschedule for each qubit and consequently only 2 n calibra-tion schedules are required for n qubits when there is nocross-talk rather than the 2 n calibration schedules thatwould be required with all-to-all measurement crosstalk. V. CONCLUSIONS AND FUTURE WORK
Rapid development in quantum computing has led topublicly available quantum computers with an increas- ing number of qubits, improved connectivity, and greatercontrol. Prior to this work, publicly available quantumprogramming frameworks for cloud-based quantum com-puters have been at the relatively high-level of the circuitmodel, or implementation-specific, thus limiting their ap-plication. In the near-term, pulse-level control is desiredto extract as much quantum volume as possible from thehardware by experimenting with novel control and char-acterization schemes [37–39].We have introduced Qiskit Pulse, an implementationof the virtual pulse-level programming model, OpenPulse[8]. We have demonstrated that the Qiskit circuit sched-uler can target pulse instructions and that physical super-conducting qubit hardware can interpret these instruc-tions to execute useful programs. By embedding ourpulse programming instruction set in Qiskit we have inte-grated gate-level quantum programs and classical pulsestimulus, exposing a new level of hardware control toQiskit users. The benefit that pulse control providesquantum programmers was demonstrated by calibratinga cross-resonance pulse on a cloud-based quantum com-puter and embedding it as a gate within the standardcircuit programming model and characterizing this user-defined gate using quantum process tomography.Giving users pulse-level access to current-day quantumcomputers will allow them to explore techniques such aserror mitigation and dynamical decoupling schemes thatcannot be investigated at the circuit level. In the fu-ture we will explore embedding the pulse programmingmodel as a coprocessor within a classical virtual instruc-tion set architecture that supports classical arithmeticand control-flow [40]. We will also investigate extensionsto the pulse programming model such as defining specialpurpose registers to track phase across multiple channelswhich would reduce the number of required
PulseChan-nel s and enable simpler tracking of shared phase for com-posite gates. We would then use these capabilities to ex-plore the implementation of active error-correcting codes,and promising variational quantum-classical algorithmssuch as the variational quantum eigensolver [41–43].
ACKNOWLEDGEMENTS
We thank Blake Johnson for insightful discussions. Wethank Andrew Wack and John Lemek for providing sys-tem access and deployments.0 [1] H´ector Abraham and et al. Qiskit: An open-sourceframework for quantum computing, 2019.[2] Michael A. Nielsen and Isaac L. Chuang.
Quantum Com-putation and Quantum Information
The European Physical Journal D , 69(12):279,Dec 2015.[7] Jens Koch, Terri M. Yu, Jay Gambetta, A. A. Houck,D. I. Schuster, J. Majer, Alexandre Blais, M. H. Devoret,S. M. Girvin, and R. J. Schoelkopf. Charge-insensitivequbit design derived from the cooper pair box.
Phys.Rev. A , 76:042319, Oct 2007.[8] David C. McKay, Thomas Alexander, Luciano Bello,Michael J. Biercuk, Lev Bishop, Jiayin Chen, Jerry M.Chow, Antonio D. Corcoles, Daniel J. Egger, StefanFilipp, Juan Gomez, Michael Hush, Ali Javadi-Abhari,Diego Moreda, Paul Nation, Brent Paulovicks, ErickWinston, Christopher J. Wood, James Wootton, andJay M. Gambetta. Qiskit backend specifications forOpenQASM and OpenPulse experiments, 2018.[9] Philip Krantz, Morten Kjaergaard, Fei Yan, Terry P. Or-lando, Simon Gustavsson, and William D. Oliver. Aquantum engineer’s guide to superconducting qubits.
Ap-plied Physics Reviews , 6, 2019.[10] X. Fu, M. A. Rol, C. C. Bultink, J. van Someren,N. Khammassi, I. Ashraf, R. F. L. Vermeulen, J. C.de Sterke, W. J. Vlothuizen, R. N. Schouten, C. G. Al-mudever, L. DiCarlo, and K. Bertels. An experimentalmicroarchitecture for a superconducting quantum pro-cessor. In
Proceedings of the 50th Annual IEEE/ACMInternational Symposium on Microarchitecture , MICRO-50 ’17, pages 813–825, New York, NY, USA, 2017. ACM.[11] Anastasiia Butko, George Michelogiannakis, SamuelWilliams, Costin Iancu, David Donofrio, John Shalf,Jonathan Carter, and Irfan Siddiqi. Understandingquantum control processor capabilities and limitationsthrough circuit characterization, 2019.[12] Colm A. Ryan, Blake R. Johnson, Diego Rist, BrianDonovan, and Thomas A. Ohki. Hardware for dynamicquantum computing.
Review of Scientific Instruments ,88(10):104703, 2017.[13] Thomas Alexander, Naoki Kanazawa, Daniel J. Egger,Lauren Capelluto, Christopher J. Wood, Ali Javadi-Abhari, and David McKay. Notebooks and Datafor “Qiskit-Pulse: Programming Quantum ComputersThrough the Cloud with Pulses”. February 2020. doi: 10.5281/zenodo.3751565.[14] Tzvetan S. Metodi, Darshan D. Thaker, Andrew W.Cross, Frederic T. Chong, and Isaac L. Chuang. Schedul-ing physical operations in a quantum information proces-sor. In
Quantum Information and Computation IV , vol-ume 6244, page 62440T. International Society for Opticsand Photonics, May 2006.[15] Navin Khaneja, Timo Reiss, Cindie Kehlet, ThomasSchulte-Herbrggen, and Steffen J. Glaser. Optimal con-trol of coupled spin dynamics: design of NMR pulse se-quences by gradient ascent algorithms.
Journal of Mag-netic Resonance , 172(2):296 – 305, 2005.[16] Kristan Temme, Sergey Bravyi, and Jay M. Gambetta.Error mitigation for short-depth quantum circuits.
Phys.Rev. Lett. , 119:180509, Nov 2017.[17] Lewis Fry Richardson and J. Arthur Gaunt. VIII. The de-ferred approach to the limit.
Philosophical Transactionsof the Royal Society of London. Series A, Containing Pa-pers of a Mathematical or Physical Character , 226(636-646):299–361, January 1927.[18] Abhinav Kandala, Kristan Temme, Antonio D. C´orcoles,Antonio Mezzacapo, Jerry M. Chow, and Jay M. Gam-betta. Error mitigation extends the computational reachof a noisy quantum processor.
Nature , 567:491–495, 2019.[19] David J. Lurie. Numerical design of composite radiofre-quency pulses.
Journal of Magnetic Resonance (1969) ,70(1):11–20, October 1986.[20] David C. McKay, Christopher J. Wood, Sarah Sheldon,Jerry M. Chow, and Jay M. Gambetta. Efficient Z gatesfor quantum computing. Phys. Rev. A , 96:022330, Aug2017.[21] Evan Jeffrey, Daniel Sank, J. Y. Mutus, T. C. White,J. Kelly, R. Barends, Y. Chen, Z. Chen, B. Chiaro,A. Dunsworth, A. Megrant, P. J. J. O’Malley, C. Neill,P. Roushan, A. Vainsencher, J. Wenner, A. N. Cleland,and John M. Martinis. Fast accurate state measure-ment with superconducting qubits.
Phys. Rev. Lett. ,112:190504, May 2014.[22] Johannes Heinsoo, Christian Kraglund Andersen, AntsRemm, Sebastian Krinner, Theodore Walter, YvesSalath´e, Simone Gasparinetti, Jean-Claude Besse, An-ton Potoˇcnik, Andreas Wallraff, and Christopher Eichler.Rapid high-fidelity multiplexed readout of superconduct-ing qubits.
Phys. Rev. Applied , 10:034040, Sep 2018.[23] Keith Cooper and Linda Torczon.
Engineering a Com-piler . Morgan Kaufmann, San Francisco, 1 edition edi-tion, November 2003.[24] Sarah Sheldon, Easwar Magesan, Jerry M. Chow, andJay M. Gambetta. Procedure for systematically tuningup cross-talk in the cross-resonance gate.
Phys. Rev. A ,93:060302, Jun 2016.[25] Yunong Shi, Nelson Leung, Pranav Gokhale, Zane Rossi,David I. Schuster, Henry Hoffmann, and Frederic T.Chong. Optimized Compilation of Aggregated Instruc-tions for Realistic Quantum Computers. In
Proceedings ofthe Twenty-Fourth International Conference on Architec-tural Support for Programming Languages and OperatingSystems , ASPLOS ’19, pages 1031–1044, Providence, RI,USA, April 2019. Association for Computing Machinery.[26] M. Mohseni, A. T. Rezakhani, and D. A. Lidar.Quantum-process tomography: Resource analysis of dif- ferent strategies. Phys. Rev. A , 77:032322, Mar 2008.[27] Jerry M. Chow, A. D. C´orcoles, Jay M. Gambetta, ChadRigetti, B. R. Johnson, John A. Smolin, J. R. Rozen,George A. Keefe, Mary B. Rothwell, Mark B. Ketchen,and M. Steffen. Simple all-microwave entangling gate forfixed-frequency superconducting qubits.
Phys. Rev. Lett. ,107:080502, Aug 2011.[28] Easwar Magesan and Jay M. Gambetta. Effective hamil-tonian models of the cross-resonance gate, 2018.[29] Jun Zhang, Jiri Vala, Shankar Sastry, and K. BirgittaWhaley. Geometric theory of nonlocal two-qubit opera-tions.
Phys. Rev. A , 67:042313, Apr 2003.[30] D. Willsch, M. Nocon, F. Jin, H. De Raedt, andK. Michielsen. Gate-error analysis in simulations of quan-tum computers with transmon qubits.
Phys. Rev. A ,96(6):062302, 2017.[31] IBM. Qiskit Ignis. https://github.com/Qiskit/qiskit-ignis , 2019. Accessed: 2019-12-31.[32] Christopher J. Wood, Jacob D. Biamonte, and David G.Cory. Tensor networks and graphical calculus for openquantum systems.
Quant. Inf. Comp. , 15:0579–0811,2015.[33] A Dewes, FR Ong, V Schmitt, R Lauro, N Boulant,P Bertet, D Vion, and D Esteve. Characterization of atwo-transmon processor with individual single-shot qubitreadout.
Phys. Rev. Lett. , 108(5):057002, 2012.[34] The general single-qubit gate is built from a pair of π/ i ,Θ j , and Θ k .[35] Easwar Magesan, J. M. Gambetta, and Joseph Emer-son. Scalable and Robust Randomized Benchmarking ofQuantum Processes. Phys. Rev. Lett. , 106(18):180504,May 2011.[36] Easwar Magesan, Jay M. Gambetta, A. D. C´orcoles, andJerry M. Chow. Machine learning for discriminating quantum measurement trajectories and improving read-out.
Phys. Rev. Lett. , 114:200501, May 2015.[37] Lev Bishop, Sergey Bravyi, Andrew W. Cross, Jay M.Gambetta, and John A. Smolin. Quantum Volume. 2017.[38] Gregory A. L. White, Charles D. Hill, and Lloyd C. L.Hollenberg. Performance optimisation for drift-robust fi-delity improvement of two-qubit gates, 2019.[39] Max Werninghaus, Daniel J. Egger, Federico Roy, ShaiMachnes, Frank K. Wilhelm, and Stefan Filipp. Leakagereduction in fast superconducting qubit gates via optimalcontrol, 2020.[40] Vikram Adve, Chris Lattner, Michael Brukman, AnandShukla, and Brian Gaeke. LLVA: A low-level virtual in-struction set architecture. In
Proceedings of the 36th An-nual IEEE/ACM International Symposium on Microar-chitecture , MICRO 36, pages 205–, Washington, DC,USA, 2003. IEEE Computer Society.[41] Kyungjoo Noh and Christopher Chamberland. Fault-tolerant bosonic quantum error correction with thesurface-GKP code, 2019.[42] Abhinav Kandala, Antonio Mezzacapo, Kristan Temme,Maika Takita, Markus Brink, Jerry M. Chow, andJay M. Gambetta. Hardware-efficient variational quan-tum eigensolver for small molecules and quantum mag-nets.
Nature , 549(7671):242246, Sep 2017.[43] M. Ganzhorn, D.J. Egger, P. Barkoutsos, P. Ollitrault,G. Salis, N. Moll, M. Roth, A. Fuhrer, P. Mueller, S. Wo-erner, I. Tavernelli, and S. Filipp. Gate-efficient simula-tion of molecular eigenstates on a quantum computer.
Phys. Rev. Applied , 11:044092, Apr 2019.[44] Sebastian Krinner, Simon Storz, Philipp Kurpiers, PaulMagnard, Johannes Heinsoo, Raphael Keller, Janis Lue-tolf, Christopher Eichler, and Andreas Wallraff. En-gineering cryogenic setups for 100-qubit scale super-conducting circuit systems.
EPJ Quantum Technology ,6(1):2, 2019.
Appendix A: Programming with Qiskit Pulse1. Performing Quantum Process Tomography
The code example below demonstrates how the quantum process tomography (QPT) schedules for the CR1 usedin Sec. III are created with Qiskit Pulse. from qiskit import transpile, schedule from qiskit.circuit import QuantumRegister, QuantumCircuit, Gate from qiskit.pulse import Schedule, Play, ControlChannel from qiskit.pulse.pulse_lib import GaussianSquare from qiskit.ignis.verification.tomography import process_tomography_circuits from qiskit.test.mock import FakeAlmaden gate_name = 'cr1' duration = 848 sigma = 32 square_width = 64 amp = 0.2 backend = FakeAlmaden() config = backend.configuration() defaults = backend.defaults() basis_gates = config.basis_gates inst_map = defaults.instruction_schedule_map cr1_pulse = GaussianSquare(duration, amp, sigma, square_width) sched = Schedule() sched += Play(cr1_pulse, ControlChannel(0)) basis_gates += [gate_name] inst_map.add(gate_name, [1, 0], sched) cr1_gate = Gate(gate_name, 2, []) qregs = QuantumRegister(config.n_qubits) circuit = QuantumCircuit(qregs) circuit.append(cr1_gate, qargs=[qregs[1], qregs[0]]) qpt_circuits = process_tomography_circuits(circuit, [qregs[0], qregs[1]]) qpt_circuits = transpile(qpt_circuits, backend, basis_gates) qpt_schedules = schedule(qpt_circuits, backend, inst_map) The above example uses the mock backend
FakeAlmaden for IBM Quantum system ibmq almaden which can besubstituted for the real backend.The pulse envelope of the CR1 cr1 pulse is created with a flat-topped Gaussian pulse. The pulse schedule sched of CR1 is then added to the basis gates and the circuit instruction to pulse schedule mapping ( inst map ) for qubitsone and zero with the name cr1 . The basis gates defines a list of primitive circuit instructions available in thesystem and the inst map defines a lookup table of calibrated pulse schedules for each basis gate on each qubit. The circuit object of the CR1 sequence is created with a custom gate cr1 gate . The QPT circuits are then assembledby calling the process tomography circuits function in Qiskit-Ignis. This appends state preparation circuits andmeasurement circuits before and after the circuit . The returned qpt circuits is a list of quantum circuits containingeach possible combination of input states and measurement bases. The qpt circuits are then mapped to the backendin question by Qiskit’s transpiler, taking into account the extended set of basis gates . Finally, we call the pulsescheduler with the custom inst map containing CR1 to create the QPT pulse schedules. The QPT program for theCR2 sequence is created with the same procedure.
2. Performing Randomized Benchmarking
The code example below demonstrates how the standard randomized benchmarking (RB) schedules with the CR1-CNOT used in Sec. III D are created in the qiskit pulse module. from qiskit import transpile, schedule from qiskit.circuit import QuantumCircuit, Gate from qiskit.pulse import Schedule, Play, ControlChannel from qiskit.pulse.pulse_lib import GaussianSquare from qiskit.ignis.verification.randomized_benchmarking import randomized_benchmarking_seq from qiskit.test.mock import FakeAlmaden gate_name = 'cr1' n_seed = 5 n_clifford = [1, 21, 51, 101, 151] duration = 848 sigma = 32 square_width = 64 amp = 0.2 local_rotations10 = [[1.45, 1.91, 1.64], [1.56, 3.08, 2.45], [-2.79, -3.05, -2.79], [2.16, -3.12, 0.02]] local_rotations01 = [[-1.68, 3.04, 1.66], [1.57, 2.28, -0.06], [1.48, -0.46, 3.14], [1.60, -3.14, 0.98]] backend = FakeAlmaden() config = backend.configuration() defaults = backend.defaults() basis_gates = config.basis_gates inst_map = defaults.instruction_schedule_map cr1_pulse = gaussian_square(duration, amp, sigma, square_width) sched = Schedule() sched += Play(cr1_pulse, ControlChannel(0)) basis_gates += [gate_name] inst_map.add(gate_name, [1, 0], sched) cr1_gate = Gate(gate_name, 2, []) qregs = QuantumRegister(config.n_qubits) cnot10 = QuantumCircuit(qregs) cnot10.u3(*local_rotations10[0], qregs[0]) cnot10.u3(*local_rotations10[1], qregs[1]) cnot10.append(cr1_gate, qargs=[qregs[1], qregs[0]]) cnot10.u3(*local_rotations10[2], qregs[0]) cnot10.u3(*local_rotations10[3], qregs[1]) cnot10 = transpile(cnot10, backend, basis_gates) cnot_sched10 = schedule(cnot10, backend, inst_map) qregs = QuantumRegister(config.n_qubits) cnot01 = QuantumCircuit(qregs) cnot01.u3(*local_rotations01[0], qregs[0]) cnot01.u3(*local_rotations01[1], qregs[1]) cnot01.append(cr1_gate, qargs=[qregs[1], qregs[0]]) cnot01.u3(*local_rotations01[2], qregs[0]) cnot01.u3(*local_rotations01[3], qregs[1]) cnot01 = transpile(cnot01, backend, basis_gates) cnot_sched01 = schedule(cnot01, backend, inst_map) inst_map.add('cx', [1, 0], cnot_sched10) inst_map.add('cx', [0, 1], cnot_sched01) rb_circuits_seeds, _ = randomized_benchmarking_seq(n_seed, n_clifford, [[0, 1]]) rb_schedules_seeds = [] for rb_circuits_seed in rb_circuits_seeds: rb_circuits_seed = transpile(rb_circuits_seed, backend, basis_gates) rb_schedules_seed = schedule(rb_circuits_seed, backend, inst_map) rb_schedules_seeds.append(rb_schedules_seed) As shown in Sec. A 1, the pulse schedules are programmed with the aid of the
QuantumCircuit class to apply devicecalibrated single-qubit gates around the CR1 pulse sequence abstracted by cr1 gate . The local rotation parameterscan be obtained by the optimization routine shown in Sec. D. It should be noted that in a two qubit standardRB sequence the CNOT gate can assign both qubit 0 and 1 as a control qubit. Beacuse the CNOT gate is notidentical under the exchange of the control and the target qubits , we need to prepare pulse schedules for both qubitarrangements. Then, the default CNOT instruction in the inst map is overwitten by the pulse schedules based onthe calibrated CR1 sequence. Finally, the RB circuits are generated by a call to the randomized benchmarking seq function in Qiskit-Ignis. The returned rb circuits seeds is a list of RB circuits for each random seed. These RBcircuits are then independently transpiled and scheduled to create RB pulse programs. The RB programs for the CR2sequence are created with the same procedure.
Appendix B: Cross Resonance Phase Calibration
In the twenty-qubit IBM Quantum system ibmq almaden , microwave pulses programmed with Qiskit Pulse aregenerated by waveform generators at room temperature and travel through coaxial cables to the qubits [44]. Thetransfer function between the room temperature electronics and the qubits can cause a phase offset φ in Eq. (1)resulting in an error in the rotation axis of the target qubit. The Hamiltonian may therefore have an unwanted ZY interaction term which we eliminate by adjusting the phase of CR pulse φ . We perform this calibration with the CR2schedule since its time-independent Hamiltonian, which we approximate by H CR (cid:39) Ω( A, φ ) (cos φ ZX + sin φ ZY ) + ε, (B1)has less terms than the CR1 Hamiltonian due to the echo. Here, Ω is the strength of the CR drive as a function ofits amplitude A and its phase φ while ε represents the small interaction terms which are not fully refocused by theecho sequence.First, we initialize the qubit in the | (cid:105) state. We sweep the amplitude A and measure the target qubit in thePauli- Z basis to find the pulse amplitude A opt = 0 .
108 which creates an equal superposition of | (cid:105) and | (cid:105) . If theoffset φ is zero this transformation is a π/ X -axis so that the target qubit, measured in the Y -basis, yields Tr( ˆ σ y ρ ) = ± A opt in the Y -basis for both initial states of the control qubit | (cid:105) and | (cid:105) , while sweeping the phase φ .The calibrated phase that maximizes | Tr( ˆ σ y ρ ) | is φ opt = − .
166 rad . Appendix C: Effective Hamiltonian Estimation and Amplitude Calibration
We use the fitted Choi-matrices E CR ( A ) to compute estimates of the coefficients of the effective CR Hamiltonianin Eq. (2). Since a real CR pulse will have noise the resulting process is not unitary. Noisy quantum evolutionfor a time-independent Hamiltonian in the presence of Markovian noise may be described by the Lindblad equation ddt ρ ( t ) = G ( ρ ) with the Lindblad generator G ( ρ ) = L H ( ρ ) + D ( ρ ) (C1) L H ( ρ ) = − i [ H, ρ ] (C2) D ( ρ ) = (cid:88) j γ j (cid:18) A j ρA † j − { A † j A j , ρ } (cid:19) , (C3)where the operator L is the generator of the unitary evolution, and D is the generator of the non-unitary dissipativeevolution. As with unitary evolution, the Lindblad equation can be solved as a matrix differential equation obtain-ing | ρ ( t ) (cid:105)(cid:105) = S E | ρ (0) (cid:105)(cid:105) , where | A (cid:105)(cid:105) denotes a column-vectorized matrix A , and S E = exp( tS G ) is the superoperator representation of quantum process E [32].For a Hamiltonian H we note that the operators B ij = P i ⊗ P j , with P i are single-qubit Pauli operators, definean orthonormal basis for two-qubit operators — i.e. Tr[ B ij B † kl ] = δ ik δ jl . Hence for a Hamiltonian given by H = (cid:80) ij ω ij B ij , we can extract the coefficients via ω ij = T r [ B † ij H ]. The superoperator for the Hamiltonian componentof G is given by S L H = − i ( I ⊗ H − H T ⊗ I ) . (C4)We can use the fact that the superoperators of the Hamiltonian basis term S L Bij are also an orthogonal (but not-normalized) basis for S L H , and importantly, are orthogonal to the dissipative part of the generator (Tr[ S †L Bij S D ] = 0)when the dissipator only involves Pauli and T and T relaxation terms. This allows us to extract the coefficientsfrom the Lindblad superoperator generator as ω ij = Tr (cid:104) S †L Bij S G (cid:105) (cid:107) S L Bij (cid:107) . (C5)To compute the superoperator generator S G , we first obtain the Choi-matrix estimate for a channel E from quantumprocess tomography and then convert it to the superoperator representation S E . For additional details on the super-operators and converting between superoperators and the Choi-matrix representation obtained from tomography see[32]. Next, we take the matrix logarithm to obtain the generator S G = t − log( S E ) from which we estimate ω ij for ourtwo-qubit system using Eq. (C5). The process fidelities of the estimated CR Hamiltonian using this technique and theexperimentally obtained Choi-matrix are 99.4 % and 98.6 % on average for CR1 and CR2 experiments, respectively.We find that as predicted only the terms ZX , ZY , ZZ , ZI , IX , IY , and IZ , shown in Fig. 5, are significant forCR1 and CR2 while all other remaining Pauli terms are negligible. In both CR sequences the ZY term is suppressedby the calibrated CR phase φ opt and a monotonic increase of the desired ZX term is observed as the pulse amplitude A increases. The CR1 pulse without echoing has large contributions from the IX , IY and ZI terms, see Fig. 5(a).Such unwanted interactions, except for ZZ , are removed by the echo sequence in CR2, compare Fig. 5(a) and (b).The effect of these unwanted interactions can be reduced by applying single-qubit gates before and after the CR pulseto correct for local coherent errors as discussed in Sec. III D.We now find the CR pulse amplitude that creates a maximum entangling gate, i.e. θ ZX = π/ A througha linear response Ω = λA . The measured ZX interaction strengths are fit by the third order expansion of the CRHamiltonian [28] ω ZX ( A )2 = − JλA ∆ (cid:18) δ δ + ∆ (cid:19) (C6)+ J ( λA ) δ (3 δ + 11 δ ∆ + 15 δ ∆ + 9∆ )4∆ ( δ + ∆) ( δ + 2∆)(3 δ + 2∆)where J is the coupling strength, δ is the anharmonicity of the control qubit, and ∆ is the frequency differencebetween the control and target qubits. In this model, we have a pair of fit parameters J and λ . The coupling strength6obtained from the fit was J = 1 . ± .
046 MHz and 1 . ± .
033 MHz for the CR1 and CR2 data, respectively.The λ coefficient was − . ± . − . ± . θ ZX ( A ) = n CR ω ZX ( A ) t CR where n CR = 1 for CR1 and n CR = 2 for CR2. Finally, we can find the pulse amplitudes A for θ ZX = π/
2. The estimated amplitudes were respectivly 0 . ± . ± ZX term and the average pulse amplitude A ,see Eq. (C6), the estimated drive amplitude of CR1 is slightly larger than double the drive amplitude of CR2. Appendix D: Optimizing CNOT Fidelity with Local Operations
To estimate the highest fidelity of a maximally entangling gate that the CR gate can be transformed into, weoptimize the average gate fidelity F over all single-qubit pre and post-rotations on both the control and target qubits: F max = max Θ F [ E CR ( A π/ ) , U ent (Θ)] (D1)where the optimization is over 12 real parameters for the four parameterized U (Θ i , Θ j , Θ k ) rotations in SU (2): U ent (Θ) = U † pre (Θ) U ent U † post (Θ) ,U pre (Θ) = U (Θ , Θ , Θ ) ⊗ U (Θ , Θ , Θ ) ,U post (Θ) = U (Θ , Θ , Θ ) ⊗ U (Θ , Θ , Θ ) . The ideal unitary matrix for the cross-resonance perfect-entangler is U ent = ZX ( π/
2) and for the CNOT gate is U ent = CX . This optimization aims to remove the effect of locally correctable coherent errors. It will, however,underestimate the error of the transformed CR gate as it neglects errors in the single-qubit gates. The optimizedfidelities for the measured CR1 and CR2 process maps are F max = 0 .
994 and F max = 0 ..