# Controllable high-fidelity quantum state transfer and entanglement
generation in circuit QED

Peng Xu  National Laboratory of Solid State Microstructures, School of
Physics, Nanjing University, Nanjing 230039, China  Xu-Chen Yang  Guangdong
Provincial Key Laboratory of Quantum Engineering and Quantum Materials, and
School of Physics
and Telecommunication Engineering, South China Normal University, Guangzhou
510006, China  Feng Mei  National Laboratory of Solid State Microstructures,
School of Physics, Nanjing University, Nanjing 230039, China  Zheng-Yuan Xue
Guangdong Provincial Key Laboratory of Quantum Engineering and Quantum
Materials, and School of Physics
and Telecommunication Engineering, South China Normal University, Guangzhou
510006, China

###### Abstract

We propose a scheme to realize controllable quantum state transfer and
entanglement generation among transmon qubits in the typical circuit QED setup
based on adiabatic passage. Through designing the time-dependent driven pulses
applied on the transmon qubits, we find that fast quantum sate transfer can be
achieved between arbitrary two qubits and quantum entanglement among the
qubits also can also be engineered. Furthermore, we numerically analyzed the
influence of the decoherence on our scheme with the current experimental
accessible systematical parameters. The result shows that our scheme is very
robust against both the cavity decay and qubit relaxation, the fidelities of
the state transfer and entanglement preparation process could be very high. In
addition, our scheme is also shown to be insensitive to the inhomogeneous of
qubit-resonator coupling strengths.

Correspondence and requests for materials should be addressed to Z.-Y.X.
(email<EMAIL_ADDRESS>
or P.X. (email<EMAIL_ADDRESS>or F.M. (email: tianfengmei@gmail.com).

###### pacs:

03.67.Lx, 03.67.Bg, 85.25.Cp

In the past two decades, many advances in quantum computation have been
achieved on various kinds of quantum systems. One of the crucial perquisites
for realizing quantum information processing is quantum entanglement. Due to
its non-locality and non-classical correlations, quantum entanglement has been
exploited in many applications nc . To realize large scale quantum networks,
one further needs quantum state transfer (QST) among different quantum nodes,
which is the basic building blocks R10 ; R11 ; yang ; jzhou ; chen . It is
well-known that quantum information processing can be realized through the
adiabatic evolution of the ground state of an initial Hamiltonian to that of a
target Hamiltonian, i.e., the adiabatic passage R26 ; R27 ; R28 . It has been
demonstrated that such technique is robust to the fluctuation of parameters as
well as the decoherence due to spontaneous emission. Till now, QST and
entanglement preparation have been widely explored in literature both
theoretically R12 ; R13 ; R14 ; R15 ; R16 ; R17 ; R18 ; R19 ; R20 ; R21 ; R22
; Sup20051 ; Sup20052 ; lyx1 ; lyx2 ; xuesr  and experimentally R23 ; R24 ;
R25  based on such technique.

The recent rapid developments in circuit QED has enabled this system as one of
the leading platforms for studying quantum computation and quantum simulation
R291 ; Buluta ; R292 ; R301 ; R302 . This system can also be easily scaled up
to large scale and possesses long coherent time R31 ; R32 . One of the
promising qubits in this context is the superconducting transmon qubit R33
which is immune to $1/f$ charge noise. The transmon qubit is a quantum LC
oscillator with the inductor substituted by the Josephson junction and is
designed to suppress the charge noise to negligible values. The nonlinearity
of the Josephson inductance further allows the oscillator to be weakly
anharmonic, which make this system also be suitable for studying multi-level
quantum operations. Recently, full quantum state tomography of a transmon as a
three-level qutrit has been demonstrated R34 . The superconducting qubit
control has also been realized with a combination of resonant microwave drives
for achieving single-qubit rotations on nanosecond timescales. Furthermore,
the transmon qubits connected to a transmission line resonator also provide a
natural platform to study quantum optics and quantum computation. Many
important experimental advances have been archived in this regard, including
observation of Jaynes-Cummings ladder R35 , quantum trajectories R36  and
Schrödinger cat states R37 , and demonstration of quantum algorithms R38 ,
quantum teleportation R39 , geometric phase gates 43Geometric , Toffoli gate
R41 , multi-qubit entanglement R42  and quantum error correction R40 .
Besides, recent experiments R40 ; R44 ; R45  have also demonstrated that
single- and two-qubit gates with fidelities can approach the fault-tolerant
threshold for surface code, and thus provide the essential ingredients for
realizing large-scale fault-tolerant quantum computation.

In this paper, we propose a scheme based on adiabatic passage to realize QST
and quantum entanglement generation among three transmon qubits fabricated in
a transmission line resonator. This method could also be simply generalized to
many qubits case to achieve long-distant QST and multipartitie quantum
entanglement. In our scheme, QST can be performed between arbitrary two qubits
through applying approximate driven pulses. Moreover, based on tuning the time
delay of the driven pulses, the transferred quantum state can be stabilized in
a long time range, which is very helpful for further quantum information
extraction with quantum non-demolition measurement. Furthermore, the degree of
the final generated entanglement among the three transmon qubits can be tuned
by changing the parameters of the driven pulse. In particular, we show the
case for generating three qubit W state, which has many applications in
quantum information processing. Finally, we numerically analyze the influence
of the decoherence on our scheme, including the cavity decay and qubit
relaxation. The result shows that our scheme is robust to their influence and
the QST and entanglement generation could be achieved with very high fidelity.
Moreover, our method is also shown to be insensitive to the inhomogeneous
qubit-resonator coupling strength.

Figure 1: Schematic of the superconducting system consisting of three transmon
qubits in a transmission line resonator. The ladder-type energy level
configuration for the $l$th transmon qubit consists of one auxiliary state
$\left|e\right\rangle_{l}$ and the computational basis states,
$\left|0\right\rangle_{l}$ and $\left|1\right\rangle_{l}$. The transition
$\left|0\right\rangle_{l}\leftrightarrow\left|e\right\rangle_{l}$ is
resonantly coupled to cavity field with a coupling constant $g_{l}$ and the
transition $\left|e\right\rangle_{l}\leftrightarrow\left|1\right\rangle_{l}$
is driven by a time-dependent microwave pulse with Rabi frequency
$\Omega_{l}(t)$.

Results

The Building block. We consider three identical transmon qubits placed in a
transmission line resonator, and the resonator has single relevant mode with
the frequency $w_{c}$ involving the qubit-photon interaction, as shown in Fig.
1. We label the first three energy levels as the qubit state
$\left|0\right\rangle$, an auxiliary state $\left|e\right\rangle$, and the
qubit state $\left|1\right\rangle$, respectively. The transition
$\left|e\right\rangle_{l}\leftrightarrow\left|1\right\rangle_{l}(l=1,2,3)$ is
driven by $l$th time-dependent Rabi frequency and the transition
$\left|0\right\rangle_{l}\leftrightarrow\left|e\right\rangle_{l}$ is coupled
to the cavity mode, while the
$\left|0\right\rangle_{l}\leftrightarrow\left|1\right\rangle_{l}$ transition
is forbidden. When $|w_{1e}-w_{0e}|$ is big enough, the driving field applied
to the transition between $\left|1\right\rangle$ and $\left|e\right\rangle$
has small effect on the transition from $\left|0\right\rangle$ to
$\left|e\right\rangle$ 43Geometric . The Hamiltonian of a single transmon
qubit is given by $H_{s}=4E_{C}(\hat{n}-n_{g})^{2}-E_{J}\cos\hat{\varphi}$,
where $\hat{n}$ and $\hat{\varphi}$ denote the number of Cooper pairs
transferred between the islands and gauge-invariant phase difference between
the superconductors. The effective offset charge
$n_{g}=Q_{r}/2e+C_{g}V_{g}/2e$ is controlled by a gate electrode capacitively
coupled to the island, where $C_{g}$ and $V_{g}$ represent the gate
capacitance and voltage, $Q_{r}$ denotes the environment-induced offset
charge. The difference between the transmon and the Cooper pair box (CPB) is a
shunting connection of the two superconductors via a large capacitance
$C_{B}$. Via the additional capacitance $C_{B}$, the charging energy
$E_{C}=e^{2}/(2C_{\varSigma})$ can be made small compared to the Josephson
energy, where $C_{\varSigma}=C_{g}+2C_{J}+C_{B}$, $C_{J}$ is the capacitance
of the Josephson tunnel junction. The Josephson energy
$E_{J}=2\tilde{E_{J}}\cos(\pi\Phi_{ext}/\Phi_{0})$ is tuned by means of an
external magnetic flux $\Phi_{ext}$, with $\tilde{E_{J}}$ being the Josephson
energy of a single junction. Compared with the CPB, the transmon is operated
in the parameter regime $E_{J}\gg E_{C}$. The Hamiltonian of the
superconducting transmission line resonator is $H_{c}=\hbar
w_{c}\left(a^{+}a+\frac{1}{2}\right)$, where $w_{c}=1/\sqrt{L_{c}C_{c}}$
denotes the resonator frequency, and $a$ $(a^{+})$ represents the annihilation
(creation) operator of the transmission line resonator. Under the rotating-
wave approximation, the effective interaction Hamiltonian of the whole system
can be written as

$H_{I}=\sum_{l=1}^{3}[g_{l}a\left|e\right\rangle_{l}\left\langle
0\right|+\Omega_{l}(t)\left|1\right\rangle_{l}\left\langle e\right|]+h.c.,$
(1)

where we have assumed that $\hbar=1$, $g_{l}$ is the coupling constant between
the cavity and the transmon, $\Omega_{l}(t)$ is the Rabi frequency for the
transition $\left|e\right\rangle_{l}\leftrightarrow\left|1\right\rangle_{l}$
of the qubit $l$. Without loss of generality, we assume that the transmon
qubit is driven by a time-dependent microwave pulse with Gaussian envelopes
R461 ; R462

$\Omega_{l}(t)=\Omega_{0l}e^{-(t-\tau_{l})^{2}/T_{l}^{2}},$ (2)

where $\Omega_{0l}$, $\tau_{l}$ and $T_{l}$ are pulse amplitude, time delay
and operation duration. In the following, the parameters and the shape of the
driven Gaussian pulses will be engineered for achieving certain target quantum
information processing, which is within the current state of the art circuit
QED technology. Recently, based on similar engineering on the external driven
Gaussian microwave pulses, non-adiabatic Nonad20021 ; Nonad20022 ; Nonad20023
non-abelian geometric phase has been observed with transmon qubit 43Geometric
; xuepra .

Quantum state transfer. We now show how to engineer the driven pulses based on
adiabatic passage R26  to realize QST among three transmon qubits. In
particular, we separately discuss two situations with the qubit-resonator
coupling strengths are homogeneous and inhomogeneous. The result shows that
our scheme is robust to the inhomogeneous of qubit-resonator coupling
strength. The total excitation operator in our system can be written as
$N_{e}=\sum_{l=1}^{3}(\left|e\right\rangle_{l}\left\langle
e\right|+\left|1\right\rangle_{l}\left\langle 1\right|)+a^{+}a$, where $N_{e}$
commutes with $H_{I}$ so that the excitation number is conserved during the
dynamical evolution. Here, we assume a single excitation is coherently
exchanged between the qubit and resonator. The resonator can be the quantum
bus that mediates interactions between the qubits, which can realize the QST
among different qubits. The subspace in our scheme is the single excitation
subspace, i.e., $N_{e}=1$.

Assume the initial state of the system is
$\left|0\right\rangle_{c}\left|1\right\rangle_{1}\left|0\right\rangle_{2}\left|0\right\rangle_{3}$,
where the transmon qubit 1 is prepared in the state $\left|1\right\rangle$,
transmon qubits 2 and 3 are in the state $\left|0\right\rangle$, and the
cavity field is in the vacuum state. In this situation, the system evolves
within this subspace is spanned by seven basis

$\displaystyle\left|\phi_{1}\right\rangle=\left|0\right\rangle_{c}\left|1\right\rangle_{1}\left|0\right\rangle_{2}\left|0\right\rangle_{3},\quad\left|\phi_{2}\right\rangle=\left|0\right\rangle_{c}\left|0\right\rangle_{1}\left|1\right\rangle_{2}\left|0\right\rangle_{3},$
$\displaystyle\left|\phi_{3}\right\rangle=\left|0\right\rangle_{c}\left|0\right\rangle_{1}\left|0\right\rangle_{2}\left|1\right\rangle_{3},\quad\left|\phi_{4}\right\rangle=\left|1\right\rangle_{c}\left|0\right\rangle_{1}\left|0\right\rangle_{2}\left|0\right\rangle_{3},$
$\displaystyle\left|\phi_{5}\right\rangle=\left|0\right\rangle_{c}\left|e\right\rangle_{1}\left|0\right\rangle_{2}\left|0\right\rangle_{3},\quad\left|\phi_{6}\right\rangle=\left|0\right\rangle_{c}\left|0\right\rangle_{1}\left|e\right\rangle_{2}\left|0\right\rangle_{3},$
$\displaystyle\left|\phi_{7}\right\rangle=\left|0\right\rangle_{c}\left|0\right\rangle_{1}\left|0\right\rangle_{2}\left|e\right\rangle_{3},$
(3)

where $\left|\phi_{4}\right\rangle\sim\left|\phi_{7}\right\rangle$ are the
intermediate states. It is easy to verify that the following two states are
the eigenstates of the effective Hamiltonian with zero eigenvalue

$\displaystyle\left|D(0)\right\rangle_{3}$ $\displaystyle=$
$\displaystyle\left|0\right\rangle_{c}\left|0\right\rangle_{1}\left|0\right\rangle_{2}\left|0\right\rangle_{3}$
(4) $\displaystyle\left|D(t)\right\rangle_{3}$ $\displaystyle=$ $\displaystyle
N_{3}[g_{1}\Omega_{2}(t)\Omega_{3}(t)\left|\phi_{1}\right\rangle+g_{2}\Omega_{1}(t)\Omega_{3}(t)\left|\phi_{2}\right\rangle$
$\displaystyle+g_{3}\Omega_{1}(t)\Omega_{2}(t)\left|\phi_{3}\right\rangle-\Omega_{1}(t)\Omega_{2}(t)\Omega_{3}(t)\left|\phi_{4}\right\rangle],$

where $N_{3}$ is the normalization factor. The states
$\left|D(0)\right\rangle_{3}$ and $\left|D(t)\right\rangle_{3}$ are dark
states since they have no dynamics under the Hamiltonian, and thus the excited
level $\left|e\right\rangle_{l}(l=1,2,3)$ is unpopulated. When the system is
in the state
$\left|0\right\rangle_{c}\left|0\right\rangle_{1}\left|0\right\rangle_{2}\left|0\right\rangle_{3}$,
the dynamical evolution of the system will be frozen.

From the above dark state formalism, it is easy to find that, if one can
simultaneously engineer the three driven Gaussian pulses so that initially
$\\{\Omega_{3}(t),\Omega_{2}(t)\\}\gg\Omega_{1}(t)$ and finally
$\\{\Omega_{3}(t),\Omega_{1}(t)\\}\gg\Omega_{2}(t)$, then the population
transfer could be achieved from $\left|\phi_{1}\right\rangle$ to
$\left|\phi_{2}\right\rangle$. The detailed evolution path and the driven
pulses needed in the above transfer can be described as the following. First,

$\left|\phi_{1}\right\rangle\stackrel{{\scriptstyle\Omega_{1}}}{{\longrightarrow}}\left|\phi_{5}\right\rangle\stackrel{{\scriptstyle
g_{1}}}{{\longrightarrow}}\left|\phi_{4}\right\rangle.$ (5)

Then, the photon is further absorbed by the second qubit, the system will
further evolve according to

$\left|\phi_{4}\right\rangle\stackrel{{\scriptstyle
g_{2}}}{{\longrightarrow}}\left|\phi_{6}\right\rangle\stackrel{{\scriptstyle\Omega_{2}}}{{\longrightarrow}}\left|\phi_{2}\right\rangle.$
(6)

Based on this observation, one can realize QST between two transmon qubits.
Suppose that the original quantum information is encoded in an arbitrary
unknown quantum state
$\left|\phi\right\rangle=a\left|0\right\rangle+b\left|1\right\rangle$ carried
by the transmon qubit 1, where $a$ and $b$ are the normalized coefficients. As
shown above, the zero excitation state
$\left|0\right\rangle_{c}\left|0\right\rangle_{1}\left|0\right\rangle_{2}\left|0\right\rangle_{3}$
is frozen, the one-excitation state can be swapped between the transmon qubit
1 and 2, then the coherent quantum state
$\left|\phi\right\rangle=a\left|0\right\rangle+b\left|1\right\rangle$ could be
finally transferred from transmon qubit 1 to 2.

Similarly, one can realize the QST from transmon qubit 2 to 3. In this case,
based on observing the dark state formalism, when the three driven Gaussian
pulses are engineered simultaneously so that initially
$\\{\Omega_{3}(t),\Omega_{1}(t)\\}\gg\Omega_{2}(t)$ and finally
$\\{\Omega_{1}(t),\Omega_{2}(t)\\}\gg\Omega_{3}(t)$, the population from the
initial state $\left|\phi_{2}\right\rangle$ would be transferred to the target
state $\left|\phi_{3}\right\rangle$. The detailed evolution process can be
written as first

$\left|\phi_{2}\right\rangle\stackrel{{\scriptstyle\Omega_{2}}}{{\longrightarrow}}\left|\phi_{6}\right\rangle\stackrel{{\scriptstyle
g_{2}}}{{\longrightarrow}}\left|\phi_{4}\right\rangle,$ (7)

and then the photon is further absorbed by the third qubit

$\left|\phi_{4}\right\rangle\stackrel{{\scriptstyle
g_{3}}}{{\longrightarrow}}\left|\phi_{7}\right\rangle\stackrel{{\scriptstyle\Omega_{3}}}{{\longrightarrow}}\left|\phi_{3}\right\rangle,$
(8)

which is the coherent QST between the qubit 2 and 3. In the whole process, one
can find that the cavity state and the qubit state $|e\rangle$ are the
intermediate states. It is worth to point out that, our method is also can be
generalized to realize QST between arbitrary two qubits, including one
particular qubit to the one that is far away from this qubit, which is of
great significance to the large scale quantum computation in the future.

Figure 2: Numerical results for quantum state transfer from qubit 1 to 2 and
then to 3. (a) The shape of the driven pulses with
$\Omega_{ij,i=1,2,3;j=1,2}/2\pi=350$ MHz, $\tau_{1}=0.35$ us, $\tau_{2}=0.58$
us, $\tau_{3}=0.2$ us, $\tau_{4}=0.65$ us, $\tau_{5}=0.28$ us, $\tau_{6}=0.5$
us, $T_{i=1,2,...,6}=75$ ns. (b) Time evolution of the populations in
different states during the population transfer from $\left|0100\right\rangle$
to $\left|0001\right\rangle$, with $g_{l}/{2\pi}=200$ MHz. (c) Fidelity F
versus the time $t$, with $\Delta{g}/{2\pi}=0$. (d) Fidelity F versus the time
$t$, with the deviation $\Delta{g}/{2\pi}=40$ MHz ($g_{1}/{2\pi}=180$ MHz,
$g_{2}/{2\pi}=200$ MHz, $g_{3}/{2\pi}=160$ MHz).

In the following, we will show the method to design the driven Gaussian pulse
sequence with their parameters satisfying the above requirements. For this
purpose, we firstly assume the forms of the time-dependent driven Gaussian
pulses are chosen as

$\displaystyle\Omega_{1}(t)$ $\displaystyle=$
$\displaystyle\Omega_{11}e^{-(t-\tau_{1})^{2}/T_{1}^{2}}+\Omega_{12}e^{-(t-\tau_{2})^{2}/T_{2}^{2}},$
$\displaystyle\Omega_{2}(t)$ $\displaystyle=$
$\displaystyle\Omega_{21}e^{-(t-\tau_{3})^{2}/T_{3}^{2}}+\Omega_{22}e^{-(t-\tau_{4})^{2}/T_{4}^{2}},$
(9) $\displaystyle\Omega_{3}(t)$ $\displaystyle=$
$\displaystyle\Omega_{31}e^{-(t-\tau_{5})^{2}/T_{5}^{2}}+\Omega_{32}e^{-(t-\tau_{6})^{2}/T_{6}^{2}}.$

Through substituting the above forms into the systemic Hamiltonian, we
numerically calculate the systemic evolution and go to find the optimal
parameters where the fidelity of our scheme is maximal. In Fig. 2(a), the
three optimal Gaussian pulses $\Omega_{1,2,3}(t)$ for achieving QST from qubit
1 to 2 and then to 3 at a fixed time delay are plotted. In Fig. 2(b), the
detailed population transfer of the QST process is calculated. One can find
that the QST between two qubits can be obtained within a time duration
$t_{f}=150$ ns, which is faster than that of the atomic system Riebe .
However, the transfer time can be much shorter through optimizing the driven
pulses and improving the coupling strength between the qubit and resonator. We
also numerically find the optimal parameter to make the QST much faster at a
cost of reducing the fidelity. The good news is that the fidelity can be still
higher than 0.9. Besides, during the transfer process, the intermediate states
emerge in a very short time range compared to the decoherence time, which is
the reason why our scheme has high fidelity even in the presence of
decoherence. Another interesting characteristic during the system evolution is
that the residence time on the populations of the quantum states is
controllable through engineering the driven pulses, which provide an extra
freedom to manipulate the QST in such framework.

In Fig. 2(c), we have plotted the fidelity of the above QST from transmon
qubit 1 to 3 through 2. The fidelity is formulated as
$F(t)=\left(Tr\sqrt{\rho_{f}^{1/2}\rho(t)\rho_{f}^{1/2}}\right)^{2}$, where
$\rho(t)$ and $\rho_{f}$ are the density matrixes of the evolved state at the
end of the pulse operation and the ideal final state respectively. One can
find that the fidelity can almost approach one. Actually, the fidelity for QST
from qubits 1 to 3 is much higher. Note that the influence of the
inhomogeneous qubit-resonator coupling strengths on our scheme caused by the
imperfection in the practical fabrication is a very important issue needed to
be addressed. With a typical choice on the inhomogeneous qubit-resonator
coupling strengths, we numerically calculate the corresponding fidelity and
analyze the performance in this case in Fig. 2(d). The result shows that the
fidelity of our scheme also can approach one, and thus very robust.

Figure 3: Numerical results for quantum state transfer from qubit 1 to 3
through 2 and and then back to 1. (a) The shape of the driven pulses. (b) Time
evolution of the corresponding populations for the different quantum states,
with $g_{l}/{2\pi}=200$ MHz. (c) The fidelity F versus time $t$, with
$\Delta{g}/2\pi=0$. (d) Fidelity F versus the time $t$, with the deviation
$\Delta{g}/{2\pi}=40$ MHz ($g_{1}/{2\pi}=180$ MHz, $g_{2}/{2\pi}=200$ MHz,
$g_{3}/{2\pi}=160$ MHz).

In Fig. 3, we further numerically demonstrates that the present protocol can
also be generalized to realize QST from transmon qubit 1 to 3 through 2 and
and then back to 1, including numerically finding the optimal Gaussian pulses,
calculating the population transfer process and the fidelities for homogeneous
and inhomogeneous qubit-resonator coupling strengths. The result shows that
our scheme also can work very well even in this case. The final achieved
fidelity could nearly approach one, even in the presence of an inhomogeneous
case. Therefore, our scheme for QST using driven pulses is very robust,
including working well with resonant and non-resonant, homogeneous and
inhomogeneous qubit-resonator coupling.

Entangled state generation. We next consider using driven pulses to robustly
generate quantum entanglement among the three transmon qubits placed in the
transmission line resonator. There have been some entanglement generation
schemes in similar circuit QED setups. Firstly, Tsomokos Tsomokos  has
presented a scheme of entanglement generation that N charge (flux) qubits are
coupled capacitively (inductively). However, due to the fact that the coupling
between every two qubits is required and each qubit is operated at its
degeneracy point, it needs more time to achieve the entanglement and more
fragile under the decoherence than our scheme. Secondly, Galiautdinov and
Martinis Galiautdinov  have introduced another scheme that the maximal
entanglement is generated in tripartite system with pairwise coupling
$g(XX+YY)+\widetilde{g}ZZ$. It is realized in Josephson phase qubits with
capacitive and inductive couplings. However, the decoherence time of the phase
qubit is shorter than transmon qubit in our scheme and the interaction can not
be realized similarly using transmon qubits. We assume that the initial state
of the system is $|\phi_{1}\rangle$. When the driven pulses and the qubit-
resonator couplings are applied, the evolution process is described as

$\displaystyle|\phi_{1}\rangle\stackrel{{\scriptstyle\Omega_{1}}}{{\longrightarrow}}|\phi_{5}\rangle\stackrel{{\scriptstyle
g_{1}}}{{\longrightarrow}}|\phi_{4}\rangle\begin{cases}\stackrel{{\scriptstyle
g_{1}}}{{\longrightarrow}}|\phi_{5}\rangle\stackrel{{\scriptstyle\Omega_{1}}}{{\longrightarrow}}|\phi_{1}\rangle,\\\
\stackrel{{\scriptstyle
g_{2}}}{{\longrightarrow}}|\phi_{6}\rangle\stackrel{{\scriptstyle\Omega_{2}}}{{\longrightarrow}}|\phi_{2}\rangle,\\\
\stackrel{{\scriptstyle
g_{3}}}{{\longrightarrow}}|\phi_{7}\rangle\stackrel{{\scriptstyle\Omega_{3}}}{{\longrightarrow}}|\phi_{3}\rangle.\end{cases}$
(10)

Firstly, the driven pulse with Rabi frequency $\Omega_{1}(t)$ drives the
system from $|\phi_{1}\rangle$ into the state $|\phi_{5}\rangle$, then evolves
into the state $|\phi_{4}\rangle$ through the coupling between transmon qubit
1 and the resonator. Note that the state $|\phi_{4}\rangle$ is just one-photon
state. So, from now on, all the couplings between the three qubits and the
resonator will dominant over the evolution, make $|\phi_{4}\rangle$ evolve
into $|\phi_{5,6,7}\rangle$ with equal weights. After that, three driven
pulses with Rabi frequencies $\Omega_{1,2,3}(t)$ would bring
$|\phi_{5,6,7}\rangle$ into $|\phi_{1,2,3}\rangle$ with equal weights, leaving
the cavity in the vacuum state. Then we get the entangled state of the three
transmon qubits as

$|W\rangle=\frac{1}{\sqrt{3}}(|100\rangle_{123}+|010\rangle_{123}+|001\rangle_{123}),$
(11)

which is a W state and can be employed to complete various quantum information
processing tasks.

Figure 4: Numerical results for entangled state generation. (a) The shape of
of driven pulses with $\Omega^{{}^{\prime}}_{11}/{2\pi}=81$ MHz,
$\Omega^{{}^{\prime}}_{21}/{2\pi}=26$ MHz,
$\Omega^{{}^{\prime}}_{31}/{2\pi}=165$ MHz, $\tau_{1}=\tau_{2}=\tau_{3}=0.15$
us, $T_{1}=31$ ns, $T_{2}=26$ ns, $T_{3}=24$ ns. (b) Time evolution of the
populations for the different quantum states, with $g_{l}/{2\pi}=200$ MHz. (c)
The fidelity F versus time $t$, with $\Delta{g}/2\pi=0$. (d) Fidelity F versus
the time $t$, with the deviation $\Delta{g}/{2\pi}=40$ MHz ($g_{1}/{2\pi}=180$
MHz, $g_{2}/{2\pi}=200$ MHz, $g_{3}/{2\pi}=160$ MHz).

The detailed performance of the above quantum entanglement generation is
further analyzed through numerically designing the driven pulses. For this
purpose, the form of three optimal time-dependent driven Rabi frequencies are
chosen as

$\displaystyle\Omega^{{}^{\prime}}_{1}(t)=\Omega^{{}^{\prime}}_{11}e^{-(t-\tau_{1})^{2}/T_{1}^{2}},$
$\displaystyle\Omega^{{}^{\prime}}_{2}(t)=\Omega^{{}^{\prime}}_{21}e^{-(t-\tau_{2})^{2}/T_{2}^{2}},$
$\displaystyle\Omega^{{}^{\prime}}_{3}(t)=\Omega^{{}^{\prime}}_{31}e^{-(t-\tau_{3})^{2}/T_{3}^{2}}.$
(12)

In Fig. 4(a-b), we have plotted the optimal three driven pulses and the time
evolution of the systemic populations. In contrast, in Fig. 4(a-b), one can
find that there are three states left finally and their coherent superposition
leads to an W state. The results also show that the interaction time required
for generating such entanglement among the three transmon qubits is about $85$
ns, which is very fast compared to previous schemes for quantum entanglement
preparation. In Fig. 4(c), we further plot the fidelity of the evolved states
as function of the time and find that the fidelity of the final entanglement
could be higher than 0.99. As shown in 4(d), this conclusion holds even for
the nonidentical qubit-resonator coupling strengthes.

Furthermore, this method can also be directly employed to generate N-qubit W
state. For instance, N-transmon qubits are fabricated in a transmission line
resonator. All the transmon qubits are resonate with the single-mode resonator
and driven by the time-dependent pulses. The effective Hamiltonian for the
system is

$H_{I}=\sum_{l=1}^{N}[g_{l}a\left|e\right\rangle_{l}\left\langle
0\right|+\Omega_{l}(t)\left|1\right\rangle_{l}\left\langle e\right|]+h.c..$
(13)

We verify that the following two states

$\displaystyle|D(0)\rangle_{N}$ $\displaystyle=$
$\displaystyle|0\rangle_{1}|0\rangle_{2}\cdot\cdot\cdot|0\rangle_{N}|0\rangle_{c},$
$\displaystyle|D(t)\rangle_{N}$ $\displaystyle=$ $\displaystyle
N_{n}\left[\frac{g_{1}}{\Omega_{1}(t)}|1\rangle_{1}\prod_{l=2}^{n}|0\rangle_{l}|0\rangle_{c}-\prod_{l=1}^{n}|0\rangle_{l}|1\rangle_{c}\right.$
(14)
$\displaystyle\left.+\sum_{l=2}^{n}\frac{g_{l}}{\Omega_{l}(t)}|0\rangle_{1}\cdot\cdot\cdot|0\rangle_{l-1}|1\rangle_{c}\cdot\cdot\cdot|0\rangle_{n}\right]$

are eigenstates of the Hamiltonian with zero eigenvalue. Here, $N_{n}$ is a
normalization factor. The states $|D(0)\rangle_{N}$ and $|D(t)\rangle_{N}$ are
dark states since the excited level $|D(0)\rangle_{l}$ is unpopulated. Through
optimizing the time-dependent driven pulses applied on the transmon qubits, we
can achieve the fast quantum state transfer and quantum entanglement among
different qubits. Actually, one also can find that the degree of the above
entanglement also can be engineered to a particular value through designed
approximate driven pulses. Moreover, different from the previous methods, the
Bell state and W state could be prepared between arbitrary two and three
qubits with such method. Such feature is very helpful for achieving large
scale quantum computation in a quantum network.

Discussion. At this stage, we take into account the cavity decay and qubit
relaxation and analyze their influences on the quantum state transfer and
quantum entanglement generation. For this purpose, the master equation is
employed to described the above decoherence process, which can be written as

$\displaystyle\frac{d\rho}{dt}$ $\displaystyle=$
$\displaystyle-i[H_{I},\rho]+{\kappa\over 2}\mathcal{L}[a]+{1\over
2}\sum_{l=1}^{3}\\{\gamma_{l,1e}\mathcal{L}[\sigma_{l,1e}^{-}]$ (15)
$\displaystyle+\gamma_{l,e0}\mathcal{L}[\sigma_{l,e0}^{-}]+\varGamma_{l,1}\mathcal{}L[\sigma_{l,1}]+\varGamma_{l,e}\mathcal{L}[\sigma_{l,e}]\\},$

where $\kappa$ is the decay rate of the cavity, $\varGamma_{l,1}$
$\left(\varGamma_{l,e}\right)$ is the dephasing rate of the qubit $l$ with the
level $\left|1\right\rangle$ $\left(\left|e\right\rangle\right)$,
$\gamma_{l,1e}$ and $\gamma_{l,e0}$ are the energy relaxation rates for the
qubit $l$ with the decay path
$\left|1\right\rangle\rightarrow\left|e\right\rangle$ and
$\left|e\right\rangle\rightarrow\left|0\right\rangle$, respectively;
$\mathcal{L}[A]=2A\rho A^{+}-A^{+}A\rho-\rho A^{+}A$,
$\sigma_{l,ij}^{-}=\left|j\right\rangle_{l}\left\langle i\right|$
$\sigma_{l,ij}^{+}=\left|i\right\rangle_{l}\left\langle j\right|$, and
$\sigma_{l,k}=\left|k\right\rangle_{l}\left\langle k\right|$ $(k=1,e)$.

Figure 5: Numerical simulation of the influence of the decohenrence.
Fidelities versus $\gamma$ and $\kappa$ at the end of the operation time with
respect to the target state based on the master equation (13) for the quantum
state transfer (a,b) and the three-qubit entanglement generation (c,d) in the
homogeneous and inhomogeneous qubit-resonator couplings.

For simplicity, we assume $\varGamma_{1}=\gamma/2$, $\varGamma_{e}=\gamma/4$,
$\gamma_{1e}=\gamma$ and $\gamma_{e0}=\gamma/2$ R47 . Based on numerically
solving the master equation, in Fig. 5, we calculate the fidelity of the
population transfer and the generation of entanglement among the three qubits
in the presence of the decoherence. The results show that the fidelity
decreases with the increase of the cavity decay and qubit relaxation rate. As
both the life time of the photons in the resonator and the coherence time of
the transmon qubit can approach $20$ us R47 , it is easy to check that the
parameters involved in our numerical calculation is within the experimental
accessible parameter regime. With a typical choice of $g_{l}/{2\pi}=200$ MHz,
$\kappa/{2\pi}=20$ kHz, $\gamma_{1e}/{2\pi}=20$ kHz, $\varGamma_{1}/{2\pi}=10$
kHz, $\gamma_{e0}/{2\pi}=10$ kHz, $\varGamma_{e}/{2\pi}=5$ kHz, the fidelity
of the final state can be higher than 0.94. The decoherence has a smaller
effect on entanglement generation than on state transfer. The reason is that
the quantum state transfer need much longer time than the entanglement
generation, this is due to the fact that we need to insert delay pulses to
further modulate the quantum dynamics for fulfilling the whole transfer
process, while the entanglement generation process is straightforward.

In summary, based on engineering external driven microwave pulses and
adiabatical passage, we have proposed a controllable method to realize high-
fidelity QST and quantum entanglement among three superconducting qubits
embedded in a transmission line resonator, which can be achieved with fast
speed and high fidelity even in the presence of decoherence. Moreover, we also
demonstrate that our scheme is also very robust to the inhomogeneousness of
qubit-resonator coupling strength. In addition, our method can be readily
scaled up to realize long-distance QST and multipartite quantum entangled
generation. Finally, our proposal can also be applied to other types of
superconducting qubits. Therefore, it is expected that our scheme could add a
robust means for circuit QED to realize large-scale quantum computation and
quantum simulation.

Acknowledgements We acknowledge helpful discussions with Y. Yu and S. L. Zhu.
This work was supported by the SKPBR of China (Grant No. 2011CB922104), the
NFRPC (No. 2013CB921804), the NSFC (Grants No. 11125417, No. 11474153, and No.
11274156), and the PCSIRT (Grant No. IRT1243).

## References

  * (1) Nielsen, M. A. and Chuang, I. L. _Quantum Computation and Quantum Information_ (Cambridge University Press, Cambridge, 2000).
  * (2) DiVincenzo, D. P. The physical implementation of quantum computation. _Fortschr. Phys._ 48, 771-783 (2000).
  * (3) Kimble, H. J. The quantum internet. _Nature_ 453, 1023-1030 (2008).
  * (4) Yang, C.-P., Su, Q.-P. & Nori, F. Entanglement generation and quantum information transfer between spatially-separated qubits in different cavities. _New J. Phys._ 15, 115003 (2013).
  * (5) Zhou, J. _et al_. High fidelity quantum state transfer in electromechanical systems with intermediate coupling. _Sci. Rep._ 4, 6237 (2014).
  * (6) Chen, L.-B. Yang, W. & Yin, Z.-Q. Heralded entanglement of two distant quantum dot spins via optical interference. _arXiv_ :1505.04476.
  * (7) Bergmann, K., Theuer, H. & Shore, B. W. Coherent population transfer among quantum states of atoms and molecules. _Rev. Mod. Phys._ 70, 1003-1025 (1998).
  * (8) Kral, P. Thanopulos, I. & Shapiro, M. Coherently controlled adiabatic passage. _Rev. Mod. Phys._ 79, 53-77 (2007).
  * (9) Vitanov, N. V., Suominen, K. A. & Shore, B. W. Creation of coherent atomic superpositions by fractional stimulated Raman adiabatic passage. _J. Phys. B_ 32, 4535-4546 (1999).
  * (10) Chen, X., Lizuain., I., Ruschhaupt, A., Guery-Odelin D. & Muga, J. G. Shortcut to adiabatic passage in two- and three-level atoms. _Phys. Rev. Lett._ 105, 123003 (2010).
  * (11) Zhou, Y. L., Wang, Y. M., Liang, L. M. & Li, C. Z. Quantum state transfer between distant nodes of a quantum network via adiabatic passage. _Phys. Rev. A_ 79, 044304 (2009).
  * (12) Ruschhaupt, A., Chen, X., Alonso, D. & Muga, J. G. Optimally robust shortcuts to population inversion in two-level quantum systems. _New J. Phys._ 14, 093040 (2012).
  * (13) Vitanov, N. V. Adiabatic population transfer by delayed laser pulses in multistate systems. _Phys. Rev. A_ 58, 2295-2309 (1998).
  * (14) Lu, M., Xia, Y., Shen, L. T., Song, J. & An, N. B. Shortcuts to adiabatic passage for population transfer and maximum entanglement creation between two atoms in a cavity. _Phys. Rev. A_ 89, 012326 (2014).
  * (15) Grigoryan, G. G. & Pashayan, Y. T. Adiabatic population transfer in three-level system with non-zero two-photon detuning. _Opt. Commun._ 198, 107-113 (2001).
  * (16) Lu, M., Xia, Y., Shen, L. T. & Song, J. An effective shortcut to adiabatic passage for fast quantum state transfer in a cavity quantum electronic dynamics system. _Laser Phys._ 24, 105201 (2014).
  * (17) Chen, Y. H., Xia, Y., Chen, Q. Q. & Song, J. Efficient shortcuts to adiabatic passage for fast population transfer in multiparticle systems. _Phys. Rev. A_ 89, 033856 (2014).
  * (18) Liu, Y.-X., You, J. Q., Wei, L. F., Sun, C. P. & Nori, F. Optical selection rules and phase-dependent adiabatic state control in a superconducting quantum circuit. _Phys. Rev. Lett._ 95, 087001 (2005).
  * (19) Wei, L. F., Johansson, J. R., Cen, L. X., Ashhab, S. & Nori, F. Controllable coherent population transfers in superconducting qubits for quantum computing. _Phys. Rev. Lett._ 100, 113601 (2008).
  * (20) Yang, C. P., Chu, S. I. & Han, S. Quantum information transfer and entanglement with SQUID qubits in cavity QED: A dark-state scheme with tolerance for nonuniform device parameter. _Phys. Rev. Lett._ 92, 117902 (2004).
  * (21) Zhu, S. L., Wang, Z. D. & Yang, K. Quantum-information processing using Josephson junctions coupled through cavities. _Phys. Rev. A_ 68, 034303 (2003).
  * (22) Liu, Y.-X., Wei, L. F., & Nori, F. Generation of nonclassical photon states using a superconducting qubit in a microcavity. _Europhys. Lett._ 67, 941-947 (2004).
  * (23) Zhu, S. L., Wang, Z. D. & Zanardi, P. Geometric quantum computation and multiqubit entanglement with superconducting qubits inside a cavity. _Phys. Rev. Lett._ 94, 100502 (2005).
  * (24) Zhao, Y.-J., Liu, Y.-L., Liu, Y.-X., & Nori, F. Generating nonclassical photon states via longitudinal couplings between superconducting qubits and microwave fields. _Phys. Rev. A_ 91, 053820 (2015).
  * (25) Xue, Z.-Y. _et al_. Robust interface between flying and topological qubits. _Sci. Rep_. 5, 12233 (2015).
  * (26) Schaff, J. F., Song, X. L., Vignolo, P. & Labeyrie, G. Fast optimal transition between two equilibrium states. _Phys. Rev. A_ 82, 033430 (2010).
  * (27) Maeda, H., Gurian, J. H., Norum, D. V. L. & Gallagher, T. F. Coherent population transfer in an atom by multiphoton adiabatic rapid passage. _Phys. Rev. Lett._ 96, 073002 (2006).
  * (28) Bason, M. G. _et al_. High-fidelity quantum driving. _Nat. Phys._ 8, 147-152 (2012).
  * (29) Ladd, T. D. Quantum computers. _Nature_ 464, 45-53 (2010).
  * (30) Buluta, I., Ashhab, S. & Nori, F. Natural and artificial atoms for quantum computation. _Rep. Prog. Phys._ 74, 104401 (2011)
  * (31) Devoret, M. H. & Schoelkopf, R. J. Superconducting circuits for quantum information: An outlook. _Science_ 339, 1169-1174 (2013).
  * (32) Mei, F., Stojanovic, V. M., Siddiqi, I. & Tian, L. Analog superconducting quantum simulator for Holstein polarons. _Phys. Rev. B_ 88, 224502 (2013)
  * (33) Stojanovi, V. M., Vanevi, M., Demler, E. & Tian, L. Transmon-based simulator of nonlocal electron-phonon coupling: A platform for observing sharp small-polaron transitions. _Phys. Rev. B_ 89, 144508 (2014).
  * (34) Barends, R. _et al_. Coherent Josephson qubit suitable for scalable quantum integrated circuits. _Phys. Rev. Lett._ 111, 080502 (2013).
  * (35) Chen, Y. _et al_. Qubit architecture with high soherence and fast tunable coupling. _Phys. Rev. Lett._ 113, 220502 (2014).
  * (36) Koch, J. _et al_. Charge-insensitive qubit design derived from the Cooper pair box. _Phys. Rev. A_ 76, 042319 (2007).
  * (37) Bianchetti, R. _et al_. Control and tomography of a three level superconducting artificial atom. _Phys. Rev. Lett._ 105, 223601 (2010).
  * (38) Fink, J. M. _et al_. Climbing the Jaynes CCummings ladder and observing its $\sqrt{n}$ nonlinearity in a cavity QED system. _Nature_ 454, 315-318 (2008).
  * (39) Murch, K. W., Weber, S. J., Macklin C. & Siddiqi, I. Observing single quantum trajectories of a superconducting quantum bit. _Nature_ 502, 211-214 (2013).
  * (40) Kirchmair, G. _et al_. Observation of quantum state collapse and revival due to the single-photon Kerr effect. _Nature_ 495, 205-209 (2013).
  * (41) DiCarlo, L. _et al_. Demonstration of two-qubit algorithms with a superconducting quantum processor. _Nature_ 460, 240-244 (2009).
  * (42) Steffen, L. _et al_. Deterministic quantum teleportation with feed-forward in a solid state system. _Nature_ 500, 319-322 (2013).
  * (43) Fedorov, A., Steffen, L., Baur, M., da Silva, M. P. & Wallraff, A. Implementation of a Toffoli gate with superconducting circuits. _Nature_ 481, 170-172 (2012).
  * (44) DiCarlo, L. _et al_. Preparation and measurement of three-qubit entanglement in a superconducting circuit. _Nature_ 467, 574-578 (2010).
  * (45) Reed, M. D. _et al_. Realization of three-qubit quantum error correction with superconducting circuits. _Nature_ 482, 382-385 (2012).
  * (46) Barends, R. _et al_. Superconducting quantum circuits at the surface code threshold for fault tolerance. _Nature_ 508, 500-503 (2014).
  * (47) Chow, J. M. _et al_. Implementing a strand of a scalable fault-tolerant quantum computing fabric. _Nat. Commun._ 5, 4015 (2014).
  * (48) Motzoi, F., Gambetta, J. M., Rebentrost, P. & K. Wilhelm, F. Simple pulses for elimination of leakage in weakly nonlinear qubits. _Phys. Rev. Lett._ 103, 110501 (2009).
  * (49) Feng, Z. B. Robust quantum state transfer between a Cooper-pair box and diamond nitrogen-vacancy centers. _Phys. Rev. A_ 91, 032307 (2015).
  * (50) Zhu, S. L. & Wang, Z. D. Implementation of universal quantum gates based on nonadiabatic geometric phases. _Phys. Rev. Lett._ 89, 097902 (2002).
  * (51) Zhu, S. L. & Wang, Z. D. Unconventional geometric quantum computation. _Phys. Rev. Lett._ 91, 187902 (2003).
  * (52) Zhu, S. L. & Wang, Z. D. Geometric phase shift in quantum computation using superconducting nanocircuits: Nonadiabatic effects. _Phys. Rev. A_ 66, 042322 (2002).
  * (53) Abdumalikov, A. A., Jr. _et al_. Experimental realization of non-Abelian non-adiabatic geometric gates. _Nature_ 496, 482-485 (2013).
  * (54) Xue, Z.-Y., Zhou, J. & Wang, Z. D. Universal holonomic quantum gates in decoherence-free subspace on superconducting circuits. _Phys. Rev. A_ 92, 022320 (2015).
  * (55) Riebe, M. _et al_. Deterministic quantum teleportation with atoms. _Nature_ 429, 734-737 (2004).
  * (56) Tsomokos, D. I., Ashhab, S. & Nori, F. Fully connected network of superconducting qubits in a cavity. _New J. Phys._ 10, 113020 (2008).
  * (57) Galiautdinov, A. & Martinis, J. M. Maximally entangling tripartite protocols for Josephson phase qubits. _Phys. Rev. A_ 78, 010305 (2008).
  * (58) Peterer, M. J. _et al_. Coherence and decay of higher energy levels of a superconducting transmon qubit. _Phys. Rev. Lett._ 114, 010501 (2015).


11institutetext: University of California, Santa Cruz 22institutetext:
University of California, Berkeley 33institutetext: SentinelOne
44institutetext: insitro 55institutetext: Waymo LLC 66institutetext: The
Chinese University of Hong Kong
66email: {evin, shkashiw<EMAIL_ADDRESS>
#  3D Environment Modeling for Falsification and Beyond with Scenic 3.0

Eric Vin 11 0000-0002-3089-1129 Shun Kashiwa 11 Matthew Rhea 33 Daniel J.
Fremont 11 0000-0002-9992-9965
Edward Kim 22 Tommaso Dreossi 44 Shromona Ghosh 55 Xiangyu Yue 66
Alberto L. Sangiovanni-Vincentelli 22 Sanjit A. Seshia 22

###### Abstract

We present a major new version of Scenic, a probabilistic programming language
for writing formal models of the environments of cyber-physical systems.
Scenic has been successfully used for the design and analysis of CPS in a
variety of domains, but earlier versions are limited to environments that are
essentially two-dimensional. In this paper, we extend Scenic with native
support for 3D geometry, introducing new syntax that provides expressive ways
to describe 3D configurations while preserving the simplicity and readability
of the language. We replace Scenic’s simplistic representation of objects as
boxes with precise modeling of complex shapes, including a ray tracing-based
visibility system that accounts for object occlusion. We also extend the
language to support arbitrary temporal requirements expressed in LTL, and
build an extensible Scenic parser generated from a formal grammar of the
language. Finally, we illustrate the new application domains these features
enable with case studies that would have been impossible to accurately model
in Scenic 2.

###### Keywords:

Scenario description language Synthetic data Probabilistic programming
Automatic test generation Simulation

0

##  1 Introduction

A major challenge in the design of cyber-physical systems (CPS) like
autonomous vehicles is the heterogeneity and complexity of their environments.
Increasingly, problems of perception, planning, and control in such
environments have been tackled using machine learning (ML) algorithms whose
behavior is not well-understood. This trend calls for verification techniques
for ML-based CPS; however, a significant barrier has been the difficulty of
constructing _formal models_ that capture the diversity of these systems’
environments [25]. Indeed, building such models is a prerequisite not only for
verification but any formal analysis.

Scenic [10, 12] is a probabilistic programming language that addresses this
challenge by providing a precise yet readable formalism for modeling the
environments of CPS. A Scenic program defines a scenario describing physical
objects in a world, placing a probability distribution on their positions and
other properties; a single program can generate many different concrete scenes
by sampling from this distribution. Scenic also allows defining a stochastic
policy describing how agents behave over time, and implementing the resulting
dynamic scenarios in a variety of external simulators. Environment models
defined in Scenic can be used for many tasks: falsification, as in the VerifAI
toolkit [5], but also debugging, training data generation, and real-world
experiment design [13]. These tasks have been successfully demonstrated in a
variety of domains including autonomous driving [29], aviation [9], and
reinforcement learning agents [1].

Despite Scenic’s successes, it has several limitations that prevent its use in
a number of applications of interest. First, the original language models the
world as being _two-dimensional_ , since this enables a substantial
simplification in the language’s syntax (e.g., orientations being a single
angle) as well as optimizations in its implementation. The 2D assumption is
reasonable for domains such as driving but leaves Scenic unable to properly
model environments for aerial and underwater vehicles, for example. There can
be problems even for ground vehicles: Scenic could not generate a scene where
a robot vacuum is underneath a table, as their 2D bounding boxes would overlap
and Scenic would treat them as colliding. The use of bounding boxes rather
than precise shapes also leads Scenic to use a simplistic visibility model
that ignores occlusion, making it possible for Scenic to claim objects are
visible when they are not and vice versa: a serious problem when generating
training data for a perception system.

Fundamentally, verification of AI-based autonomous systems requires reasoning
about perception and physics in a 3D world. To support such reasoning, a
formal environment modeling language must provide faithful representations of
3D geometry. Towards this end, we present Scenic 3.0 111Available at:
https://github.com/BerkeleyLearnVerify/Scenic/, a largely backwards-compatible
major release featuring:

  * •

Native 3D Syntax: We update Scenic’s existing syntax to support 3D geometry,
and add new syntax making it possible to define complex 3D scenarios simply.
For example, an object’s orientation can be specified as being tangent to a
surface and facing another object as much as possible.

  * •

Precise 3D Shapes: The shapes of objects (as well as surfaces and volumes) can
be given by arbitrary 3D meshes, with Scenic performing precise reasoning
about collisions, containment, tangency, etc.

  * •

Precise Visibility: We use ray tracing for precise visibility checks that take
occlusion into account.

  * •

Temporal Requirements: We support arbitrary Linear Temporal Logic [21]
properties to constrain dynamic scenarios (vs. only $\textbf{G}p$ and
$\textbf{F}p$ in Scenic 2).

  * •

Rewritten Parser: We give a Parsing Expression Grammar [8] for Scenic, using
it to generate a parser with more precise error messages and better support
for new syntax and optimization passes.

We first define the new features in Scenic 3 in detail in Sec. 2, working
through several toy examples. Then, in Sec. 3, we describe two case studies
using Scenic with scenarios that could not be accurately modeled without the
new features: falsifying a specification for a robot vacuum and generating
training data constrained by an LTL formula for a self-driving car’s
perception system.

#### Related Work.

There are many tools for test and data generation [3]. Some approaches learn
from examples [26, 7] and so do not provide specific control over scenarios as
Scenic does. Approaches based on rules or grammars [26, 20, 17] provide some
control but have difficulty enforcing requirements over the generated data as
a whole. Several probabilistic programming languages have been used for
generation of objects and scenes [15, 22, 23], but none of them provide
specialized syntax to lay out geometric scenarios, nor for describing dynamic
behaviors. Finally, there has been work on synthetic data generation of 3D
scenes and objects using ML techniques such as GANs (e.g., [7, 30, 14]), but
these lack the specificity and controllability provided by a programming
language like Scenic.

##  2 New Features

###  2.1 3D Geometry

The primary new feature in Scenic 3 is the generalization of the language to 3
dimensions. Some changes, like changing the type system so that vectors have
length 3, are obvious: here we focus on cases where the existing syntax of
Scenic does not easily generalize, using simple scenarios to motivate our
design choices.

The first challenge when moving to 3D is the representation of an object’s
orientation in space: Scenic’s existing heading property, providing a single
angle, is no longer sufficient. Instead, we introduce yaw, pitch, and roll
angles, using the common convention for aircraft that these represent
_intrinsic_ rotations (i.e., yaw is applied first, then pitch is applied to
the resulting orientation, etc.). Using intrinsic angles makes it easy to
compose rotations: for example if we point an airplane towards a landing strip
with yaw and pitch (either manually or using Scenic’s facing toward specifier
— more on this below), we can add an additional roll by adding to that
property. To further simplify composition, we add a parentOrientation property
which specifies the local coordinate system in which the 3 angles above should
be interpreted (by default, the global coordinate system). This allows the
user to specify an orientation with respect to a previously-computed
orientation, for instance that of a tilted surface.

Scenic provides a flexible system of natural language specifiers which can be
combined to define properties of objects. Consider the following Scenic 3
code:

⬇

1objectA = new Object at (1, 2, 3), facing (45 deg, 0, 90 deg)

2objectB = new Object left of objectA by 1

3objectC = new Object above objectB by 1,

4 facing (Range(0,30) deg, Range(0,30) deg, 0)

Here, we use the at specifier to define a specific position for object A; the
facing specifier defines the object’s orientation using explicit yaw, pitch,
and roll angles. We then place object B left of A by 1 unit with the left of
specifier: this specifier now not only sets the position property, but also
sets the parentOrientation property to the orientation of object A (unless
explicitly overridden). Thus object B will be oriented the same way as A.
Similarly, object C is positioned relative to B and so inherits its
orientation as its parentOrientation. However, this time we use the facing
specifier to define random yaw and pitch angles, so object C will face up to
$30^{\circ}$ off of B.

Another way to specify an object’s orientation is the facing toward specifier.
This is a case where the 2D semantics become ambiguous in 3D. Consider a
scenario where the user wants an airplane to be “facing toward” a runway: the
plane’s body should be oriented toward the runway (giving its yaw), but it is
not clear whether in addition the plane should be pitched downward so that its
nose points directly toward the runway. To allow for both interpretations,
Scenic 3 has facing toward only specify yaw, while the new facing directly
toward specifier also specifies pitch. This is illustrated in Fig. 1.

Another common practice in 3D space is to place one object on another. For
example, we may want to place a chair on a floor, or a painting on a wall.
Scenic’s existing on specifier, which sets the position of an object to be a
uniformly random point in a given region, does not suffice for such cases
because it would cause the chair to intersect the floor or the painting to
penetrate the wall (or both). To fix this issue, we allow each object to
define a _base_ point, which on positions instead of the object’s center. The
default base point is the bottom center of the object’s bounding box, suitable
for cars and chairs for example; a Painting class could override this to be
the back center. Finally, to enable placing objects on each other, objects can
provide a topSurface property specifying the surface which is considered the
“top” for the purposes of the on specifier. As before, there is a reasonable
default (the upward-pointing faces of the object’s mesh) that can be
overridden. This syntax is illustrated in Fig. 2.

⬇

1 ego = new Ball at (0,0, 1.25)

2 new Plane at (2,0,0), facing toward ego

3 new Plane at (-2,0,0), facing directly toward ego

Figure 1: Line-of-sight-based orientations in Scenic. The ego ball
(highlighted green) is placed above the origin, as seen by the RGB global
coordinate axes, with one plane facing towards the ego and another facing
directly toward the ego.

⬇

1 floor = Object with width 5, with length 5, with height 0.1

2 ego = new Chair on floor

Figure 2: A Scenic program placing a chair on a floor. The Z-axis of the
global coordinate axes protrudes from the floor, indicating which direction is
up.

A final 3D complication arises when positioning objects on irregular surfaces.
Consider a pair of cars driving up an uneven mountain road, with one 10 meters
behind the other. We can use the ahead of specifier to place one car 10 meters
ahead of the other, but then the car will penetrate the road due to its upward
slope. Alternatively, the on specifier can correctly place the car so it is
tangent to the road, but then we cannot directly specify the distance between
the cars. The natural semantics here would be to combine the constraints from
_both_ specifiers, but this is illegal in Scenic 2 where a given property
(such as position) can only be specified by a single specifier at a time. We
enable this usage in Scenic 3 by introducing the concept of a _modifying
specifier_ that modifies the value of a property already defined by another
specifier. Specifically, if an object’s position is already specified, the on
specifier will _project_ that position down onto the given surface. This is
illustrated by the green chair in Fig. 3.

⬇

1 floor = new Object with width 5, with length 5, with height 0.1

2 air_cube = new Object at (Range(-5,5), Range(-5,5), 3),

3 facing (Range(0,360 deg), Range(0,30 deg), 0)

4 new Chair below air_cube, with color (0,0,200) # blue chair

5 ego = new Chair below air_cube, on floor # green chair

Figure 3: A Scenic program placing a green chair on the floor under a rotated
cube in midair. A blue chair is placed directly under the cube for clarity.

Note that the green chair is correctly upright on the floor even though it was
positioned relative to the cube, and so should inherit parentOrientation from
the cube as discussed above. In this situation, the user has provided no
explicit orientation for the chair, and both below and on can provide one. To
resolve this ambiguity, we introduce a _specifier priority_ system, where
specifiers have different priorities for the properties they specify
(generalizing Scenic’s existing system where a specifier could specify a
property _optionally_). In our example, below specifies position with priority
1 and parentOrientation with priority 3, while on specifies these with
priorities 1 and 2 respectively. So both specifiers determine position (with
on modifying the value from below as explained above), but on takes precedence
over below when specifying parentOrientation. This yields the expected
behavior while still allowing below to determine the orientation when used in
combination with other specifiers than on.

###  2.2 Mesh Shapes and Regions

Scenic 2’s approximation of objects by their bounding boxes was adequate for
2D driving scenarios, for example, but is wholly inadequate in 3D, where
objects are commonly far from box-shaped. For example, consider placing a
chair tucked in under a table. Since the bounding boxes of these two objects
intersect, Scenic 2 would always reject this situation as a collision and try
to generate a new scene, even if the chair and table are entirely separate. In
Scenic 3, each object has a precise shape given by its shape property, which
is set to an instance of the class Shape. The most general Shape class is
MeshShape, which represents an arbitrary 3D mesh and can be loaded from
standard formats; classes for primitive shapes like spheres are provided for
convenience. These shapes are used to perform precise collision and
containment checks between objects and regions.

Scenic also supports mesh regions, which can either represent surfaces or
volumes in 3D space. For example, given a mesh representing an ocean we might
want to sample on the surface for a boat or in the volume for a submarine.

All meshes in Scenic are handled using Trimesh [4], a Python library for
triangular meshes, which internally calls out to the tools Blender [27] and
OpenSCAD [28] for several operations. These operations tend to be expensive,
so Scenic uses several heuristics to cheaply determine simple cases; these can
give between a 10x-1000x speedup when sampling scenes.

###  2.3 Precise Visibility Model

Scenic 2’s visibility system simply checks if the bounding box corners of
objects are contained in the view cone of the viewing object, which is no
longer adequate for 3D scenarios with complex shapes. Visibility checks are
now done using ray tracing, and account for objects being able to occlude
visibility. In addition to standard pyramidal view cones used for cameras,
Scenic correctly handles wrap-around view regions such as those of common
LiDAR sensors. Visibility checks use a configurable density of rays, and are
optimized to only send rays in areas where they could feasibly hit the object.

###  2.4 Temporal Requirements

A key feature of Scenic is the ability to declaratively impose constraints on
generated scenes using require statements. However, Scenic 2 only provides
limited support for temporal requirements constraining how a dynamic scenario
evolves over time, with the require always and require eventually statements.
Slightly more complex examples, like “cars A and B enter the intersection
after car C”, require the user to explicitly encode them as monitors, which is
error-prone and yields verbose hard-to-read imperative code: this property
requires an 8-line monitor in [12].

Scenic 3 extends require to arbitrary properties in Linear Temporal Logic
[21], allowing natural properties like this to be concisely expressed:

⬇

1require (carA not in intersection and carB not in intersection

2 until carC in intersection)

The semantics of the operators always, eventually, next, and until are taken
from RV-LTL [2] to properly model the finite length of Scenic simulations.

###  2.5 Rewritten Parser

For interoperability with Python libraries, Scenic is compiled to Python, and
the original Scenic parser was implemented on top of the Python parser. This
approach imposed serious restrictions on the language design (e.g., forcing
non-intuitive operator precedences), made extending the parser difficult, and
led to misleading error messages which pointed to the wrong part of the
program.

Scenic 3 uses a parser automatically generated from a Parsing Expression
Grammar (PEG) [8] for the language. The parser is based on Pegen [24], the
parser generator developed for CPython, and the grammar itself was obtained by
extending the Python PEG. The new parser outputs an abstract syntax tree
representing the structure of the original Scenic code (unlike the old
parser), ensuring that syntax errors are correctly localized and simplifying
the task of writing analysis and optimization passes for Scenic.

This new parser gives us flexibility in designing and implementing the
language. For example, we carefully assigned precedence to the four new
temporal operators so that users can naturally express temporal requirements
without unnecessary parentheses. There are additional benefits from having a
precise machine-readable grammar for Scenic: for instance, as we wrote the
grammar, we discovered ambiguities that had previously been unnoticed and made
minor changes to the language to eliminate them. The grammar could also be be
used to fuzz test the compiler and other tools operating on Scenic programs.

##  3 Case Studies

In this section, we discuss two case studies in the robotics simulator Webots
[19]. The code for both case studies is available in the Scenic GitHub
repository [11]. The first case study, performing falsification of a robot
vacuum, illustrates a domain that could not be modeled in Scenic 2 due to the
lack of 3D support. The second case study, generating data constrained by an
LTL formula for testing or training the perception system of an autonomous
vehicle, is an example of how the new features in Scenic 3 can significantly
improve effectiveness even in one of Scenic’s original target domains.

###  3.1 Falsification of a Robot Vacuum

In this example we evaluate the iRobot Create [16], a robot vacuum, on its
ability to effectively clean a room filled with objects. We use a
specification stating that the robot must clean at least a third of the room
within 5 minutes: in Signal Temporal Logic [18], the formula
$\varphi=F_{[0,300]}(\textit{coverage}>1/3)$. We use Scenic to generate a
complete room and export it to Webots for simulation. The room is surrounded
by four walls and contains two main sections: in the dining room section, we
place a table of varied width and length randomly on the floor, with 3 chairs
tucked in around it and another chair fallen over. In the living room section,
we place a couch with a coffee table in front of it, both leaving randomly-
sized spaces roughly the diameter of the robot vacuum. We then add a variable
number of toys, modeled as small boxes, cylinders, cones, and spheres, placed
randomly around the room; for a taller obstacle, we place a stack of 3 box
toys somewhere in the room. Finally, we place the vacuum randomly on the
floor, and use Scenic’s mutate statement to add noise to the positions and yaw
of the furniture. Several scenes sampled from this scenario are shown in Fig.
5.

Figure 4: Several sampled scenes from the robot vacuum scenario.

Figure 5: Spec. robustness value vs. number of toys, averaged over 25
simulations.

We tested the default controller for the vacuum against 0, 1, 2, 4, 8, and
16-toy variants of our Scenic scenario, running 25 simulations for each
variant. For each simulation, we computed the robustness value [6] of our spec
$\varphi$. The average values are plotted in Fig. 5, showing a clear decline
as the number of toys increases. Many of the runs actually falsified
$\varphi$: up to 44% with 16 toys.

There are several aspects of this example that would not be possible in Scenic
2. First, the new syntax in Scenic 3 allows for convenient placement of
objects, specifically the use of on in combination with left of and right of,
to place the chairs on the appropriate side of the dining table but on the
floor. Many of the objects are also above others and have overlapping bounding
boxes, but because Scenic now models shapes precisely, it is able to properly
register these objects as non-intersecting and place them in truly feasible
locations (e.g., in Fig. 5, the toy under the dining table in the top left
scene and the robot under the coffee table in the bottom right scene).

###  3.2 Constrained Data Generation for an Autonomous Vehicle

In this example we generate instances of a potentially-unsafe driving scenario
for use in training or testing the perception system of an AV. Consider a car
passing in front of the AV in an intersection where the AV must yield, and so
needs to detect the other car before it becomes too late to brake and avoid a
collision. We want to generate time series of images labeled with whether or
not the crossing car is visible, for a variety of different scenes with
different city layouts to provide various openings and backdrops. Our scenario
places both the ego car (the AV) and the crossing car randomly on the
appropriate road ahead of the intersection. We place several buildings along
the crossing road that block visibility, allowing some randomness in their
position and yaw values. We also place several buildings completely randomly
behind the crossing road to provide a diverse backdrop of buildings in the
images. Finally, we want to constrain data generation to instances of this
scenario where the crossing car is not visible until it is close to the AV, as
these will be the most challenging for the perception system. Using the new
LTL syntax, we simply write:

⬇

1require (not ego can see car) until distance to car < 75

(a) 2 seconds: not visible

(b) 2.5 seconds: visible

(c) 4 seconds: visible

(d) 4.5 seconds: not visible

Figure 6: Intersection simulation images, with visibility label for the
crossing car.

Fig. 6 shows a simulation sampled from this scenario. In Scenic 2, the
crossing car would be wrongly labeled as visible in image (a), since the
occluding buildings would not be taken into account. This would introduce
significant error into the generated training set, which in previous uses of
Scenic had to be addressed by manually filtering out spurious images; this is
avoided with the new system.

##  4 Conclusion

In this paper we presented Scenic 3, a major new version of the Scenic
programming language that provides full native support for 3D geometry, a
precise occlusion-aware visibility system, support for more expressive
temporal operators, and a rewritten extensible parser. These new features
extend Scenic’s use cases for developing, testing, debugging, and verifying
cyber-physical systems to a broader range of application domains that could
not be accurately modeled in Scenic 2. Our case study in Section 3.1
demonstrated how Scenic 3 makes it easier to perform falsification for CPS
with complex 3D environments. Our case study in Section 3.2 further showed
that even in domains that could already be modeled in Scenic 2, like
autonomous driving, Scenic 3 allows for significantly more precise
specifications due to its ability to reason accurately about 3D orientations,
collisions, visibility, etc.; these concepts are often relevant to the
properties we seek to prove about a system or an environment we want to
specify. We expect the improvements to Scenic we describe in this paper will
impact the formal methods community both by extending Scenic’s proven use
cases in simulation-based verification and analysis to a much wider range of
application domains, and by providing a 3D environment specification language
which is general enough to allow a variety of new CPS verification tools to be
built on top of it.

In future work, we plan to develop 3D scenario optimization techniques
(complementing the 2D methods Scenic already uses) and explore additional 3D
application domains such as drones. We also plan to leverage the new parser to
allow users to define their own custom specifiers and pruning techniques.

Acknowledgements The authors thank Ellen Kalvan for helping debug and write
tests for the prototype, and several anonymous reviewers for their helpful
comments. This work was supported in part by DARPA contracts FA8750-16-C0043
(Assured Autonomy) and FA8750-20-C-0156 (Symbiotic Design of Cyber-Physical
Systems), by Berkeley Deep Drive, by Toyota through the iCyPhy center, and NSF
grants 1545126 (VeHICaL) and 1837132.

## References

  * [1] Azad, A.S., Kim, E., Wu, Q., Lee, K., Stoica, I., Abbeel, P., Sangiovanni-Vincentelli, A., Seshia, S.A.: Programmatic modeling and generation of real-time strategic soccer environments for reinforcement learning. Proceedings of the AAAI Conference on Artificial Intelligence 36, 6028–6036 (2022)
  * [2] Bauer, A., Leucker, M., Schallhart, C.: Comparing LTL semantics for runtime verification. Journal of Logic and Computation 20(3), 651–674 (2010). https://doi.org/10.1093/logcom/exn075
  * [3] Broy et al.: Model-based testing of reactive systems. Lecture Notes in Computer Science (2005). https://doi.org/10.1007/b137241
  * [4] Dawson-Haggerty et al.: Trimesh, https://trimsh.org
  * [5] Dreossi, T., Fremont, D.J., Ghosh, S., Kim, E., Ravanbakhsh, H., Vazquez-Chanlatte, M., Seshia, S.A.: VerifAI: A toolkit for the formal design and analysis of artificial intelligence-based systems. Computer Aided Verification p. 432–442 (2019)
  * [6] Fainekos, G.E., Pappas, G.J.: Robustness of temporal logic specifications. In: Havelund, K., Núñez, M., Roşu, G., Wolff, B. (eds.) Formal Approaches to Software Testing and Runtime Verification. pp. 178–192. Springer Berlin Heidelberg, Berlin, Heidelberg (2006)
  * [7] Fisher, M., Ritchie, D., Savva, M., Funkhouser, T., Hanrahan, P.: Example-based synthesis of 3d object arrangements. ACM Transactions on Graphics 31(6), 1–11 (2012). https://doi.org/10.1145/2366145.2366154
  * [8] Ford, B.: Parsing expression grammars: a recognition-based syntactic foundation. In: Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages. pp. 111–122 (2004)
  * [9] Fremont, D.J., Chiu, J., Margineantu, D.D., Osipychev, D., Seshia, S.A.: Formal analysis and redesign of a neural network-based aircraft taxiing system with VerifAI. Computer Aided Verification p. 122–134 (2020)
  * [10] Fremont, D.J., Dreossi, T., Ghosh, S., Yue, X., Sangiovanni-Vincentelli, A.L., Seshia, S.A.: Scenic: A language for scenario specification and scene generation. Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (2019)
  * [11] Fremont, D.J., Kim, E., Dreossi, T., Ghosh, S., Yue, X., Sangiovanni-Vincentelli, A.L., Seshia, S.A.: Scenic Repository, https://github.com/BerkeleyLearnVerify/Scenic
  * [12] Fremont, D.J., Kim, E., Dreossi, T., Ghosh, S., Yue, X., Sangiovanni-Vincentelli, A.L., Seshia, S.A.: Scenic: A language for scenario specification and data generation. Machine Learning (2022). https://doi.org/10.1007/s10994-021-06120-5
  * [13] Fremont, D.J., Kim, E., Pant, Y.V., Seshia, S.A., Acharya, A., Bruso, X., Wells, P., Lemke, S., Lu, Q., Mehta, S.: Formal scenario-based testing of autonomous vehicles: From simulation to the real world. In: 2020 IEEE Intelligent Transportation Systems Conference, ITSC 2020. pp. 913–920. IEEE (2020), https://arxiv.org/abs/2003.07739
  * [14] Fu, R., Zhan, X., Chen, Y., Ritchie, D., Sridhar, S.: Shapecrafter: A recursive text-conditioned 3d shape generation model. CoRR abs/2207.09446 (2022). https://doi.org/10.48550/arXiv.2207.09446, https://doi.org/10.48550/arXiv.2207.09446
  * [15] Goodman, N.D., Stuhlmüller, A.: The Design and Implementation of Probabilistic Programming Languages. http://dippl.org (2014), accessed: 2023-1-28
  * [16] iRobot: Create Educational Robot, https://edu.irobot.com/what-we-offer/create3
  * [17] Jiang, C., Qi, S., Zhu, Y., Huang, S., Lin, J., Yu, L.F., Terzopoulos, D., Zhu, S.C.: Configurable 3d scene synthesis and 2d image rendering with per-pixel ground truth using stochastic grammars. International Journal of Computer Vision 126(9), 920–941 (2018). https://doi.org/10.1007/s11263-018-1103-5
  * [18] Maler, O., Nickovic, D.: Monitoring temporal properties of continuous signals. In: Proc. FORMATS (2004)
  * [19] Michel, O.: Webots: Professional mobile robot simulation. Journal of Advanced Robotics Systems 1(1), 39–42 (2004), http://www.ars-journal.com/International-Journal-of-Advanced-Robotic-Systems/Volume-1/39-42.pdf
  * [20] Müller, P., Wonka, P., Haegler, S., Ulmer, A., Van Gool, L.: Procedural modeling of buildings. ACM Transactions on Graphics 25(3) (2006), https://doi.org/10.1145/1141911.1141931
  * [21] Pnueli, A.: The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science (sfcs 1977). pp. 46–57 (1977). https://doi.org/10.1109/SFCS.1977.32
  * [22] Ritchie, D.: Quicksand: A Lightweight Implementation of Probabilistic Programming for Procedural Modeling and Design. 3rd NIPS Workshop on Probabilistic Programming (2014), https://dritchie.github.io/pdf/qs.pdf
  * [23] Ritchie, D.: Probabilistic programming for procedural modeling and design. Ph.D. thesis, Stanford (2016), https://purl.stanford.edu/vh730bw6700
  * [24] Salgado, P.G., van Rossum, G., Nikolaou, L.: Pegen, https://we-like-parsers.github.io/pegen/
  * [25] Seshia, S.A., Sadigh, D., Sastry, S.S.: Towards Verified Artificial Intelligence. ArXiv e-prints (July 2016)
  * [26] Sutton, M., Greene, A., Amini, P.: Fuzzing: Brute force vulnerability discovery. Addison-Wesley (2007)
  * [27] The Blender Community: Blender, http://www.blender.org
  * [28] The OpenSCAD Community: OpenSCAD, https://openscad.org
  * [29] Viswanadha, K., Indaheng, F., Wong, J., Kim, E., Kalvan, E., Pant, Y., Fremont, D.J., Seshia, S.A.: Addressing the IEEE AV test challenge with Scenic and VerifAI. 2021 IEEE International Conference on Artificial Intelligence Testing (AITest) (2021)
  * [30] Wang, K., Savva, M., Chang, A.X., Ritchie, D.: Deep convolutional priors for indoor scene synthesis. ACM Trans. Graph. 37(4), 70 (2018). https://doi.org/10.1145/3197517.3201362, https://doi.org/10.1145/3197517.3201362