Detecting Entanglement Generating Circuits in Cloud-Based Quantum Computing

Entanglement, a direct consequence of elementary quantum gates such as controlled-NOT or Toffoli gates, is a key resource that leads to quantum advantages. In this work, we establish the framework of certifying entanglement generation in cloud-based quantum computing services. Namely, we present the construction of quantum circuits that certify entanglement generation in a circuit-based quantum computing model. The framework relaxes the assumption of the so-called qubit allocation, which is the step in a cloud service to relate physical qubits in hardware to a circuit proposed by a user. Consequently, the certification is valid no matter how unsuccessful qubit allocations may be in cloud computing or how untrustful the service may be in qubit allocations. We then demonstrate the certification of entanglement generation on two and three qubits in the IBMQ and IonQ services. Remarkably, entanglement generation is successfully certified in the IonQ service that does not provide a command of qubit allocations. The capabilities of entanglement generation in the circuits of IBMQ and IonQ are also quantified. We envisage that the proposed framework is applied when cloud-based quantum computing services are exploited for practical computation and information tasks, for which our results would find if it is possible to achieve quantum advantages.


I. INTRODUCTION
Efficient information processing beyond the existing limitations may be achieved by applying the laws of quantum mechanics as the working principles [1].For instance, the prime-number factorization problem, considered to be hard with conventional computers, turns out to be tractable in a quantum computer [2].Quantum database search is more efficient than its classical counterpart by showing a quadratic speedup [3].
The currently available quantum technologies, often referred to as noisy intermediate scale quantum (NISQ) technologies [4], yet contain noise in all of the steps, the preparation of qubits, a quantum circuit, and a measurement.It has been shown that, remarkably, NISQ systems can work beyond the classical limitations by having the laws of quantum mechanics as the working principles in computational tasks.It is immediately possible to achieve quantum advantages over the classical counterparts [5][6][7].Prototype quantum computers based on the NISQ technologies are also available from industry vendors, such as IBMQ [8] and IonQ [9].They can be accessed in the form of cloud-based quantum computing.
It appears that in fact, entanglement has been identified as a general and key resource that leads to the quantum advantages [10].Since entangled states are a direct consequence of universal quantum gates such as controlled-NOT or Toffoli gates [11], the presence of entanglement also verifies the capabilities of the universal quantum gates.Entangled states can be used to enhance the performance of various quantum information applications, such as quantum channels, networks, quantum sensing, and quantum computing [12][13][14].Arbitrarily weakly entangled states are also useful [15].Once entangled states are detected, they can be manipulated and distilled into maximally entangled states [16].
Recently, quantum algorithms fitted to NISQ technologies have been proposed, namely, hybrid quantumclassical algorithms [17] such as quantum approximate optimization algorithms (QAOA) [18] and variational quantum eigensolver (VQE) [19]: shallow quantum circuits that are well-designed within the capability of NISQ technologies are repeatedly applied.One can find that the building blocks are characterized by parameterized quantum circuits (PQCs) composed of singleand two-qubit gates with a polynomial number of control parameters. it has been shown that PQCs can be used in practical quantum computing applications, e.g., machine learning, neural networks, and optimization [20][21][22][23][24][25].The capability of generating entangled states is one of the key properties that enable PQCs to lead to quantum advantages [26,27].
All these signify the importance of certifying entanglement generation in practice, in particular, in the prototype quantum computers with NISQ technologies.The certification of entanglement generation in quantum hardware shows a realization of two-and three-qubit elementary gates.It also implies the practical usefulness of quantum hardware at the most fundamental level toward quantum advantages in real applications.
A straightforward strategy to find entanglement generation by a circuit-based quantum computing model would be to perform quantum process tomography that identifies an experimental quantum operation acted on qubits [28,29].Once a quantum operation is fully char- The scenario of a cloud-based quantum computing service is summarized.The input to the service by a user is a design of a quantum circuit.The service begins with the step called qubit allocations that relate physical qubits to a designed circuit.An implementation of the circuit is run in the service, and then measurement statistics returns to the user as the outcome.Given the two types of data, a computational task is concluded.Quantum advantages may be obtained when quantum circuits capable of generating entangled states are realized in the service.This work presents the architecture of quantum circuits for certifying entanglement generation in cloud-based quantum computing services.acterized, one may find if the verified dynamics can generate entangled states.However, the strategy is neither practical nor efficient due to the required experimental resources.Quantum process tomography of n-qubit dynamics requires O(2 2n ) measurements as well as an inverse problem involved in the estimation.
One may consider entanglement witnesses (EWs) in a quantum circuit and realize them in a cloud-based quantum computing service, see e.g.EWs in the IBMQ service [30].We recall that EWs are a well-established tool to detect entangled states without the full knowledge via quantum tomography [31][32][33].

Qubit allocations
Note, however, that a cloud computing service does not precisely correspond to a standard scenario of a quantum laboratory.This is because of an additional step called a command of qubit allocations, which relate a cloud computing service to physical qubits in hardware according to a circuit sent by a user.
The protocol of the cloud-based quantum computing services is summarized as follows.
• Step1.A user prepares a design of a quantum circuit from a mathematical problem of interest.
• Step2.A cloud-based quantum computing service runs an implementation of the circuit in its devices and collects the outcome statistics.
• Step3.A user acknowledges the statistics of measurement outcomes.
As for a user in a cloud service, a design of a quantum circuit and the outcome statistics only are given, in which the mapping between a quantum circuit and quantum hardware is performed by the service via the command of qubit allocations.
Qubit allocations: A cloud-based quantum computing service relates physical qubits in hardware to a circuit proposed by a user.
Then, in a realization EWs in cloud-based quantum computing service, we point out that it is necessary to trust qubit allocations.The reason is that, since an EW is not positive, its expectation value can be estimated by different measurements: in each measurement the same qubits should be addressed.To make the point clear, let us consider a realization of EWs, as follows.
Suppose that it is aimed to find entanglement generation among qubits labeled by A and B. Technically, an EW corresponds to a Hermitian operator W AB such that The task is to estimate an expectation value, tr[W AB ρ AB ], for an unknown state ρ AB : negative values certify that the state ρ AB is entangled.As an EW is not positive, it can be implemented via its decomposition into positive and negative projections, i.e., where c ± > 0 and P AB ± ≥ 0 are projections onto positive and negative eigenvalues, respectively.In a prepareand-measure (P&M) scenario, an experimenter realizes a measurement with P AB ± and then performs measurements to find tr[P AB ± ρ AB ] to construct an expectation value tr[W AB ρ AB ], see Equation 1.
In cloud quantum computing, it is aimed to find if an entangled state ρ can be generated among qubits labeled by A and B in the service.To this end, a user asks the service to prepare quantum circuits that realize a state ρ and a measurement P ± in qubits A and B. Qubit allocations signify the service's mapping between the circuits by a user and the qubits labeled in quantum hardware.If a service addresses qubits A and B in the estimation of tr[P + ρ] but some other ones for tr[P − ρ], say C and D, the service fails to estimate the expectation value tr[Wρ], i.e., entanglement generation between two qubits A and B of interest is not certified.We stress that it is crucial to ensure that the same qubits are addressed in the estimation of both quantities tr[P ± ρ]: in this way, entanglement generation is in any case certified for two qubits that may not be identified.
For instance, the IBMQ service provides qubit allocations in two ways, manual or automatic: a user can choose the qubits in the service or ask the service to decide those qubits used.In the latter case of automatic allocations, the service also reports those qubits used during the circuit evaluation.However, the command of qubit allocations is not always available: it lacks in the IonQ service, where different qubits are addressed at every time a new circuit is applied.Thus, EWs cannot be realized in IonQ, although they can be implemented in IBMQ under the assumption that qubit allocations by a service are trusted.
It is also worth mentioning that it is an additional assumption to trust qubit allocations by a cloud computing service.In a quantum laboratory, e.g., entanglement detection in trapped ions [34,35], they are experimenters which control qubit allocations.

Summary of the contribution
In this work, we introduce entanglement-witnessing circuits (EWCs) by transferring entanglement witnesses (EWs) in a P&M scenario to a quantum circuit.We show that the capability of generating entanglement of quantum circuits can be certified by EWCs without quantum tomography.Remarkably, the framework relaxes the assumption of qubit allocations.In other words, the validity of a conclusion in the certification framework does not rely on how successful or unsuccessful qubit allocations are in a cloud computing service.The results show that the framework of EWCs achieves a higher level of certification; as the number of assumptions is fewer, the higher the level of certification is obtained.

Scenario
Preparation Certification P & M States Entanglement Computing Circuits Entanglement generation Our approach to constructing EWCs relies on the structural physical approximation (SPA) [36,37] that facilitates a transformation of EWs to non-negative operators that can be prepared as EWCs.Once EWs are transferred to EWCs, we employ the brand new and efficient framework called EW 2.0, which boosts the capability of an EW twice higher [38].Compared to Equation 1, EW 2.0 offers two bounds, satisfied by all separable states, to an EW.Then, entangled states can be concluded by a violation of either of the bounds.Consequently, EWCs constructed from EW 2.0 are twice more efficient compared to the cases followed by standard EWs.All these constitute the architecture of certifying EGCs in a circuit-based quantum computing model.As an EW is to the detection of entangled states, an EWC is to the certification of entanglement generation by a quantum circuit.
We then apply EWCs to certify entanglement generation in cloud-based quantum computing services in the IBMQ and IonQ services.As mentioned above, a command of qubit allocations is provided in the IonQ service, for which our framework successfully certifies entanglement generation.Note that it is the first time that entanglement generation is certified in the IonQ hardware.We stress that it is EWCs that make it possible to certify entanglement generation in cases when qubit allocations are not trusted.The quantification of entanglement generation in IBMQ and IonQ is presented from the data collected in the certification.
The article is organized as follows.In Section II, entanglement detection in a P&M scenario is presented.Examples of two-and three-qubit entangled states are shown as consequences of universal gates.The brand new framework EW 2.0 is also summarized.In Section III, the P&M scenario is transferred to a circuit-based quantum computing model.The architecture for certifying EGCs is shown by constructing EWCs via SPA and EW 2.0.In Section IV, the certification of two-qubit EGCs is demonstrated in IBMQ Casablanca.In Section V, two-and three-qubit EGCs are realized in IonQ and their certification is demonstrated.In Section VI, the results with IBMQ and IonQ systems are compared and discussed.In Section VII, we summarize the results and conclude their applications with NISQ technologies.

II. ENTANGLED STATES
In this section, the P&M scenario of detecting entangled states is summarized.The recent result of EW 2.0 is also reviewed with illuminating examples.

A. Entanglement and universal gates
A quantum circuit can be generally decomposed into a set of quantum gates.Conversely, a collection of gates can efficiently approximate an arbitrary quantum circuit.The property is referred to as universality, and defines a set of universal gates [39].The efficiency in the approximation can be estimated via the Solovay-Kitaev theorem [40].For instance, well known examples of universal gates are single-qubit and a controlled-NOT gates.Or, a Toffoli and single-qubit gates are also universal.Hence, it suffices to consider two-and three-qubit entangled states for the certification of EGCs.
Entanglement-generating circuits (EGCs) : A circuit U for n qubits is an EGC if there is an n-qubit unentangled state |ψ such that the resulting state U|ψ is entangled.In general, an n-qubit EGC can be factorized into two-and three-qubit EGCs.

B. Entanglement witness 2.0
In general, an EW can be realized by local measurements and classical communication.This means that an EW W admits a decomposition as follows, with a quantum measurement described by positiveoperator-valued-measure (POVM) elements {M i } and {M j }, where c ij are real numbers.Equation 2 also tells how to relate measurement outcomes to entanglement detection.Once measurement outcomes are collected, one can find probability distributions, p exp (ij) = tr[ρM i ⊗ M j ] for a unknown state ρ.Then, the expectation value can be obtained by collecting the probabilities, Negative expectation values verify entangled states.
Let us illustrate how an EW can detect entangled states.The unit of entanglement is defined by an entangled bit (ebit) [16], which contains various usefulness, quantum teleportation [41], quantum key distribution [42], measurementbased quantum computing [43], etc.Let us consider a noisy ebit where I denotes the 2 × 2 identity matrix.This state is entangled for p ∈ [0, 2/3) [44,45].An EW for noisy ebits can be constructed, where X, Y and Z are Pauli matrices Then, it hods that tr[Wρ] < 0 for all p ∈ [0, 2/3).This also shows that entanglement detection with EWs is robust to noise.Note, however, that EWs are not efficient: the EW in Equation 6 fail to detect other Bell states: To be precise, an optimal EW for a single Bell state cannot detect other Bell states.
The framework of EW 2.0 improves the detection capability of a single EW [38].Let us begin with an EW for two-qubit states, denoted by W (+) .Its positive structural physical approximation (SPA) has been introduced in [36,46] as a mapping from with a minimal p ∈ (0, 1).We call the construction as a positive SPA in that (1 − p) > 0. A negative SPA can be defined with (1 − p) < 0 in the other way around such that the resulting operator is non-negative.Let us then deduce an EW W (−) from the SPAed one W above via negative SPA as follows with a maximal q > 1.Then, we call W (−) is mirrored to W (+) , vice versa.Note that two EWs are obtained from a single SPAed non-negative operator W. That is, given an EW, EW 2.0 tells us how to crop an additional EW.In Ref. [38], it has been shown that a SPAed operator W can contain the detection capabilities of both of the mirrored EWs.This can be seen by lower and upper bounds satisfied by all separable states, called EW 2.0.The framework of EW 2.0: where The range [B L ( W), B U ( W)] is called the separability window for W.
The set of entangled states violating the lower bound is the same to that of those states detected by W (+) , i.e., the lower bound is equivalent to the condition that tr[W (+) σ sep ] ≥ 0 for all separable states σ sep .Similarly, the upper bound is equivalent to the condition with its mirrored one W (−) that tr[W (−) σ sep ] ≥ 0 for all separable states σ sep .We stress that as it is shown in Equation 10, two EWs are implemented in the estimation of a single observable W.
Two remarks are in order as follows.Firstly, it is important to find probabilities p exp (ij) for all i, j in Equation 3 from experimental data.This means that a designed quantum circuit needs to be repeated sufficiently many times for different POVM elements.Secondly, it is crucial to assume that a measurement with POVM elements {M i } and {M j } in Equation 3 is performed on the qubits for which it is questioned whether their state is entangled, or not; otherwise, a measurement setup that prepares an EW would fail in the certification.In cloud-based quantum computing, this is translated to the assumption that a qubit allocation is trusted.If a qubit allocation is not provided in the service such as IonQ, EWs cannot be directly applied to detecting entangled states.

C. Two-qubit entanglement
In this subsection, we show how to construct EW 2.0 for two-qubit entangled states.For two-qubit states, a controlled-NOT gate that generates Bell states constitutes a universal set of quantum gates.We present how to construct EW 2.0 for detecting multiple Bell states, whereas a standard EW can detect a single Bell state only.
Let us consider with two Bell states |φ + and |ψ − .It has been known that an EW W (+) in the following can be applied to detect the state |φ + [47][48][49], One can obtain its mirrored EW W (−) via EW 2.0, which detects |ψ − , i.e., tr(W Note that the EWs are robust to noise, as they also work when the Bell states are admixed with a depolarization.It follows that the SPAed operator is constructed: with p = 1/2 and q = 3/2.It is straightforward to construct the inequalities satisfied by all separable states σ sep , where the lower and upper bounds are equivalent to detection by W (+) and W (−) , respectively.Thus, the framework of EW 2.0 is shown for detecting two Bell states.

D. Three-qubit entanglement
As a three-qubit gate, a Toffoli gate, generating threequbit entangled states constitutes a universal set of quantum gates, let us show how to construct EW 2.0 for detecting three-qubit entangled states.We recall that threequbit entangled states are classified into two classes, Greenberger-Horne-Zeilinger (GHZ) [50] and W types, which cannot be connected by stochastic local operations and classical communication.It turns out that almost all three-qubit entangled pure states are of the GHZ type [51].Hence, let us consider an EW in the following for detecting a GHZ state [47][48][49], where we have used the convention that labels the qubit in the subscript, e.g., It is useful to rewrite the EW in terms of projectors to find those states detected, where |φ ± x = (|x ± |x )/ √ 2 for a sequence x = x 1 x 2 x 3 and x = x1 x2 x3 with x1 = 1 − x 1 .For instance, a GHZ state |φ + 000 = (|000 + |111 )/ √ 2 is detected: one can find that tr[W (+) |φ + 000 φ + 000 |] = −1/16.
Its mirrored EW W (−) is then obtained via EW 2.0, It is also useful to rewrite it in terms of projectors to find those entangled states detected by the EW, It is clear that EW W (−) can detect another type of a GHZ state |φ 010 , i.e., tr[W (−) |φ − 010 φ − 010 |] = −1/16.The framework of EW 2.0 is completed by a single non-negative observable that contains both EWs W (±) , To clarify the he relations with the EWs, one can find the identities in the following with p = 1/3 and q = 5/3.After all, the framework of EW 2.0 is shown with inequalities satisfied by all separable states, It is shown how EW 2.0 can be constructed to detect GHZ-type three-qubit entangled states.

III. ENTANGLEMENT GENERATING CIRCUITS
Quantum computing is structured by initialization, a quantum dynamics, e.g., a quantum circuit, and a measurement.The initialization prepares n qubits in a fixed state |0 ⊗n .Then, a designed quantum circuit is performed, which corresponds to a quantum algorithm.A measurement is performed in the computational basis |0 and |1 .The outcome statistics is used to conclude a computational task.
The goal is to certify entanglement generation in a quantum circuit.Let U G denote a quantum circuit realized in quantum computing.Entanglement generation may be certified by applying EW 2.0 to a resulting state U G |0 ⊗ .We then have to set the framework of transferring EWs to a circuit architecture for the certification of entanglement generation by U G .As mentioned earlier, it suffices to consider circuits U G of two and three qubits.Apart from single-qubit gates, a set of universal quantum gates contains either two-or three-qubit gates.
In this section, we show how to construct entanglement-witnessing circuits (EWCs) via the framework of EW 2.0.It is also shown that, by doing so, qubit allocations can be relaxed.

A. Building a quantum circuit
An arbitrary quantum circuit can be efficiently approximated by a set of universal gates, which means that single-and two-qubit gates are universal [40].Note also that Toffoli and Hadamard gates are universal, where a Toffoli gate is a three-qubit entangling gate.These hugely simply the certification scenario into two-and three-qubit EGCs.
In the case of single-qubit gates, there is a general decomposition in terms of three rotations.A single qubit gate U can be implemented as U = e iα AXBXC where A, B, and C satisfies ABC = I and α is a phase [52].For instance, one can choose where R n(θ) denotes a rotation counterclockwise by θ about the axis n in the Bloch sphere.A two-qubit gate can be written as a controlled-U gate for a single-qubit gate U, Throughout, we use the gate decomposition introduced above.

B. The architecture for certifying EGCs
The framework of EW 2.0 makes it possible to compress that multiple EWs into estimation of a single observable W. The observable is nothing but a nonnegative and unit-trace operator; it is important that its purification can be admitted.Namely, there exists a state | W SA over a system S and an ancilla A such that: Note that a standard EW W 0 does not admit a purification.
Then, the central idea of certifying n-qubit EGCs is to estimate the expectation value of an SPAed operator W via its purification.Let us reiterate the formalism of EW 2.0 in Equation 10 in terms of quantum circuits.For < l a t e x i t s h a 1 _ b a s e 6 4 = " g q N n b a z s 2 y X 9 s M 5 T e X a r Q 3

EWCs
< l a t e x i t s h a 1 _ b a s e 6 4 = " g q N n b a z s 2 y X 9 s M 5 T e X a r Q 3 Scheme 1 and Scheme 2 for certifying EGCs are presented.In Scheme 1, an EWC is applied right after an EGC is applied, and certifies an EGC.A two-qubit EWC is also shown in Figure 4.A drawback of the scheme is that the overall circuit depth increases by both of the circuits.This can be prescribed in Scheme 2 where two circuits are prepared in parallel.The overall circuit depth is then as much as that of an EGC addition to the number of qubits.
where U G denotes a quantum circuit that generates a state ρ: thus, U G is also unknown.Note that from the framework of EW 2.0, on can conclude that a preparation circuit U G is an EGC if the expectation in Equation 24is not within the lower and upper bounds in Equation 10.
It is left to construct EWCs that certifies EGCs.In what follows, two schemes of constructing EWCs are presented.

Scheme 1
One can find a unitary transformation U W that prepares a purification | W SA , see Equation 23| where 2n qubits are sufficient for the purification.As the circuit U W is used to detect entangled states, i.e., to find if a circuit U G is an EGC, it is an EWC.With an EWC U W , it holds that where p(0 • • • 0) denotes the probability of obtaining the 2n-bit sequence 0 • • • 0 in a measurement.Let us explain Equation 26as follows.First, n qubits are initialized in the state |0 ⊗n and a circuit U G that < l a t e x i t s h a 1 _ b a s e 6 4 = " K 6 B c o n p 5 N K y e d h m 8 T f s 0 l J j w w n d m 5 a t 7 L x P + 8 T q w H V 3 5 C R R R r I v B s 0 S B m j g 6 d L A 2 n T y X B m k 0 M A S y p u d X B I 5 C A t c m s a E L w 5 l 9 e J M 2 z s n d R d u / O S 5 V q H k c B H a F j d I o 8 d I k q 6 B r V U Q N h l K J n 9 I r e r C f r x X q 3 P m a t S 1 Y + c 4 D + w P r 8 A f I y l q I = < / l a t e x i t >

IBM Casablanca
< l a t e x i t s h a 1 _ b a s e 6 4 = " f Q EGCs < l a t e x i t s h a 1 _ b a s e 6 4 = " g q N n b a z s 2 y X 9 s M 5 T e X a r Q 3 1 h 2 u g = " > A A A B 9 H i c b V D L S g M x F L 1 T X 7 W + q i 7 d B I v g q s y o q M t i E V x W s A 9 o h 5 J J M

Scheme 2
The probability in Equation 26 may be realized in a shorter-depth scheme.The strategy is to translate the estimation scheme in the previous section in a measurement-based way.Let us first show how an overlap of two states can be estimated.Let σ 1 and σ 2 denote 4. Qubit allocations: We remark that the expectation value in Equation 24is estimated by applying a unitary transformation, i.e., at one go in a quantum circuit.Since the initial state in a circuit is given by |0 ⊗n it is not required to address which qubits are to be used.This immediately gets rid of the necessity of a qubit allocation to certify EGCs: no matter how a designed circuit is mapped to actual qubits in a cloud-based quantum computing service, violations of the bounds in EW 2.0 certify the presence of entanglement.Therefore, the assumption that a qubit allocation is trusted can be cleared out in the certification.Note that the assumption cannot be relaxed in standard EWs which do not have a purification.It is possible to clear the assumption by exploiting the framework EW 2.0.

IV. DEMONSTRATION IN IBMQ
The IBMQ system is based on superconducting qubits that have fixed locations and interact with each other remotely by concatenating SWAP gates.Note that IBMQ devices report errors on single-qubit gates around 0.1%, two-qubit gates and measurement readout errors around a few percentages.While two remote qubits interact with each other, the steps of SWAP may also cause errors.Then, a manual qubit allocation is provided: a user can address which qubits are used in a given geometry of qubits.If a qubit allocation is automatically applied, it is reported which qubits are used during the process at the end of runs of a quantum circuit.
We apply the circuit architecture to the certification of entanglement generation in IBMQ.Two-qubit EWCs are realized and certify EGCs that generate Bell states.In Figure 4. the arrangement of seven qubits and the circuits are shown.An EWC is constructed from the EW 2.0 operator, that has the bounds 1/8 = 0.125 and 3/8 = 0.375, see also Equation 16.Its EWC U W can be obtained as follows, The proof-of-principle demonstrations of EWCs are performed in IBM Casablanca on Jan.
where states 1 and 7 are entangled and the others are separable.
Note that a circuit to prepare mixed states, state 3, 4, and 5, considers their purification by using three qubits with one ancilla qubit.For instance, state 5 is obtained by preparing the following state, and then tracing out the third qubit.

V. DEMONSTRATION IN IONQ
IonQ can be accessed via Azure Quantum and Amazon Braket.The physical system applies identical ytterbium atoms prepared in an ultra-high vacuum chamber, where each ytterbium ion is identified as a single qubit.The ions are trapped by rapidly oscillating electromagnetic fields and then, logic gates are implemented by laser control on the atoms.Since qubits can move under a control, the system has an advantage in the connectivity.Gate fidelities are relatively high, over 99% for single-qubit gates and 98% for two-qubit gates on average, which may allows a longer-depth circuit.

A. 2 qubit EGCs
The EWC in Equation 32 is realized in IonQ in both Scheme 1 and Scheme 2. The demonstration of certifying EGCs has been performed on Jan. 13 and 14 2021.The result is shown in Figure 6.We recall that IonQ does not provide the command of qubit allocations.Hence, one can find that the results certifies entanglement generation without qubit allocations.

B. 3 qubit EGCs
We have performed the certification of three-qubit EGCs in IonQ on Jan. 14 2021.Both Scheme 1 and Scheme 2 are exploited to realize the EWC.Since the EW 2.0 operator in Equation 21 is implemented by three qubits, additional three qubits are needed to construct its purification, We recall that |φ ± x = (|x ± |x )/ √ 2 for a sequence x = x 1 x 2 x 3 and x = x1 x2 x3 with x1 = 1 − x 1 , e.g, |φ + 000 = (|000 + |111 )/ √ 2. From Equation 22, the lower and the upper bounds are 1/24 ≈ 0.0417 and 5/24 ≈ 0.2083, respectively.We also recall that the entangled state |φ + 000 is detected by the lower bound, and the state |φ − 010 by the upper bound.Since EWs are robust to noise, entangled states close to those states can be also detected.
The certification circuit U W is shown in Figure 5.Note that the single-qubit gates in the circuits are given to perform the following transformations, Then, quantum circuits generating the following states are considered in the proof-of-principle demon- Note that states 1 and 7 are entangled and the others are separable.When realizing mixed states, state 3 and state 5, in a circuit, one can prepare their purifications with one ancila qubit.For instance, the state 3 is obtained by preparing the following state, and then tracing out the fourth one.The circuits to prepare state 3 and state 5 are realized by using four qubits.

VI. DISCUSSION
In the certification, a measurement is repeated 8192 times in the case of IBMQ and 2000 times in IonQ.The standard deviation is about 0.001, which thus does not affect the conclusion in the certification.Note that preparations and measurements are assumed to be independently and identically distributed.
As for the certification of three-qubit EGCs where the circuit depth also increases, it is observed that IonQ is more reliable: the certification has been shown in IonQ, where the circuit depth is about 130.Note that Scheme 2 has been also considered since it contains an advantage of having a short-depth circuit, which is comparable to that of a preparation circuit.It, at the same time, requires more resources in preparation of qubits, the number of two-qubits gates in the projection step, and more measurements.These allow a higher chance of having errors in state preparation and two-qubit gates, all of which are significant in NISQ technologies.

A. Estimation of entanglement generation
The result presented can be incorporated to quantifying entanglement generation by PQCs in NISQ algorithms such as QAOA or VQE, where shallow circuits are repeatedly applied.In general, expectation values of EWCs give a lower bound to entanglement measures.To this end, let us introduce an entanglement measure for two-qubit EGC, Therefore, we have shown that estimation of entanglement generation can also be obtained from the certification of EGCs.

VII. CONCLUSION
A cloud-based quantum computing service does not precisely correspond to a typical scenario of a quantum laboratory.The qubit allocation in a cloud computing service is not in the users' hands but by the service, whereas it is by experimenters in a quantum laboratory.It is an additional assumption to trust qubit allocations by a cloud-based computing service.Two classical data are available to a user of the service, firstly a design of a quantum circuit as an input, and secondly, the statistics of measurement outcomes as an output.
We have established the framework of certifying entanglement generation in a cloud-based quantum computing service without the assumption of trusting qubit allocations.Namely, the design of quantum circuits is presented by which entanglement generation is certified by interpreting measurement outcomes returned by a cloud service.The entanglement certification circuits are constructed by transferring the framework of EW 2.0 to a quantum circuit model via SPA to EWs.Henceforth, the certification of entanglement generation in cloud-based quantum computing would be valid no matter how unsuccessful qubit allocations are in a cloud computing service.
We have used the circuit architecture to certify entanglement generation in IBMQ and IonQ services.In particular, entanglement generation in two and three qubits by CNOT and Toffoli gates is certified: namely, two-and three-qubit entangled states are certified.Since they form a universal set of gates together with singlequbit gates, entanglement generation in an arbitrary n-qubit circuit may be certified in a similar manner.We have also provided a lower bound to the capability of entanglement generation from the experimental data obtained in the certification.
Our results can be generally used to certify entanglement generation in a cloud quantum computing service.Quantum hardware in which entanglement generation is certified meets an essential requirement to gain quantum advantages.We envisage that when practical information tasks are attempted in cloud-based quantum computing services, the proposed framework applies to find the capability of entanglement generation toward achieving quantum advantages.In future investigations, it would be interesting to find if more of the assumptions apart from qubit allocations may be relaxed so that the level of the certification becomes even higher.For instance, it may be possible to certify semi-deviceindependent quantum correlations that may be generated in cloud quantum computing, e.g.[60].

Cloud
FIG.1.The scenario of a cloud-based quantum computing service is summarized.The input to the service by a user is a design of a quantum circuit.The service begins with the step called qubit allocations that relate physical qubits to a designed circuit.An implementation of the circuit is run in the service, and then measurement statistics returns to the user as the outcome.Given the two types of data, a computational task is concluded.Quantum advantages may be obtained when quantum circuits capable of generating entangled states are realized in the service.This work presents the architecture of quantum circuits for certifying entanglement generation in cloud-based quantum computing services.
m S T b J E d 4 p E D U i c n 5 J Q 0 C S d 3 5 I G 8 k F f n 3 n l y 3 p z 3 L + u U M + 7 Z I L / g f H w C l 3 a r 5 w = = < / l a t e x i t > SEP < l a t e x i t s h a 1 _ b a s e 6 4 = " i n K o e Y j 1 p H F a 6 0 c q g i j T l C V p J g 8 = " > A A A B 9 X i c b V D L S g M x F L 1 T X 7 W + q i 7 d B I v g q s y I o s u i C C 4 r 2 g e 0 Y 8 m k a R u a Z I Y k o 5 R h / s O N C 0 X c + i / u / B s z 7 S y 0 9 U D g c M 6 9 3 J M T R J x p 4 7 r f T m F p e W V 1 r b h e 2 t j c 2 t 4 p 7 + 4 1 8 T / / M 6 s R l c + A m T U W y o J L N D g 5 g j E 6 K s A t R n i h L D J 5 Z g o p j N i s g I K 0 y M L a p k S / D m v 7 x I m i d V 7 7 R 6 d n t a q V 3 m d R T h A A 7 h G D w 4 h x r c Q B 0 a Q E D B M 7 z C m / P k v D j v z s d s t O D k O / v w B 8 7 n D + v S k s s = < / l a t e x i t > ENT < l a t e x i t s h a 1 _ b a s e 6 4 = " G 7 h S 7 m 8 9 v s c y C 1 u E r H A U h j K A L K 0 = " > A A A B 9 X i c b V D L S s N A F L 2 p r 1 p f V Z d u B o v g q i R S 0 W V R B F d S o S 9 o Y 5 l M J + 3 Q m S T M T J Q S 8 h 9 u X C j i 1 n 9 x 5 9 8 4 a b P Q 1 g M D h 3 P u 5 Z 4 5 X s S Z 0 r b 9 b R V W V t f W N 4 q b p a 3 t n d 2 9 8 v 5 B W 4 W x J L R F Q h 7 K r o c V 5 S y g L c 0 0 p 9 1 I U i w 8 T j v e 5 D r z O 4 9 U K h Y G T T 2 N q C v w K G A + I 1 g b 6 S H p C 6 z H U i Q 3 d 8 0 0 H Z Q r d t W e A S 0 T J y c V y N E Y l L / 6 w 5 D E g g a a c K x U z 7 E j 7 S Z Y a k Y 4 T U v 9 W N E I k w k e 0 Z 6 h A R Z U u c k s d Y p O j D J E f i j N C z S a q b 8 3 E i y U m g r P T w h I e I Z X e L O e r B f r 3 f q Y j x a s f O c Q / s D 6 / A H q O Z L K < / l a t e x i t > ENT < l a t e x i t s h a 1 _ b a s e 6 4 = " G 7 h S 7 m 8 9 v s c yC 1 u E r H A U h j K A L K 0 = " > A A A B 9 X i c b V D L S s N A F L 2 p r 1 p f V Z d u B o v g q i R S 0 W V R B F d S o S 9 o Y 5 l M J + 3 Q m S T M T J Q S 8h 9 u X C j i 1 n 9 x 5 9 8 4 a b P Q 1 g M D h 3 P u 5 Z 4 5 X s S Z 0 r b 9 b R V W V t f W N 4 q b p a 3 t n d 2 9 8 v 5 B W 4 W x J L R F Q h 7 K r o c V 5 S y g L c 0 0 p 9 1 I U i w 8 T j v e 5 D r z O 4 9 U K h Y G T T 2 N q C v w K G A + I 1 g b 6 S H p C 6 z H U i Q 3 d 8 0 0 H Z Q r d t W e A S 0 T J y c V y N E Y l L / 6 w 5 D E g g a a c K x U z 7 E j 7 S Z Y a k Y 4 T U v 9 W N E I k w k e 0 Z 6 h A R Z U u c k s d Y p O j D J E f i j N C z S a q b 8 3 E i y U m g r P T r H e r Y / F a M H K d 4 7 g D 6 z P H x Z P k 2 A = < / l a t e x i t > Untrusted Quantum Devices P & M Scenario < l a t e x i t s h a 1 _ b a s e 6 4 = " w B a I o f A F 2 k 5 x B j 3 t p I X b u U e h z p g e R p H U 6 8 4 8 n N 5 A 4 T g S S N x u O u X X Y q z h R w k b g 5 K Y M c 9 a 7 9 5 f U i n H A i N G Z I q Y 7 r x N pP k d Q U M z I u e o k i M c J D 1 C c d Q w X i R P n p 9 I k x P D J K D 4 a R N C U 0 n K q / J 1 L E l R r x w H R m F 6 t 5 L x P / 8 z q J D i / 8 l I o 4 0 U T g 2 a I w Y V B H M E s E 9 q g k W L O R I Q h L a m 6 F e I A k w t r k V j Q h u P M v L 5 L m a c W t V s 5 u q + X a Z R 5 H A Z T A I T g B L j g H N X A N 6 q A B M H g E z + A V v F l P 1 o v 1 b n 3 M W p e s f O Y A / I H 1 + Q N H B Z i D < / l a t e x i t > Circuit Scenario < l a t e x i t s h a 1 _ b a s e 6 4 = " 2 S 0 i d J R L R b E 4 u e Y V c 5 J X 8 h G v W t M = " > A A A C B H i c b V D L S s N A F J 3 U V 6 2 v q M t u B o v g q i S i 6 L L Y j c u K 9 g F t K J P p t B 0 6 j z A z E U q I 4 M Z f c e N C E b d + h D v / xk m b h b Y e u H A 4 5 1 7 u v S e M G N X G 8 7 6 d w s r q 2 v p G c b O 0 t b 2 z u + f u H 7 S 0 j B U m T S y Z V J 0 Q a c K o I E 1 D D S O d S B H E Q 0 b a 4 a S e + e 1 7 o j S V 4 s 5 M I x J w N B J 0 S D E y V u q 7 5 a T H k R k r n t S p w j E 1 D 7 e Y C K S o T N O + W / G q 3 g x w m f g 5 q Y A c j b 7 7 1 R t I H H M i D G Z I 6 6 7 v R S Z I k D I U M 5 K W e r E m E c I T N C J d S w X i R A f J 7 I k U H l t l A I d S 2 R I G z t T f E w n i W k 9 5 a D u z i / W i l 4 n / e d 3 Y D C + D h I o o N k T g + a J h z K C R M E s E D q g i 2 L C p J Q g r a m + F e I w U w s b m V r I h + I s v L 5 P W a d U / q 5 7 f n F V q V 3 k c R V A G R + A E + O A C 1 M A 1 a I A m w O A R P I N X 8 O Y 8 O S / O u / M x b y 0 4 + c w h + A P n 8 w c 1 i Z k b < / l a t e x i t > Building a Quantum Circuit < l a t e x i t s h a 1 _ b a s e 6 4 = " B E y y A k H 9 9 w K C 4 z e r w Y 6 t L d a R A d g

FIG. 2 .
FIG.2.The steps of designing an EWC that certifies an EGC are summarized.The design begins from EW 2.0 in a P&M scenario.An EW 2.0 observable W twice more efficient than a standard EW is transferred to an EWC U W .The circuit construction of the EWC is optimized in terms of universal gates.The designed EWC is applied to certifying EGCs realized in untrusted quantum hardware.
Scheme 1Scheme 2 2 1 o k h m T T K E M / Q 4 3 L h R x 6 8 e 4 8 2 / M t L P Q 6 o H A 4 Z x 7 u S c n i D n T x n W / n M L K 6 t r 6 R n G z t L W 9 s 7 t X 3 j 9 o 6 S h R h D Z J x C P V C b C m n E n a N M x w 2 o k V x S L g t B 2 M 6 5 n f n l C l W S Q f z D S m v s B D y U J G s L G S 3 x P Y j J R I b 9 t 1 P e u X K 2 7 V n Q P 9 J V 5 O K p C j 0 S 9 / 9 g Y R S Q S V h n C s d d d z Y + O n W B l G O J 2 Ve o m m M S Z j P K R d S y U W V P v p P P Q M n V h l g M J I 2 S c N m q s / N 1 I s t J 6 K w E 5 m I f W y l 4 n / e d 3 E h N d + y m S c G C r J 4 l C

FIG. 4 .
FIG. 4. Entanglement generation is certified in two qubits labeled (1, 2) and (2, 3) in IBMQ Casablanca.For a pair of the qubits, two-qubit circuits that generate entangled and separable states in Equation 33 are performed.An EWC is constructed from the framework of EW 2.0 is then applied to certify entanglement generation.The cloud-based quantum computing service returns the outcome statistics.EGCs are certified if either the lower or the upper bound is violated.The separability window is given by [0.125, 0.375]: estimated values off the range certify entangled states.EGCs generating state 1 and state 7 in Equation 33 are certified.The command of automatic qubit allocations is applied in the certification.

FIG. 5 .
FIG.5.An EWC is constructed from a unitary transformation generating the purification in | W in Equation34, where single-qubit gates are listed out in Equation35.The EWC is realized in IonQ and certifies entanglement generation.

FIG. 6 .
FIG. 6.An EWC is realized in IonQ to certify two-and threequbit EGCs.For two-qubit EGCs, lower and upper bounds are 1/8 = 0.125 and 3/8 = 0.375, respectively, violations of which certify an EGC.That is, the separability window is [0.125, 0.375]: values estimated out of the range certify entangled states.The violations are observed for state 1 and state 7, entangled ones in Equation 33.Both Scheme 1 and Scheme 2 show the certification.For three-qubit EGCs, the bounds are 1/24 ≈ 0.417 and 5/24 ≈ 0.2083: the separability window is given by [0.417, 0.2083].Violations of the upper bound are observed by Scheme 1 for state 7 in Equation36.These are the first results that entanglement generation is certified in IonQ where the command of qubit allocations is lacking.