Documentation
¶
Index ¶
- func Index(input []*Qubit) []int
- func NewQgRCPServer(set Set) q.QsimServer
- type ApplyRequest
- type ControlledRequest
- type Q
- func (q *Q) Apply(mat matrix.Matrix, input ...*Qubit) *Q
- func (q *Q) CNOT(control *Qubit, target *Qubit) *Q
- func (q *Q) CR(control *Qubit, target *Qubit, k int) *Q
- func (q *Q) CZ(control *Qubit, target *Qubit) *Q
- func (q *Q) Clone() *Q
- func (q *Q) ConditionX(condition bool, input ...*Qubit) *Q
- func (q *Q) ConditionZ(condition bool, input ...*Qubit) *Q
- func (q *Q) ControlledNot(control []*Qubit, target *Qubit) *Q
- func (q *Q) ControlledR(control []*Qubit, target *Qubit, k int) *Q
- func (q *Q) ControlledZ(control []*Qubit, target *Qubit) *Q
- func (q *Q) Estimate(input *Qubit, loop ...int) *qubit.Qubit
- func (q *Q) H(input ...*Qubit) *Q
- func (q *Q) InverseQFT() *Q
- func (q *Q) Measure(input ...*Qubit) *qubit.Qubit
- func (q *Q) New(z ...complex128) *Qubit
- func (q *Q) NumberOfBit() int
- func (q *Q) One() *Qubit
- func (q *Q) Probability() []float64
- func (q *Q) QFT() *Q
- func (q *Q) S(input ...*Qubit) *Q
- func (q *Q) State() []float64
- func (q *Q) Swap(q0, q1 *Qubit) *Q
- func (q *Q) T(input ...*Qubit) *Q
- func (q *Q) X(input ...*Qubit) *Q
- func (q *Q) Y(input ...*Qubit) *Q
- func (q *Q) Z(input ...*Qubit) *Q
- func (q *Q) Zero() *Qubit
- type QRequest
- type QResponse
- type QgRPC
- func (s *QgRPC) Apply(ctx context.Context, req *q.ApplyRequest) (*q.QResponse, error)
- func (s *QgRPC) ControlledNOT(ctx context.Context, req *q.ControlledRequest) (*q.QResponse, error)
- func (s *QgRPC) ControlledR(ctx context.Context, req *q.ControlledRequest) (*q.QResponse, error)
- func (s *QgRPC) ControlledZ(ctx context.Context, req *q.ControlledRequest) (*q.QResponse, error)
- func (s *QgRPC) H(ctx context.Context, req *q.QRequest) (*q.QResponse, error)
- func (s *QgRPC) InverseQFT(ctx context.Context, req *q.None) (*q.QResponse, error)
- func (s *QgRPC) QFT(ctx context.Context, req *q.None) (*q.QResponse, error)
- func (s *QgRPC) S(ctx context.Context, req *q.QRequest) (*q.QResponse, error)
- func (s *QgRPC) T(ctx context.Context, req *q.QRequest) (*q.QResponse, error)
- func (s *QgRPC) X(ctx context.Context, req *q.QRequest) (*q.QResponse, error)
- func (s *QgRPC) Y(ctx context.Context, req *q.QRequest) (*q.QResponse, error)
- func (s *QgRPC) Z(ctx context.Context, req *q.QRequest) (*q.QResponse, error)
- type Qsim
- type Qubit
- type Set
- func (s Set) Apply(m matrix.Matrix, input ...*Qubit) *Q
- func (s Set) ControlledNOT(control []*Qubit, target *Qubit) *Q
- func (s Set) ControlledR(control []*Qubit, target *Qubit, k int) *Q
- func (s Set) ControlledZ(control []*Qubit, target *Qubit) *Q
- func (s Set) H(input ...*Qubit) *Q
- func (s Set) InverseQFT() *Q
- func (s Set) QFT() *Q
- func (s Set) S(input ...*Qubit) *Q
- func (s Set) T(input ...*Qubit) *Q
- func (s Set) X(input ...*Qubit) *Q
- func (s Set) Y(input ...*Qubit) *Q
- func (s Set) Z(input ...*Qubit) *Q
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQgRCPServer ¶
func NewQgRCPServer(set Set) q.QsimServer
Types ¶
type ApplyRequest ¶
type ControlledRequest ¶
type Q ¶
type Q struct {
// contains filtered or unexported fields
}
func (*Q) InverseQFT ¶
func (*Q) New ¶
func (q *Q) New(z ...complex128) *Qubit
func (*Q) NumberOfBit ¶
func (*Q) Probability ¶
type QgRPC ¶
type QgRPC struct {
HandlerH grpctransport.Handler
HandlerX grpctransport.Handler
HandlerY grpctransport.Handler
HandlerZ grpctransport.Handler
HandlerS grpctransport.Handler
HandlerT grpctransport.Handler
HandlerApply grpctransport.Handler
HandlerControlledR grpctransport.Handler
HandlerControlledZ grpctransport.Handler
HandlerControlledNOT grpctransport.Handler
HandlerQFT grpctransport.Handler
HandlerInverseQFT grpctransport.Handler
}
func (*QgRPC) ControlledNOT ¶
func (*QgRPC) ControlledR ¶
func (*QgRPC) ControlledZ ¶
func (*QgRPC) InverseQFT ¶
type Qsim ¶
type Qsim interface {
H(intput ...*Qubit) *Q
X(intput ...*Qubit) *Q
Y(intput ...*Qubit) *Q
Z(intput ...*Qubit) *Q
S(intput ...*Qubit) *Q
T(intput ...*Qubit) *Q
Apply(mat matrix.Matrix, intput ...*Qubit) *Q
ControlledR(control []*Qubit, target *Qubit, k int) *Q
ControlledZ(control []*Qubit, target *Qubit) *Q
ControlledNOT(control []*Qubit, target *Qubit) *Q
QFT() *Q
InverseQFT() *Q
}
func NewQgRPCClient ¶
func NewQgRPCClient(conn *grpc.ClientConn) Qsim
type Set ¶
type Set struct {
EpH endpoint.Endpoint
EpX endpoint.Endpoint
EpY endpoint.Endpoint
EpZ endpoint.Endpoint
EpS endpoint.Endpoint
EpT endpoint.Endpoint
EpApply endpoint.Endpoint
EpControlledR endpoint.Endpoint
EpControlledZ endpoint.Endpoint
EpControlledNOT endpoint.Endpoint
EpQFT endpoint.Endpoint
EpInverseQFT endpoint.Endpoint
}
func MakeEndpoints ¶
func (Set) InverseQFT ¶
Click to show internal directories.
Click to hide internal directories.