Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Option to count Toffolis instead of counting T gates #20

@Strilanc

Description

@Strilanc

Using current techniques, it is cheaper to perform a Toffoli gate directly via a CCZ state instead of via multiple T states. As a result, I often want to count Toffoli gates instead of T gates.

I have Q# code that counts Toffolis by instead counting Ts then dividing by 7 in order to compute the Toffoli count, but this code will break as soon as e.g. the trace simulator is updated to use the actual T count of 4 per Toffoli. I would rather more directly express my intent, so that my code will continue to work in the future.

(Also, counting Toffolis is nominally cheaper than counting Ts because fewer decomposition steps are needed.)

Metadata

Metadata

Assignees

Labels

area: target machinesTarget machines like the quantum, trace, or Toffoli simulatorsenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions