QPennyFlip: Quantum Penny Flip game

Description Usage Arguments Value References Examples

View source: R/QPennyFlip.R

Description

This function simulates the Quantum Penny Flip game by taking in the initial state of the game that is set by Alice and the strategies available to Alice and Bob. It returns the final state of the game along with the plot of the probability distribution of the qubits after measurement of the final state.

Usage

1
QPennyFlip(initial_state, strategies_Alice, strategies_Bob)

Arguments

initial_state

a vector representing the initial quantum state

strategies_Alice

a matrix lying in SU(2)

strategies_Bob

a matrix lying in SU(2)

Value

The final state of the game along with the plot of the probability distribution of the qubits after measurement of the final state by taking in the initial state of the game that is set by Alice and the strategies available to Alice and Bob as the inputs.

References

https://arxiv.org/pdf/quant-ph/0506219.pdf
https://arxiv.org/pdf/quant-ph/0208069.pdf
https://arxiv.org/pdf/quant-ph/9804010.pdf

Examples

1
2
3
4
5
6
7
8
init()
psi <- (u+d)/sqrt(2)
S1 <- sigmaX(Q$I2)
S2 <- Q$I2
H <- Hadamard(Q$I2)
SA <- list(S1, S2)
SB <- list(H)
QPennyFlip(psi, SA,SB)

QGameTheory documentation built on July 8, 2020, 7:27 p.m.