Skip to content

How to do a step by step contraction of a tensor network in one cuquantum.Network context ? #34

Answered by yangcal
benjaminlanthier asked this question in Q&A
Discussion options

You must be logged in to vote

Hello Benjamin,

Currently Network.contract directly dispatches all pairwise contractions to our C API cutensornetContractSlices altogether so there is no public API that allows user to tune/walk through pairwise contractions. That being said, one may be able to twerk around our public APIs a bit to achieve the goal.

Before we can further assist you, I noticed a couple of things from your script:

  1. It seems that inside update_expr_and_tensors, you're taking a full contraction path (let's call it full_path) from cutensornet.contract_path. In each call, the first pairwise contraction is peformed using cuquantum.contract, which gives you the new_network and then, instead of inheriting the subs…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@leofang
Comment options

@benjaminlanthier
Comment options

@yangcal
Comment options

Answer selected by benjaminlanthier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants