Skip to content

Instantly share code, notes, and snippets.

View billchenxi's full-sized avatar

Xi Chen billchenxi

View GitHub Profile
apiVersion: v1
kind: Pod
metadata:
name: test
labels:
app: nginx
rel: stable
spec:
containers:
- name: test
operation Teleportation(sentMessage : Bool) : Bool {
mutable receivedMessage = false;
using (register = Qubit[3]) {
let message = register[0];
if (sentMessage) {
X(message); // flip the message to "true"
}
namespace Q_Teleportation {
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
operation Teleportation(sentMessage : Bool) : Bool {
mutable receivedMessage = false;
using (register = Qubit[3]) {
let message = register[0];
namespace Q_Teleportation {
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
operation Teleportation(sentMessage : Bool) : Bool {
mutable receivedMessage = false;
using (register = Qubit[3]) {
let message = register[0];
namespace Q_Entanglement {
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
operation Entanglement() : (Result, Result) {
mutable Q1_state = Zero;
mutable Q2_state = Zero;
using ((Q1, Q2) = (Qubit(), Qubit())) {
H(Q1);
namespace Q_superposition {
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
operation Superposition() : Result {
mutable state = Zero;
using (qubit = Qubit()) {
H(qubit);
set state = M(qubit);
@billchenxi
billchenxi / Superposition.qs
Created May 14, 2020 06:14
Q# Supoerposition
namespace Q_superposition {
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
operation Superposition() : Result {
mutable state = Zero;
using (qubit = Qubit()) {
H(qubit);
set state = M(qubit);
namespace testing123 {
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
@EntryPoint()
operation HelloQ() : Unit {
Message("Hello quantum world!");
}
version: '3'
services:
db:
image: mysql
container_name: mysql_db
restart: always
environment:
- MYSQL_ROOT_PASSWORD="secret"
web:
image: apache