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

Made Width and Depth compatible in current version of the tracer #404

Merged
merged 12 commits into from
Oct 22, 2020

Conversation

DmitryVasilevsky
Copy link
Contributor

@DmitryVasilevsky DmitryVasilevsky commented Oct 20, 2020

Tracer component now produces compatible "Width" and "Depth" metrics, both computed in the depth counter. "Width" previously computed by the width counter is still reported as "QubitCount". User can request width or depth optimized circuit to get compatible width and height in desired case. For example,

using(q = Qubit()) { T(q); }
using(q = Qubit()) { T(q); }

will result in Width=1, Depth=2 when OptimizeDepth is false, and Width=2, Depth=1 when OptimizeDepth is true. For compatibility "QubitCount" is kept and will still be reported as 1.

@bettinaheim
Copy link
Contributor

The failing iqsharp build seems to be due to a test that simply needs to be updated.

Copy link
Contributor

@cgranade cgranade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this! I think the main thing that jumps out at me as a user of the trace simulator is that, as per @bettinaheim's comments, it's not really clear what ExtraWidth is and what that metric tracks about the execution of a quantum program.

src/Simulation/EntryPointDriver.Tests/Tests.fs Outdated Show resolved Hide resolved
src/Simulation/QCTraceSimulator/DepthCounter.cs Outdated Show resolved Hide resolved
src/Simulation/Simulators.Tests/ResourcesEstimatorTests.cs Outdated Show resolved Hide resolved
src/Simulation/QCTraceSimulator/DepthCounter.cs Outdated Show resolved Hide resolved
src/Simulation/Simulators.Tests/ResourcesEstimatorTests.cs Outdated Show resolved Hide resolved
src/Simulation/EntryPointDriver.Tests/Tests.fs Outdated Show resolved Hide resolved
src/Simulation/Simulators.Tests/ResourcesEstimatorTests.cs Outdated Show resolved Hide resolved
src/Simulation/QCTraceSimulator/QCTraceSimulatorCore.cs Outdated Show resolved Hide resolved
src/Simulation/QCTraceSimulator/DepthCounter.cs Outdated Show resolved Hide resolved
src/Simulation/QCTraceSimulator/DepthCounter.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@bettinaheim bettinaheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Width and depth metrics from ResourcesEstimator can seem inconsistent
5 participants