Q# 程序会包含一个或多个操作(operation)。操作描述了量子操作带来的影响。
还可以包含一个或多个方法(function)。方法用来操作经典数据,只用来计算。
每个操作还可以调用其他操作(这不就是java里的方法吗?说对了一半,是java里的静态方法)。
Q#文件被编译后,每个操作都会是一个.net的类。所以Q#的操作可以被.net的其他语言调用。
一个操作会有一个输入、一个输出,会有一个body体。
下面定义一个操作:
operation BitFlip(target : Qubit) : () { body { X(target); } }
它的输出是一个空的元组,类似与void,或者F#里的unit。
相关推荐
GE_FANUC CNC Basic Operation Package 1操作手册62994EN_02pdf,GE_FANUC CNC Basic Operation Package 1操作手册62994EN_02
绝大部分异常信息为:System.Net.WebException: The operation has timed out,即网络操作超时的异常
MongoDB排序错误:Sort operation used more than the maximum 33554432 bytes of RAM错误描述我
[{'stuName': u'\u5f20\u4e09', 'gender': u'\u7537', 'id': 1L, 'stuAge': 23L}, {'stuName': u'\u674e\u56db', 'gender': u'\u7537', 'id': 2L, 'stuAge': 21L}, {'stuName': u'\u738b\u4e94', 'gender': u'\u7537...
A universal asynchronous receiver transmitter (UART) is a computer ... A related device, the universal synchronous and asynchronous receiver transmitter (USART) also supports synchronous operation.
CS1 CJ1 Analog IO Units Operation Manual(06)-E-模拟量应用手册pdf,CS1 CJ1 Analog IO Units Operation Manual(06)-E-模拟量应用手册
组织关系数据库 database集合 collection文档 document在 MongoDB 中,数据库和集合都不需要手动创建,当我们创建文档时,如果文档
DatabaseOperation
Multimedia operation of each track playback time
operation 计算器 c#源码 operation 计算器 c#源码
操作系统概念(operation system concepts)课后习题答案英文版
Lesson 04 CAA document structure and operation
PHP解决Operation not permitted in
CCSDS国际空间数据咨询委员会制定的临近空间器间通信系统数据传输流程标准,是国际空间合作开发数据传输的基础。
力士乐操作手册 Rexroth IndraMotion MTX Standard NC Operation 力士乐操作手册 Rexroth IndraMotion MTX Standard NC Operation 力士乐操作手册 Rexroth IndraMotion MTX Standard NC Operation
operation-lovecraft.torrent
Console.WriteLine($"与(&)操作符的位都为1时,才为1,其他都为0,因此与(&)操作符的结果范围在[0, Math.Min(x,y)],x,y均为正整数"); Console.WriteLine($"或(|)操作符的位都为0时,才为0,其他都为1,因此或(|)...
1-1. At the bottom is the hardware, which, in many cases, is itself composed of two or more levels (or layers). The lowest level contains physical devices, consisting of integrated circuit chips, ...
System Center Operation manager 2007
HERO User Operation Guide-操作手册