state_opt.optimal_clone

Calculates success probability of approximately cloning a quantum state.

Functions

optimal_clone(states, probs[, num_reps, strategy])

Compute probability of counterfeiting quantum money [1].

primal_problem(q_a, pperm, num_reps)

Primal problem for counterfeit attack.

dual_problem(q_a, pperm, num_reps)

Dual problem for counterfeit attack.

Module Contents

state_opt.optimal_clone.optimal_clone(states, probs, num_reps=1, strategy=False)

Compute probability of counterfeiting quantum money [1].

The primal problem for the \(n\)-fold parallel repetition is given as follows:

\[\begin{split}\begin{equation} \begin{aligned} \text{maximize:} \quad & \langle W_{\pi} \left(Q^{\otimes n} \right) W_{\pi}^*, X \rangle \\ \text{subject to:} \quad & \text{Tr}_{\mathcal{Y}^{\otimes n} \otimes \mathcal{Z}^{\otimes n}}(X) = \mathbb{I}_{\mathcal{X}^{\otimes n}},\\ & X \in \text{Pos}( \mathcal{Y}^{\otimes n} \otimes \mathcal{Z}^{\otimes n} \otimes \mathcal{X}^{\otimes n}). \end{aligned} \end{equation}\end{split}\]

The dual problem for the \(n\)-fold parallel repetition is given as follows:

\[\begin{split}\begin{equation} \begin{aligned} \text{minimize:} \quad & \text{Tr}(Y) \\ \text{subject to:} \quad & \mathbb{I}_{\mathcal{Y}^{\otimes n} \otimes \mathcal{Z}^{\otimes n}} \otimes Y \geq W_{\pi} \left( Q^{\otimes n} \right) W_{\pi}^*, \\ & Y \in \text{Herm} \left(\mathcal{X}^{\otimes n} \right). \end{aligned} \end{equation}\end{split}\]

Examples

Wiesner’s original quantum money scheme [2] was shown in [1] to have an optimal probability of 3/4 for succeeding a counterfeiting attack.

Specifically, in the single-qubit case, Wiesner’s quantum money scheme corresponds to the following ensemble:

\[\left\{ \left( \frac{1}{4}, |0\rangle \right), \left( \frac{1}{4}, |1\rangle \right), \left( \frac{1}{4}, |+\rangle \right), \left( \frac{1}{4}, |-\rangle \right) \right\},\]

which yields the operator

\[\begin{equation} Q = \frac{1}{4} \left(|000 \rangle \langle 000| + |111 \rangle \langle 111| + |+++ \rangle + \langle +++| + |--- \rangle \langle ---| \right). \end{equation}\]

We can see that the optimal value we obtain in solving the SDP is 3/4.

>>> from toqito.state_opt import optimal_clone
>>> from toqito.states import basis
>>> import numpy as np
>>> e_0, e_1 = basis(2, 0), basis(2, 1)
>>> e_p = (e_0 + e_1) / np.sqrt(2)
>>> e_m = (e_0 - e_1) / np.sqrt(2)
>>>
>>> states = [e_0, e_1, e_p, e_m]
>>> probs = [1 / 4, 1 / 4, 1 / 4, 1 / 4]
>>> np.around(optimal_clone(states, probs), decimals=2)
np.float64(0.75)

References

[1] (1,2,3)

Abel Molina, Thomas Vidick, and John Watrous. Optimal counterfeiting attacks and generalizations for wiesner's quantum money. 2012. arXiv:1202.4010.

[2]

Stephen Wiesner. Conjugate coding. SIGACT News, 15(1):78–88, Jan 1983. URL: https://doi.org/10.1145/1008908.1008920, doi:10.1145/1008908.1008920.

Parameters:
  • states (list[numpy.ndarray]) – A list of states provided as either matrices or vectors.

  • probs (list[float]) – Respective list of probabilities each state is selected.

  • num_reps (int) – Number of parallel repetitions to perform.

  • strategy (bool) – Boolean that denotes whether to return strategy.

Returns:

The optimal probability with of counterfeiting quantum money.

Return type:

float | numpy.ndarray

state_opt.optimal_clone.primal_problem(q_a, pperm, num_reps)

Primal problem for counterfeit attack.

As the primal problem takes longer to solve than the dual problem (as the variables are of larger dimension), the primal problem is only here for reference.

Returns:

The optimal value of performing a counterfeit attack.

Parameters:
  • q_a (numpy.ndarray)

  • pperm (numpy.ndarray)

  • num_reps (int)

Return type:

float

state_opt.optimal_clone.dual_problem(q_a, pperm, num_reps)

Dual problem for counterfeit attack.

Returns:

The optimal value of performing a counterfeit attack.

Parameters:
  • q_a (numpy.ndarray)

  • pperm (numpy.ndarray)

  • num_reps (int)

Return type:

float