Author: Anubhav Vardhan (anubhavvardhan@gmail.com)
For more information about QuTiP see http://qutip.org
%matplotlib inline
import numpy as np
from qutip import *
from qutip.qip.models.circuitprocessor import *
from qutip.qip.models.cqed import *
hamiltonian
The cavity-qubit model using a resonator as a bus can be implemented using the DispersivecQED class.
N = 3
qc = QubitCircuit(N)
qc.add_gate("ISWAP", targets=[0,1])
qc.png
U_ideal = gate_sequence_product(qc.propagators())
U_ideal
p1 = DispersivecQED(N, correct_global_phase=True)
U_list = p1.run(qc)
U_physical = gate_sequence_product(U_list)
U_physical.tidyup(atol=1e-3)
(U_ideal - U_physical).norm()
4.7506632105953628e-07
The results obtained from the physical implementation agree with the ideal result.
p1.qc0.gates
[Gate(ISWAP, targets=[0, 1], controls=None)]
The gates are first transformed into the ISWAP basis, which is redundant in this example.
p1.qc1.gates
[Gate(ISWAP, targets=[0, 1], controls=None)]
An RZ gate, followed by a Globalphase, is applied to all ISWAP and SQRTISWAP gates to normalize the propagator matrix. Arg_value for the ISWAP case is pi/2, while for the SQRTISWAP case, it is pi/4.
p1.qc2.gates
[Gate(ISWAP, targets=[0, 1], controls=None), Gate(RZ, targets=[0], controls=None), Gate(RZ, targets=[1], controls=None), Gate(GLOBALPHASE, targets=None, controls=None)]
The time for each applied gate:
p1.T_list
[2500.0000000000027, 0.013157894736842106, 0.013157894736842106]
The pulse can be plotted as:
p1.plot_pulses();
from qutip.ipynbtools import version_table
version_table()
Software | Version |
---|---|
Numpy | 1.9.1 |
matplotlib | 1.4.2 |
Cython | 0.21.2 |
SciPy | 0.14.1 |
IPython | 2.3.1 |
QuTiP | 3.1.0 |
OS | posix [linux] |
Python | 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] |
Tue Jan 13 13:36:58 2015 JST |