# Pseudo-Secret Random Qubit Generator (PSQRG)

The example protocol enables fully-classical parties to generate secret single qubit states using only public classical channels and a single quantum Server. This functionality could be used to replace a quantum channel completely such that a classical Client can perform various quantum applications over classical network connected to a quantum Server. An application of this functionality could be to carry out Delegated Quantum Computation by just classical online communication (classical communication throughout the protocol) and no quantum communication. It allows a fully classical Client to instructs Server to generate random single qubit states such that Client has complete knowledge of the state of qubit prepared but Server does not. It can be used for UBQC, VUBQC and for other protocols like Quantum Money, Quantum Digital Signatures etc.. which need user to share his/her private quantum key over a quantum channel.

## Use Case

• No classical Analogue
• Replaces quantum channels by classical channels for quantum cloud computing
• Generating random qubits for protocols like quantum-key-distribution, quantum money, quantum coin-flipping, quantum signatures, two-party quantum computation, multiparty quantum computation etc.

Tags: Two Party,Universal Task, Quantum Functionality, Classical Online Communication, Superposition, Collision Resistant Functions, Learning With Errors

## Assumption

• This protocol assumes an honest Client and proves security only for an adversarial Server.
• This protocol takes the assumption of a Quantum Honest But Curious (QHBC) adversary setting i.e. the protocol is secure against an honest Server who just wants to know Client’s hidden data but not modify it without Client’s consent.

## Outline

The general idea is that a classical Client gives instructions to a quantum Server to perform certain actions (quantum computation). Those actions lead to the Server having as output a single qubit, which is randomly chosen from within a set of chosen (by the Client) states. On the other hand, Client is supposed to know the classical description of Server's output qubit. To achieve this task, the instructions/quantum computation the Client uses are based on a family of trapdoor, two regular, one-way functions with certain extra properties (see Properties and Definitions). Trapdoor one-way functions are hard to invert (e.g. for the Server) unless someone (the Client in this case) has some extra “trapdoor” information. Two-regular functions have two pre-images for every value in the range of the function. This extra information helps the Client classically reproduce the quantum computation to recover the classical description of the single qubit state, while it is still hard to classically reproduce for the Server, the same information as Client. Simple modifications to the protocol could achieve other similar sets of states.

The protocol can be divided into two stages, Pre-images Superposition, where Client instructs the Server to generate superposition using the function with above properties and, Squeezing, where the Server is instructed by the Client to measure his output qubits and deliver outcomes, which she (Client) would use to classically compute the value of r.

• Preparation. Client randomly selects a function with required properties, which is public (Server knows), but the trapdoor information needed to invert the function is known only to the Client.
• Preimages Superposition. Server prepares two quantum registers (system comprising multiple qubits), first being control (containing inputs) and second being target (containing output of the function). Client instructs Server to create a superposition of input states by applying Hadamard gate (quantum fourier transform) on control register. She then instructs Server to apply a unitary gate (all quantum gates are represented by unitary matrices) which computes output of the function in the target register, taking input from the control register, thus yielding an entangled state from the Server's superposition state. Server is required to measure the target register in the computational basis (along Z axis) and get an outcome. This action would reduce the control register into a superposition of two pre-images corresponding to the measurement outcome of the target register. He conveys this outcome to the Client who computes, classically, the two pre-images using her trapdoor. This pair of pre-image would have some isolated similar qubits (without superposition) and a superposition of dissimilar qubits. The dissimilar qubits can be written as a superposition of isolated 0s and isolated 1s (a GHZ state), with X (NOT) gates applied to qubits depending on the state of qubit in both the pre-images. If the last qubit belongs to the set of similar qubits, then Client aborts and this Stage is repeated.
• Squeezing. Client instructs Server to measure all the qubits of the control register in some basis chosen randomly by the Client, except the last one, and return to her the outcomes. The last unmeasured state contains the randomly prepared qubit hidden from the Server. Client can then compute the value of r by an equation (see Pseudo Code). This equation depends only on Client’s measurement basis angles, Server’s measurement outcome and the location of random X’s (unknown to the Server). Thus, the Client knows the state of her secret qubit prepared by the Server.

## Requirements

