Skip to content

Instantly share code, notes, and snippets.

@elbruno
Created December 20, 2017 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elbruno/5edc37c5277408734defc1dc593d8eb6 to your computer and use it in GitHub Desktop.
Save elbruno/5edc37c5277408734defc1dc593d8eb6 to your computer and use it in GitHub Desktop.
QuantumHGateWithOutReset
operation HGateWithOutReset (initial: Result) : (Result)
{
body
{
mutable res = Zero;
using (qubits = Qubit[2])
{
let qubit1 = qubits[0];
let qubit2 = qubits[1];
H(qubit1);
set res = M(qubit1);
}
return (res);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment