-
Notifications
You must be signed in to change notification settings - Fork 0
/
options-circuit.js
55 lines (45 loc) · 1.16 KB
/
options-circuit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
const logger = require('../src/logger')()
// illustrations of circuit configuration options - none are actually implemented yet
let circuit = require('../src/circuit.js')
circuit({
name: 'circuit gates added with controls before targets',
size: 3,
logger: logger,
order: ['controls', 'targets'],
}).run()
circuit({
name: 'circuit gates added with targets before controls (default)',
size: 3,
logger: logger,
order: ['targets', 'controls'],
}).run()
circuit({
name: 'circuit states with big endian state vector bits - lowest bit on left side',
size: 3,
logger: logger,
endian: 'big',
}).run()
circuit({
name: 'circuit states with little endian state vector bits - lowest bit on right side (default)',
size: 3,
logger: logger,
endian: 'little',
}).run()
circuit({
name: 'circuit with custom state vector bit characters - "0" and "1"',
size: 3,
logger: logger,
bit_characters: ['0', '1'],
}).run()
circuit({
name: 'circuit with custom state vector bit characters - "x" and " "',
size: 3,
logger: logger,
bit_characters: ['x', ' '],
}).run()
circuit({
name: 'circuit with custom simulator backend',
size: 3,
logger: logger,
engine: 'optimized',
}).run()