Skip to content

Make kronecker product and qubit ordering consistent with Mike and Ike #281

@Strilanc

Description

@Strilanc

Suppose we make a circuit matrix:

control = NamedQubit("control")
target = NamedQubit("target")
return Circuit.from_ops(CNOT(control, target)).to_matrix()

Should the returned matrix be

1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0

or

1 0 0 0
0 0 0 1
0 0 1 0
0 1 0 0

?

(Assuming that it is implied that a qubit named 'control' comes "before" a qubit named 'target' due just to lexicographic ordering.)

Looking for comments from @maffoo @dabacon @idk3 @kevinsung .

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions