Skip to content

What is the recommended practice for dealing with functions that have multiple outputs (or list inputs)? #1589

Discussion options

You must be logged in to vote

Hey @arosen93, finally getting back to this. I'm happy to provide a more comprehensive explanation. Let's dive into this interesting topic.

The Underlying Issue

The problem arises due to two main requirements of the Covalent framework:

Electrons should be capable of returning any and all Python objects.
Lattice should act as a robust compiler for Electrons, without needing users to specify the number of output objects.
As a result, uncomputed operations on Electrons, such as sum([electron_output1,electron_output2...]) or electron_output['data'], must also be Electrons. This is because performing operations like summation on arbitrary Python objects after computing the electron_output futu…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@santoshkumarradha
Comment options

@Andrew-S-Rosen
Comment options

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