Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://yosh.hateblo.jp/entries/2010/01/19#p1 | |
# http://okajima.air-nifty.com/b/2010/01/post-abc6.html | |
from dataclasses import dataclass | |
from typing import NamedTuple, TextIO | |
from io import StringIO | |
from collections import deque | |
class Point(NamedTuple): | |
x: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://yosh.hateblo.jp/entries/2010/01/19#p1 | |
# http://okajima.air-nifty.com/b/2010/01/post-abc6.html | |
from dataclasses import dataclass | |
from typing import NamedTuple, TextIO | |
from io import StringIO | |
class Point(NamedTuple): | |
x: int | |
y: int |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
import math | |
from typing import Any, List, Optional | |
import numpy as np | |
from .backendbase import Backend | |
import blueqat.gate as bqgate | |
class _U3(bqgate.OneQubitGate): |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import List. | |
Import ListNotations. | |
Theorem concat_assoc(X: Type): | |
forall tttx: list (list (list X)), (concat (concat tttx)) = (concat (map (@concat X) tttx)). | |
Proof. | |
intros. | |
induction tttx. | |
simpl. reflexivity. | |
simpl. rewrite <- IHtttx. apply concat_app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from blueqat import Circuit, pauli, vqe | |
from blueqat.pauli import qubo_bit as q | |
from math import pi | |
import numpy as np | |
def an(index): | |
return 0.5 * pauli.X[index] + 0.5j * pauli.Y[index] | |
def cr(index): | |
return 0.5 * pauli.X[index] - 0.5j * pauli.Y[index] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* 3.1 *) | |
Inductive 紅白玉 := | |
| 赤玉 | |
| 白玉. | |
(* 3.2 *) | |
Print list. | |
(* | |
Inductive list (A : Type) : Type := | |
nil : list A |
NewerOlder