• Network Stage: Quantum Memory
• Required Network Parameters:
• ${\displaystyle \epsilon _{j}}$, which measures the error due to noisy operations.
• Number of communication rounds
• Circuit depth
• Number of physical qubits used
• Client needs a classical computer
• Quantum offline channel
• Classical online channel
• Server should be able to generate superposition, apply single qubit gates, store entangled states, perform measurement.

## Properties

• ${\displaystyle f_{k}}$, the function with required properties as given below in point 4.
• n, number of qubits in the control register.
• The function used for the protocol is required to satisfy the following properties: one-way, trapdoor, two-regular, collision resistance, quantum-safe (See Definitions).
• This protocol is secure under learning with errors assumption i.e. it relies on assumption over a quantum Server to be unable solve a computationally hard problem.
• The protocol assumes that all quantum operators are described by polynomially-sized circuits.
• The randomness of the output qubit is due to the (fundamental) randomness of quantum measurements that are part of the instructions that the Client gives.
• The Server cannot guess the state any better than if he had just received that state directly from the Client (up to negligible probability).
• Correctness If both the Client and the Server follow the protocol, the protocol aborts when {missing equation}, while otherwise the Server ends up with the output (single) qubit being in the state ), where ${\displaystyle \theta }$ is given by equation (see Pseudo Code).
• The single qubit state generated by the protocol remains private against a QHBC Server.

## Notations

• ${\displaystyle f_{k}}$, function for target register
• ${\displaystyle t_{k}}$, trapdoor for function ${\displaystyle f_{k}}$
• ${\displaystyle U_{f_{k}}}$, Unitary operated on the target register taking first register as control, used to compute output of the function in the target register
• y, measurement outcome of the target register
• ${\displaystyle x,x'}$, pre-image pair for a given measurement outcome y
• ${\displaystyle x_{i}}$ value of qubit i for pre-image x
• ${\displaystyle x_{i}'}$ value of qubit i for pre-image x’
• ${\displaystyle \alpha _{i}}$, Client’s measurement angles for qubit i in the control register
• ${\displaystyle b_{i}}$, Server’s measurement outcome for qubit i in the control register
• ${\displaystyle \theta }$, classical description of the hidden input state

## Protocol Description

### Stage1 Preimages superposition

Requirements:
Public: A family ${\displaystyle {\mathcal {F}}=\{f_{k}:\{0,1\}^{n}\rightarrow \{0,1\}^{m}\}}$ of trapdoor one-way functions that are quantum-safe, two-regular and collision resistant (or second preimage resistant) (See article for Function Construction)
Input: Client uniformly samples a set of random three-bits strings: ${\displaystyle \alpha =(\alpha _{1},\cdots ,\alpha _{n-1})}$ where ${\displaystyle \alpha _{i}\leftarrow \{0,1\}^{3}}$, and runs the algorithm ${\displaystyle (k,t_{k})\leftarrow {\text{Gen}}_{\mathcal {F}}(1^{n})}$. The ${\displaystyle \alpha }$ and ${\displaystyle k}$ are public inputs (known to both parties), while ${\displaystyle t_{k}}$ is the private input of the Client.

• Client: instructs Server to prepare one register at ${\displaystyle \otimes ^{n}H|0\rangle }$ and second register initiated at ${\displaystyle |0\rangle ^{m}}$
• Client: returns ${\displaystyle k}$ to Server and the Server applies ${\displaystyle U_{f_{k}}}$ using the first register as control and the second as target
• Server: measures the second register in the computational basis, obtains the outcome ${\displaystyle y}$ and returns this result ${\displaystyle y}$ to the Client. Here, an honest Server would have a state ${\displaystyle {(|x\rangle +|x'\rangle )\otimes |y\rangle }}$ with ${\displaystyle f_{k}(x)=f_{k}(x')=y}$ and ${\displaystyle y\in \Im f_{k}}$.
• Client can rewrite the superposition in the control register for herself as,

${\displaystyle (|x\rangle +|x'\rangle )=(|x_{1}\cdots x_{n}\rangle +|x'_{1}\cdots x'_{n}\rangle )}$ ${\displaystyle ={\big (}\otimes _{i\in {\bar {G}}}|x_{i}\rangle {\big )}\otimes {\big (}\otimes _{j\in G}|x_{j}\rangle +\otimes _{j\in G}|x_{j}\oplus 1\rangle {\big )}}$ ${\displaystyle \quad \quad \quad \quad \quad \quad ={\big (}\otimes _{i\in {\bar {G}}}|x_{i}\rangle {\big )}\otimes {\Big (}\prod _{j\in G}X^{x_{j}}{\Big )}{\big (}|0\cdots 0\rangle _{G}+|1\cdots 1\rangle _{G}{\big )}}$,
where ${\displaystyle {\bar {G}}}$ is the set of bits positions where ${\displaystyle x,x'}$ are identical, ${\displaystyle G}$ is the set of bits positions where the pre-images differ, while suitably changing the order of writing the qubits.

### Stage2 Squeezing

• Output: If the protocol is run honestly, when there is no abort, the state that Server has is ${\displaystyle +_{\theta }}$, where the Client (only) knows the classical description.
1. Client: instructs the Server to measure all the qubits (except the last one) of the first register in the ${\displaystyle \left\{|0\rangle \pm e^{\alpha _{i}\pi /4}|1\rangle \right\}}$ basis. Server obtains the outcomes ${\displaystyle b=(b_{1},\cdots ,b_{n-1})}$ and returns the result ${\displaystyle b}$ to the Client.
2. Client: using the trapdoor ${\displaystyle t_{k}}$ computes ${\displaystyle x,x'}$. Then check if the ${\displaystyle n^{\text{th}}}$ bit of ${\displaystyle x}$ and ${\displaystyle x'}$ (corresponding to the y received in stage 1) are the same or different. If they are the same, returns abort, otherwise, obtains the classical description of the Server’s state.

## Definitions (informal)

• Quantum-Safe A protocol/function is quantum-safe (also known as post-quantum secure), if all its properties remain valid when the adversaries are quantum polynomial-time (QPT).
• One-Way A family of functions ${\displaystyle \{f_{k}:D\rightarrow R\}_{k\epsilon \{0,1\}}}$ is one-way if there exists a QPT algorithm that can compute ${\displaystyle f_{k}(x)}$ for any k, any input x ∈ D, and any QPT algorithm can invert ${\displaystyle f_{k}}$ with at most negligible probability over the choice of k.
• Second pre-image Resistant A family of functions ${\displaystyle \{f_{k}:D\rightarrow R\}_{k\epsilon \{0,1\}}}$ is second pre-image resistant if there exists a QPT algorithm that can compute ${\displaystyle f_{k}(x)}$ for any index function k, any input x ∈ D, and given an input x, it can find a different input ${\displaystyle x_{0}}$ such that ${\displaystyle f_{k}(x)=f_{k}(x')}$ with at most negligible probability over the choice of k.
• Collision Resistant A family of functions ${\displaystyle \{f_{k}:D\rightarrow R\}_{k\epsilon \{0,1\}}}$ is collision resistant if there exists a QPT algorithm that can compute ${\displaystyle f_{k}(x)}$ for any index function k, any input ${\displaystyle x\epsilon D}$, any QPT algorithm can find two inputs ${\displaystyle x\neq x'}$ such that ${\displaystyle f_{k}(x)=f_{k}(x')}$ with at most negligible probability over the choice of k.
• Two-regular A deterministic function ${\displaystyle \{f_{k}:D\rightarrow R\}_{k\epsilon \{0,1\}}}$ is two-regular if ${\displaystyle \forall y\epsilon Im(f)}$, we have ${\displaystyle |f^{-1}(y)|=2}$
• Trapdoor Function A family of functions ${\displaystyle \{f_{k}:D\rightarrow R\}_{k\epsilon \{0,1\}}}$ is a trapdoor function if there exists a QPT algorithm Gen which on input ${\displaystyle 1^{n}}$ outputs ${\displaystyle (k,t_{k})}$, where k represents the index of a function, ${\displaystyle \{f_{k}:D\rightarrow R\}_{k\epsilon \{0,1\}}}$, where ${\displaystyle f_{k}}$ is a one-way function, then there exists a QPT algorithm Inv, which on inputs ${\displaystyle t_{k}}$ (which is called the trapdoor information) which was output by Gen(${\displaystyle 1^{n}}$), and ${\displaystyle y=f_{k}(x)}$ can invert y (by returning all pre-images of y with non-negligible probability over the choice of ${\displaystyle (k,t_{k})}$ and uniform choice of x.

## Further Information

The above protocol coined the functionality of producing pseudo random qubits via a completely classical client, blind to the server that generated it. A verification of this protocol is still an open question.